[Checkins] SVN: grokcore.startup/trunk/src/grokcore/startup/README.txt make sure the __name__ is "__main__" that would be expected by scripts writers using the "if __name__ == "__main__":" pattern
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Wed Aug 18 11:11:49 EDT 2010
Log message for revision 115759:
make sure the __name__ is "__main__" that would be expected by scripts writers using the "if __name__ == "__main__":" pattern
Changed:
U grokcore.startup/trunk/src/grokcore/startup/README.txt
-=-
Modified: grokcore.startup/trunk/src/grokcore/startup/README.txt
===================================================================
--- grokcore.startup/trunk/src/grokcore/startup/README.txt 2010-08-18 14:17:19 UTC (rev 115758)
+++ grokcore.startup/trunk/src/grokcore/startup/README.txt 2010-08-18 15:11:48 UTC (rev 115759)
@@ -309,7 +309,9 @@
... pprint(debugger)
... pprint(app)
... pprint(root)
- ... pprint(sys.argv)""")
+ ... pprint(sys.argv)
+ ... pprint(__file__)
+ ... pprint(__name__)""")
>>>
>>> sys.argv = ['interactive_debug_prompt', script]
>>> from grokcore.startup import interactive_debug_prompt
@@ -326,6 +328,8 @@
<zope.app.debug.debug.Debugger object at ...>
<zope.site.folder.Folder object at ...>
['...script.py']
+ '...script.py'
+ '__builtin__'
Clean up the temp_dir
More information about the checkins
mailing list