From 62bc86a0b58d27374ae3341f7f1d9269a3bcbb5e Mon Sep 17 00:00:00 2001 From: Henrique Carvalho Alves Date: Fri, 29 Nov 2013 23:51:41 -0200 Subject: [PATCH] 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. --- hy/cmdline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hy/cmdline.py b/hy/cmdline.py index 031eb33..5950a59 100644 --- a/hy/cmdline.py +++ b/hy/cmdline.py @@ -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 ..."