![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
Classes | |
| class | Py2Un |
Functions | |
| def | main |
| def | translate_file |
| def | transOp |
Variables | |
| list | builtins |
| dictionary | opTransDict |
| def py2un::main | ( | ) |
| def py2un::translate_file | ( | fpath, | |
| outpath, | |||
pretty = False |
|||
| ) |
Definition at line 5 of file py2un.py.
00006 : 00007 if not fpath: 00008 print 'No filepath supplied. Exiting.' 00009 return 00010 f = open(fpath, 'r') 00011 if not f: 00012 print 'Could not open file "' + fpath + '". Exiting.' 00013 return 00014 source = f.read() 00015 f.close() 00016 tree = ast.parse(source) 00017 translator = Py2Un() 00018 src = translator.walk_tree(tree, pretty) 00019 if src and outpath: 00020 f = open(outpath, 'w') 00021 if f: 00022 f.write(src) 00023 f.close()
| def py2un::transOp | ( | op | ) |
| list py2un::builtins |
| dictionary py2un::opTransDict |
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.