-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Line Interface Fails #797
Comments
@jashandeep-sohi would you take a look? |
jashandeep-sohi
added a commit
to jashandeep-sohi/aiohttp
that referenced
this issue
Feb 22, 2016
asvetlov
added a commit
that referenced
this issue
Feb 27, 2016
Fix command line arg parsing; issue #797
Fixed by #798 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I wanted to test aiohttp and I started by writing a file named
example.py
as shown below:In the docs I saw the section about the CLI and decide to try that. The example shown in the docs is written as:
$ python -m aiohttp.web -H localhost -P 8080 package.module.init_func
However it wasn't working and I took a look at the code and it turned out that it was using a
:
to split the module from the callable so I modified my command as follows:As
entry-func
actually was in themodule:function
syntax I looked at the code and it turned out that you were passingsys.argv
tomain
:and then later on in
main
after creating a parser you were calling it as such:However that includes as the first parameter the name of the module (
.... aiohttp/web.py
) and thus it failed to parse it properly. I changed it as follows and it worked for me:Also we might need to change the docs so that they use
:
to separate the module from the callable.The text was updated successfully, but these errors were encountered: