def main(): if len(sys.argv) < 2: print >>sys.stderr, "syntax: %s [destination directory]" % sys.argv[0] sys.exit(0) DEST = sys.argv[1] trymkdir(DEST) trymkdir(DEST, "static") compile.main(DEST, produce_debug=False) for x in "authgate qwebirc esimplejson twisted".split(" "): copypydir(x, DEST) for x in "images panes sound".split(" "): copydir(os.path.join("static", x), DEST) if 0: compile_python(DEST) remove_python(DEST) else: copy(os.path.join("bin", "cleanpyc.py"), os.path.join(DEST, "cleanpyc.py"), nojoin=1) copy("run.py", DEST) copy("config.py.example", DEST) if os.path.exists("config.py"): print "NOT copying current config.py!"
def run(directory, source, analysis_types): print "Running WIICA" inst_results = {} mem_results = {} compile.main(directory, source) inst_results = analysis.main(directory, source, analysis_types) if "memory" in analysis_types: mem_results = mem_analysis.main(directory, source) all_results = dict(inst_results.items() + mem_results.items()) if "register" in analysis_types: reg_analysis.main(directory, source) return all_results
def run(directory, source, analysis_types): print 'Running WIICA' inst_results = {} mem_results = {} compile.main(directory, source) inst_results = analysis.main(directory, source, analysis_types) if 'memory' in analysis_types: mem_results = mem_analysis.main(directory, source) all_results = dict(inst_results.items() + mem_results.items()) if 'register' in analysis_types: reg_analysis.main(directory, source) return all_results
def run(args, env): import compile try: return compile.main(["test-prog"] + args, env) except SystemExit: pass
def main(): if len(sys.argv) < 2: print("syntax: %s [destination directory]" % sys.argv[0], file=sys.stderr) sys.exit(0) DEST = sys.argv[1] trymkdir(DEST) trymkdir(DEST, "static") trymkdir(DEST, "static", "js") compile.main(DEST, produce_debug=False) for x in "authgate qwebirc esimplejson twisted".split(" "): copypydir(x, DEST) for x in "images panes sound".split(" "): copydir(os.path.join("static", x), DEST) for x in pages.JS_EXTRA: copy(os.path.join("static", "js", x + ".js"), DEST) for x in pages.UIs.values(): e = x.get("extrajs") if e is None: continue for x2 in e: file = os.path.join("static", "js", "%s.js" % x2) destfile = os.path.join(DEST, file) dir, _ = os.path.split(destfile) if not os.path.exists(dir): os.mkdir(dir) copy(file, DEST) copy(os.path.join("static/favicon.ico"), DEST) if 0: compile_python(DEST) remove_python(DEST) else: copy(os.path.join("bin", "cleanpyc.py"), os.path.join(DEST, "cleanpyc.py"), nojoin=1) copy("run.py", DEST) copy("config.py.example", DEST) if os.path.exists("config.py"): print("NOT copying current config.py!")
def main(): if len(sys.argv) < 2: print >>sys.stderr, "syntax: %s [destination directory]" % sys.argv[0] sys.exit(0) DEST = sys.argv[1] trymkdir(DEST) trymkdir(DEST, "static") trymkdir(DEST, "static", "js") compile.main(DEST, produce_debug=False) for x in "authgate qwebirc esimplejson twisted".split(" "): copypydir(x, DEST) for x in "images panes sound".split(" "): copydir(os.path.join("static", x), DEST) for x in pages.JS_EXTRA: copy(os.path.join("static", "js", x + ".js"), DEST) for x in pages.UIs.values(): e = x.get("extrajs") if e is None: continue for x2 in e: file = os.path.join("static", "js", "%s.js" % x2) destfile = os.path.join(DEST, file) dir, _ = os.path.split(destfile) if not os.path.exists(dir): os.mkdir(dir) copy(file, DEST) copy(os.path.join("static/favicon.ico"), DEST) if 0: compile_python(DEST) remove_python(DEST) else: copy(os.path.join("bin", "cleanpyc.py"), os.path.join(DEST, "cleanpyc.py"), nojoin=1) copy("run.py", DEST) copy("iris.conf.example", DEST) if os.path.exists("iris.conf"): print "NOT copying current iris.conf!"
def run(directory, kernel, source, arguments, analysis_types): print 'Running WIICA' inst_results = {} mem_results = {} if arguments[0] == 'non': arguments = [] compile.main(directory, kernel, source, arguments) process_trace.main(directory, kernel) inst_results = analysis.main(directory, kernel, analysis_types) if 'memory' in analysis_types: mem_results = mem_analysis.main(directory, kernel) all_results = dict(inst_results.items() + mem_results.items()) if 'register' in analysis_types: reg_analysis.main(directory, kernel) return all_results
def main(): compile.main() archivater.main()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys try: sys.argv.remove("--download") # quick and dirty fix for the globally distributed --download argument except ValueError: pass import os head = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(head)) import compile sys.path.pop(0) oldpath = os.getcwd() os.chdir(head) compile.main() # here we process everything os.chdir(oldpath) del(oldpath) TARGETS = { 'Showcase.py': dict( path='src', ) } PACKAGE = { 'title': 'showcase', 'desc': 'Showcase example', }
def recompile(self): self.stop_serve() compile.main(args) self.start_serve()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os head = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(head)) import compile sys.path.pop(0) oldpath = os.getcwd() os.chdir(head) compile.main() os.chdir(oldpath) del(oldpath) TARGETS = { 'Showcase.py': dict( path='src', ) } PACKAGE = { 'title': 'showcase', 'desc': 'Showcase example', } def setup(targets): '''Setup example for translation, MUST call util.setup(targets).'''
import sys try: sys.argv.remove( "--download" ) # quick and dirty fix for the globally distributed --download argument except ValueError: pass import os head = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(head)) import compile sys.path.pop(0) oldpath = os.getcwd() os.chdir(head) compile.main() # here we process everything os.chdir(oldpath) del (oldpath) TARGETS = {'Showcase.py': dict(path='src', )} PACKAGE = { 'title': 'showcase', 'desc': 'Showcase example', } def setup(targets): '''Setup example for translation, MUST call util.setup(targets).''' util.setup(targets)
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os head = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(head)) import compile sys.path.pop(0) oldpath = os.getcwd() os.chdir(head) compile.main() os.chdir(oldpath) del (oldpath) TARGETS = {'Showcase.py': dict(path='src', )} PACKAGE = { 'title': 'showcase', 'desc': 'Showcase example', } def setup(targets): '''Setup example for translation, MUST call util.setup(targets).''' util.setup(targets) def translate(): '''Translate example, MUST call util.translate().''' #util.translate()