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 eryksun
Recipients brett.cannon, christian.heimes, eryksun, larry, ncoghlan, nedbat, petr.viktorin, steve.dower
Date 2018-01-16.19:09:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1516129794.9.0.467229070634.issue32551@psf.upfronthosting.co.za>
In-reply-to
Content
On Windows it's the directory that contains the zip file or directory with __main__.py, not the current directory. This seems normal to me. The directory or zip file is effectively executing as a script. I can understand wanting more isolated behavior in this case, i.e. make isolated mode the default when executing a directory or zip file as a script.

    C:\>py -3.5 C:\Temp\spam
    __file__:
         C:\Temp\spam\__main__.py
    sys.path:
        C:\Temp\spam
        C:\Temp
        C:\Program Files\Python35\python35.zip
        C:\Program Files\Python35\DLLs
        C:\Program Files\Python35\lib
        C:\Program Files\Python35
        C:\Program Files\Python35\lib\site-packages

    C:\>py -3.5 C:\Temp\spam.zip
    __file__:
         C:\Temp\spam.zip\__main__.py
    sys.path:
        C:\Temp\spam.zip
        C:\Temp
        C:\Program Files\Python35\python35.zip
        C:\Program Files\Python35\DLLs
        C:\Program Files\Python35\lib
        C:\Program Files\Python35
        C:\Program Files\Python35\lib\site-packages
History
Date User Action Args
2018-01-16 19:09:54eryksunsetrecipients: + eryksun, brett.cannon, ncoghlan, larry, christian.heimes, nedbat, petr.viktorin, steve.dower
2018-01-16 19:09:54eryksunsetmessageid: <1516129794.9.0.467229070634.issue32551@psf.upfronthosting.co.za>
2018-01-16 19:09:54eryksunlinkissue32551 messages
2018-01-16 19:09:54eryksuncreate