From: <th...@us...> - 2013-01-31 19:34:11
|
Revision: 707 http://py2exe.svn.sourceforge.net/py2exe/?rev=707&view=rev Author: theller Date: 2013-01-31 19:34:04 +0000 (Thu, 31 Jan 2013) Log Message: ----------- Replace the tst() function with the fixed one. Modified Paths: -------------- trunk/py3exe/py3exe/mf34.py Modified: trunk/py3exe/py3exe/mf34.py =================================================================== --- trunk/py3exe/py3exe/mf34.py 2013-01-31 19:32:55 UTC (rev 706) +++ trunk/py3exe/py3exe/mf34.py 2013-01-31 19:34:04 UTC (rev 707) @@ -598,7 +598,21 @@ def test(): + """This test function has a somwhat unusual command line. + mf.py [-d] [-m] [-p path] [-q] [-x exclude] script modules... + + -d increase debug level + -m script name is followed by module or package names + -p extend searchpath + -q reset debug level + -x exclude module/package + """ + # There also was a bug in the original function in modulefinder, + # which is fixed in this version + + # Parse command line + import sys import getopt try: opts, args = getopt.getopt(sys.argv[1:], "dmp:qx:") @@ -628,6 +642,7 @@ script = "hello.py" else: script = args[0] + args = args[1:] # BUGFIX: This line was missing in the original # Set the path based on sys.path and the script directory path = sys.path[:] @@ -640,7 +655,7 @@ # Create the module finder and turn its crank mf = ModuleFinder(path, debug, exclude) - for arg in args[1:]: + for arg in args[:]: # BUGFIX: the original used 'for arg in args[1:]' if arg == '-m': domods = 1 continue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |