--- a/controls/EnhancedStatusBar.py Tue Aug 15 15:50:30 2017 +0300
+++ b/controls/EnhancedStatusBar.py Tue Aug 15 16:01:18 2017 +0300
@@ -101,7 +101,6 @@
wx.EVT_SIZE(self, self.OnSize)
wx.CallAfter(self.OnSize, None)
"""Handles The wx.EVT_SIZE Events For The StatusBar.
@@ -192,11 +191,9 @@
elif verticalalignment == ESB_ALIGN_BOTTOM:
widget.SetPosition((xpos, rect.height-widgetsize[1]))
def AddWidget(self, widget, horizontalalignment=ESB_ALIGN_CENTER_HORIZONTAL,
verticalalignment=ESB_ALIGN_CENTER_VERTICAL, pos = -1):
"""Add A Widget To The EnhancedStatusBar.
@@ -238,7 +235,6 @@
'"ESB_ALIGN_CENTER_VERTICAL", "ESB_ALIGN_TOP", "ESB_ALIGN_BOTTOM"' \
self.RemoveChild(self._items[pos].widget)
self._items[pos].widget.Destroy()
--- a/svgui/pyjs/pyjs.py Tue Aug 15 15:50:30 2017 +0300
+++ b/svgui/pyjs/pyjs.py Tue Aug 15 16:01:18 2017 +0300
@@ -236,7 +236,6 @@
print >>self.output, decl
haltException = self.module_prefix + "HaltException"
print >>self.output, haltException + ' = function () {'
@@ -459,25 +458,20 @@
print >>self.output, "};"
print >>self.output, "%s.__name__ = '%s';\n" % (function_name, node.name)
self._kwargs_parser(node, function_name, normal_arg_names, None)
def _return(self, node, current_klass):
expr = self.expr(node.value, current_klass)
# in python a function call always returns None, so we do it
print >>self.output, " return " + expr + ";"
def _break(self, node, current_klass):
print >>self.output, " break;"
def _continue(self, node, current_klass):
print >>self.output, " continue;"
def _callfunc(self, v, current_klass):
if isinstance(v.node, ast.Name):
@@ -633,7 +627,6 @@
raise TranslationError("unsupported type (in _getattr)", v.expr)
return strip_py(self.module_prefix)
@@ -717,7 +710,6 @@
def _getattr2(self, v, current_klass, attr_name):
if isinstance(v.expr, ast.Getattr):
call_name = self._getattr2(v.expr, current_klass, v.attrname + "." + attr_name)
@@ -729,7 +721,6 @@
Handle a class definition.
@@ -769,7 +760,6 @@
if child.name == "__init__":
base_class = "pyjslib.__Object"
elif len(node.bases) == 1:
@@ -855,7 +845,6 @@
print >> self.output, class_name_+".__initialize__();"
def classattr(self, node, current_klass):
self._assign(node, current_klass, True)
@@ -918,7 +907,6 @@
self._varargs_handler(node, varargname, declared_arg_names, current_klass)
local_arg_names.append(varargname)
# stack of local variable names for this function call
self.local_arg_stack.append(local_arg_names)
@@ -1035,7 +1023,6 @@
print >>self.output, ' }'
print >>self.output, ' }'
def get_line_trace(self, node):
@@ -1064,7 +1051,6 @@
rhs = self.expr(node.expr, current_klass)
print >>self.output, " " + lhs + " " + op + " " + rhs + ";"
def _assign(self, node, current_klass, top_level = False):
tempvar = '__temp'+str(node.lineno)
@@ -1176,7 +1162,6 @@
print "b", repr(node.expr), rhs
print >>self.output, " " + lhs + " " + op + " " + rhs + ";"
def _discard(self, node, current_klass):
if isinstance(node.expr, ast.CallFunc):
@@ -1207,7 +1192,6 @@
raise TranslationError("unsupported type (in _discard)", node.expr)
def _if(self, node, current_klass):
for i in range(len(node.tests)):
test, consequence = node.tests[i]
@@ -1225,7 +1209,6 @@
self._if_test(keyword, test, consequence, current_klass)
def _if_test(self, keyword, test, consequence, current_klass):
expr = self.expr(test, current_klass)
@@ -1242,7 +1225,6 @@
print >>self.output, " }"
# look up "hack" in AppTranslator as to how findFile gets here
@@ -1256,7 +1238,6 @@
self.imported_classes[name[0]] = node.modname
def _compare(self, node, current_klass):
lhs = self.expr(node.expr, current_klass)
@@ -1280,7 +1261,6 @@
return "(" + lhs + " " + op + " " + rhs + ")"
def _not(self, node, current_klass):
expr = self.expr(node.expr, current_klass)
@@ -1349,7 +1329,6 @@
def _while(self, node, current_klass):
test = self.expr(node.test, current_klass)
print >>self.output, " while (pyjslib.bool(" + test + ")) {"
@@ -1360,7 +1339,6 @@
raise TranslationError("unsupported type (in _while)", node.body)
print >>self.output, " }"
if isinstance(node.value, int):
@@ -1539,7 +1517,6 @@
raise TranslationError("unsupported type (in expr)", node)
@@ -1726,7 +1703,6 @@
return imported_modules_str + module_str
def translate(self, module_name, is_app=True, debug=False,
app_code = cStringIO.StringIO()