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.

classification
Title: cannot run module with double quotes
Type: resource usage Stage: resolved
Components: Windows Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ericshenjs, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2017-08-03 03:11 by ericshenjs, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg299681 - (view) Author: ericshenjs (ericshenjs) Date: 2017-08-03 03:11
(vPy3X64) test01@NJNU f:\Src\localCode\python\py3_eric
> python "-m locust.main -V"
f:\SDKs\Python\vPy3X64\Scripts\python.exe: Error while finding module specification for ' locust.main -V' (ModuleNotFoundError: No module named ' locust')

(vPy3X64) test01@NJNU f:\Src\localCode\python\py3_eric
> python -m locust.main -V
[2017-08-03 10:53:19,111] NJNU/INFO/stdout: Locust 0.8a2
[2017-08-03 10:53:19,111] NJNU/INFO/stdout:

(vPy3X64) test01@NJNU f:\Src\localCode\python\py3_eric
> python -V
Python 3.6.1 :: Anaconda 4.4.0 (64-bit)
msg299682 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2017-08-03 04:58
Python uses the C runtime wmain entry point, which parses the commandline string into an argument array using documented rules [1]. The quoted string "-m locust.main -V" is passed as a single argument instead of the expected three arguments: ["-m", "locust.main", "-V"].

[1]: https://msdn.microsoft.com/en-us/library/17w5ykft
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75295
2017-08-03 04:58:23eryksunsetstatus: open -> closed

nosy: + eryksun
messages: + msg299682

resolution: not a bug
stage: resolved
2017-08-03 03:11:54ericshenjscreate