Franck Pommereau

fixes from Carlos Galindo

...@@ -16,10 +16,10 @@ for name, cls in inspect.getmembers(_ast, inspect.isclass) : ...@@ -16,10 +16,10 @@ for name, cls in inspect.getmembers(_ast, inspect.isclass) :
16 class _Ast (cls, AST) : 16 class _Ast (cls, AST) :
17 def __init__ (self, *larg, **karg) : 17 def __init__ (self, *larg, **karg) :
18 if len(larg) > 0 and len(larg) != len(self._fields) : 18 if len(larg) > 0 and len(larg) != len(self._fields) :
19 - raise TypeError, ("%s constructor takes either 0 or " 19 + raise TypeError("%s constructor takes either 0 or "
20 - "%u positional arguments" 20 + "%u positional arguments"
21 - % (self.__class__.__name__, 21 + % (self.__class__.__name__,
22 - len(self._fields))) 22 + len(self._fields)))
23 for name, arg in zip(self._fields, larg) + karg.items() : 23 for name, arg in zip(self._fields, larg) + karg.items() :
24 if name in self._fields : 24 if name in self._fields :
25 setattr(self, name, arg) 25 setattr(self, name, arg)
......
...@@ -16,7 +16,10 @@ except : ...@@ -16,7 +16,10 @@ except :
16 try : 16 try :
17 import BaseHTTPServer 17 import BaseHTTPServer
18 except : 18 except :
19 - import http as BaseHTTPServer 19 + try :
20 + import http.server as BaseHTTPServer
21 + except :
22 + import http as BaseHTTPServer
20 23
21 ## 24 ##
22 ## 25 ##
......
...@@ -133,8 +133,8 @@ class TerminalController: ...@@ -133,8 +133,8 @@ class TerminalController:
133 # For any modern terminal, we should be able to just ignore 133 # For any modern terminal, we should be able to just ignore
134 # these, so strip them out. 134 # these, so strip them out.
135 import curses 135 import curses
136 - cap = curses.tigetstr(cap_name) or '' 136 + cap = curses.tigetstr(cap_name) or b''
137 - return re.sub(r'\$<\d+>[/*]?', '', cap) 137 + return re.sub(rb'\$<\d+>[/*]?', b'', cap)
138 138
139 def render(self, template): 139 def render(self, template):
140 """ 140 """
......