This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tsunwell
Recipients tsunwell
Date 2013-09-20.09:28:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Executing a script from the command prompt works if Python.exe called explicitly, doesn't work if script name only.
Example :
python.exe is ok gives the following :
Traceback (most recent call last):
  File "D:\soft\python\lib\", line 548, in <module>
  File "D:\soft\python\lib\", line 530, in main
    known_paths = addusersitepackages(known_paths)
  File "D:\soft\python\lib\", line 266, in addusersitepackages
    user_site = getusersitepackages()
  File "D:\soft\python\lib\", line 241, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "D:\soft\python\lib\", line 231, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "D:\soft\python\lib\", line 516, in get_config_var
    return get_config_vars().get(name)
  File "D:\soft\python\lib\", line 449, in get_config_vars
    import re
  File "D:\soft\python\lib\", line 105, in <module>
    import sre_compile
  File "D:\soft\python\lib\", line 14, in <module>
    import sre_parse
  File "D:\soft\python\lib\", line 17, in <module>
    from sre_constants import *
  File "D:\soft\python\lib\", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
Association of py extension to the python.exe is ok, Path contains the path for python directory (and also to \lib) and is the first dir in path.
Why is there a difference between the 2 invocations as they are calling the same exe?
Date User Action Args
2013-09-20 09:28:48tsunwellsetrecipients: + tsunwell
2013-09-20 09:28:48tsunwellsetmessageid: <>
2013-09-20 09:28:47tsunwelllinkissue19056 messages
2013-09-20 09:28:47tsunwellcreate