Activity log for bug #767416

Date Who What changed Old value New value Message
2011-04-20 17:56:50 Toni Mueller bug added bug
2011-04-20 17:57:59 Toni Mueller description Eg. 'analyze.py' (from : $ diff -uw analyze.py.old analyze.py --- analyze.py.old 2010-12-26 18:43:56.000000000 +0100 +++ analyze.py 2011-04-20 19:52:09.000000000 +0200 @@ -138,6 +138,11 @@ except Exception, err: print err -if __name__ == "__main__": + +def main(): path = sys.argv[1] report(analyze(path)) + +if __name__ == "__main__": + main() + This should make it easier to call the scripts from anywhere (eg. generate wrappers around them via zc.buildout). Eg. 'analyze.py': $ diff -uw analyze.py.old analyze.py --- analyze.py.old 2010-12-26 18:43:56.000000000 +0100 +++ analyze.py 2011-04-20 19:52:09.000000000 +0200 @@ -138,6 +138,11 @@ except Exception, err: print err -if __name__ == "__main__": + +def main(): path = sys.argv[1] report(analyze(path)) + +if __name__ == "__main__": + main() + This should make it easier to call the scripts from anywhere (eg. generate wrappers around them via zc.buildout).