equal
deleted
inserted
replaced
100 if name == 'dict': |
100 if name == 'dict': |
101 name = 'Dict' |
101 name = 'Dict' |
102 if name == 'tuple': |
102 if name == 'tuple': |
103 name = 'Tuple' |
103 name = 'Tuple' |
104 return name |
104 return name |
|
105 |
105 |
106 |
106 # XXX: this is a hack: these should be dealt with another way |
107 # XXX: this is a hack: these should be dealt with another way |
107 # however, console is currently the only global name which is causing |
108 # however, console is currently the only global name which is causing |
108 # problems. |
109 # problems. |
109 PYJS_GLOBAL_VARS = ("console") |
110 PYJS_GLOBAL_VARS = ("console") |
1738 print >> lib_code, '\n//\n// END JS '+js+'\n//\n' |
1739 print >> lib_code, '\n//\n// END JS '+js+'\n//\n' |
1739 else: |
1740 else: |
1740 print >>sys.stderr, 'Warning: Unable to find imported javascript:', js |
1741 print >>sys.stderr, 'Warning: Unable to find imported javascript:', js |
1741 return lib_code.getvalue(), app_code.getvalue() |
1742 return lib_code.getvalue(), app_code.getvalue() |
1742 |
1743 |
|
1744 |
1743 usage = """ |
1745 usage = """ |
1744 usage: %s file_name [module_name] |
1746 usage: %s file_name [module_name] |
1745 """ |
1747 """ |
1746 |
1748 |
1747 |
1749 |
1758 module_name = sys.argv[2] |
1760 module_name = sys.argv[2] |
1759 else: |
1761 else: |
1760 module_name = None |
1762 module_name = None |
1761 print translate(file_name, module_name), |
1763 print translate(file_name, module_name), |
1762 |
1764 |
|
1765 |
1763 if __name__ == "__main__": |
1766 if __name__ == "__main__": |
1764 main() |
1767 main() |