-
Notifications
You must be signed in to change notification settings - Fork 40
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
sys.argv is empty #31
Comments
Hmmm, sorry for being husty. I'm discovered that simple I use Windows 10 + Git Bash. On PowerShell python errors and print showed correctly. Also, the original error is this:
So, this hack works: import sys
sys.argv = ["./myprog"] Therefore Original issue expanded to two problems:
I think by default |
Interesting. Here on Linux, Apparently something about |
I don't have a Windows computer here to test, but looking at the CPython source code, it looks like it should be impossible for /* sys.argv must be non-empty: empty argv is replaced with [''] */
assert(config->argv.length >= 1); So not sure what's happening in your case. |
This is also the documented behaviour:
|
I'm trying to run this code:
But get only this error:
But this code works as single python file.
It will be fine to get errors from python interpreter why code is failed to execute.
Also, is
import
supported?The text was updated successfully, but these errors were encountered: