Fix sys.argv to reflect default Python behaviour
By default, calling the Python REPL without arguments causes sys.argv to be a non-empty list with an empty string, and some modules (e.g., pyNN) rely on that.
This commit is contained in:
parent
63a9e35f7f
commit
62bc86a0b5
@ -228,7 +228,7 @@ def cmdline_handler(scriptname, argv):
|
||||
options = parser.parse_args(argv[1:])
|
||||
|
||||
# reset sys.argv like Python
|
||||
sys.argv = options.args
|
||||
sys.argv = options.args or [""]
|
||||
|
||||
if options.command:
|
||||
# User did "hy -c ..."
|
||||
|
Loading…
Reference in New Issue
Block a user