Commits

James Mills committed 309511a Merge

Comments (0)

Files changed (8)

examples/keyecho.py

 #!/usr/bin/env python
 
 from circuits.io import File
-from circuits import Component, Debugger
+from circuits import Component
 
 import sys
 import tty

examples/portforward.py

 
 import optparse
 
-from circuits import __version__
-from circuits import Event, Component, Debugger
+from circuits import Event
 from circuits.net.sockets import TCPClient, TCPServer
 from circuits.net.sockets import Close, Connect, Write
 
+__version__ = "0.1"
+
 USAGE = "%prog [options]"
 VERSION = "%prog v" + __version__
 
     else:
         target = (opts.target, 8000)
 
-    (Server(bind) + Client(*target) + Debugger()).run()
+    (Server(bind) + Client(*target)).run()
 
 if __name__ == "__main__":
     main()

examples/telnet.py

 
 import os
 import optparse
-from socket import gethostname
 
 from circuits.io import stdin
 from circuits import handler, Component
 
     def error(self, *args):
         if len(args) == 3:
-            type, value, traceback = args
+            value = args[1]
         else:
             value = args[0]
-            type = type(value)
-            traceback = None
 
         print "ERROR: %s" % value
 

examples/web/fileupload.py

         if file is None:
             return UPLOAD_FORM
         else:
-            filename = file.filename
             return UPLOADED_FILE % (file.filename, desc, file.value)
 
 (Server(8000) + Debugger() + Root()).run()

examples/web/shadowauth.py

 against /etc/passwd and /etc/shadow before letting them into the web site."""
 
 import os, re
-from commands import getstatusoutput
 from circuits import handler, Component
 from circuits.web import _httpauth, Server, Controller
 from circuits.web.errors import HTTPError, Unauthorized

examples/web/ssl-forward-cert.py

 # stdlib
 import ssl
 
-from circuits import Event, Component, Debugger
-from circuits.net.sockets import TCPClient
+from circuits import Debugger
 from circuits.web import Server, Controller
 
 class Root(Controller):

examples/web/terminal/terminal.py

 from StringIO import StringIO
 from subprocess import Popen, PIPE
 
-from circuits.io import File
-from circuits.tools import kill
+from circuits.io import File, Write
 from circuits.web.events import Stream
+from circuits.tools import inspect, kill
 from circuits import handler, Event, Component
 from circuits.web import Server, Controller, Logger, Static, Sessions
 

examples/web/wiki/macros/__init__.py

             name = name.replace("_", "-")
             try:
                 macros[name] = function
-            except Exception, e:
+            except Exception:
                 continue
 
     return macros