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:
Henrique Carvalho Alves 2013-11-29 23:51:41 -02:00
parent 63a9e35f7f
commit 62bc86a0b5

View File

@ -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 ..."