Permalink
Browse files

More Python 3 changes. #203

CoList demo works (though not thoroughly tested) with Python 3.2 and
Tornado 2.0.

Helful resources:
* http://www.python.org/dev/peps/pep-3000/
* http://svn.python.org/view/*checkout*/sandbox/trunk/2to3/README
  • Loading branch information...
ccotter committed Nov 5, 2012
1 parent 4a0b983 commit c16bd20e0985309011c773f5bc4b988f96729018
@@ -3,4 +3,3 @@ include LICENSE
include NOTICES
include pycoweb
recursive-include coweb *.py *.tmpl
-recursive-include js *
@@ -19,7 +19,7 @@
log = logging.getLogger('coweb.admin')
def generate_collab_key():
- return hashlib.md5(uuid.uuid4().urn).hexdigest()
+ return hashlib.md5(uuid.uuid4().urn.encode('utf-8')).hexdigest()
class AdminHandler(tornado.web.RequestHandler):
def prepare(self):
@@ -144,7 +144,7 @@ def purge_clients(self):
self._purgeGen = self._purge_clients()
try:
# iterate the generator
- self._purgeGen.next()
+ next(self._purgeGen)
except StopIteration:
# purge complete, toss the generator
self._purgeGen = None
@@ -14,7 +14,7 @@
from . import session
from .. import OEHandler
from .. import session_moderator
-import coweb.session.late_join_handler
+from coweb.session import late_join_handler
OEHandler = OEHandler.OEHandler
session_sync_regex = re.compile("/session/([A-z0-9]+)/sync(.*)");

0 comments on commit c16bd20

Please sign in to comment.