[issue36514] -m switch revisited
New submission from Colin Dick : -m switch revisited - see issue 27487 Win 10 64bit python 3.6.3 & 3.7.3 initially running code using py 3.6.3 with this command python -m vixsd.py produced C:\Python36\python.exe: Error while finding module specification for 'vixsd.py' (AttributeError: module 'vixsd' has no attribute '__path__') updated python from 3.6.3 to 3.7.3 searched & read web retried the 4 options with & without "-m" & ".py" results reproduced below c:\shared\python\vmw>python vixsd python: can't open file 'vixsd': [Errno 2] No such file or directory c:\shared\python\vmw>python vixsd.py A c:\shared\python\vmw>python -m vixsd A c:\shared\python\vmw>python -m vixsd.py A C:\Python3\python.exe: Error while finding module specification for 'vixsd.py' (ModuleNotFoundError: __path__ attribute not found on 'vixsd' while trying to find 'vixsd.py') while this was initially produced thru my ignorance, handling all 4 options still does not work correctly appears to have been a problem at least since issue 27487 cheers team, keep up the great work ColinDNZ -- messages: 339374 nosy: Colin Dick priority: normal severity: normal status: open title: -m switch revisited type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue36514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36514] -m switch revisited
Colin Dick added the comment: No, the first example is expected, BUT the middle two work HENCE the last should NOT have a problem either... No? Because the middle two work, so should the last complete without any errors. There were no code changes, Therefore the problem is with python On Wed, 3 Apr 2019, 23:42 Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > This is not a bug: > > * "python -m NAME" runs module (or package) NAME as a script, NAME should > therefore be a module name and not a filename (and hence not have a .py > suffix) > > * "python NAME" runs a script in file NAME and should therefore by a > complete file name, including a suffix when the file name has a suffix. > > In your examples "python -m vixsd.py" and "python vixsd" correctly raise > an error. > > -- > nosy: +ronaldoussoren > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > ___ > Python tracker > <https://bugs.python.org/issue36514> > ___ > -- ___ Python tracker <https://bugs.python.org/issue36514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com