gpython: Fix pymain to properly setup sys.path[0]
Pymain was not adding e.g. directory of executed file to sys.path, and as the result if there were e.g. 2 files dir/hello.py # imports world dir/world.py running `gpython dir/hello.py` would fail to import world. The case for interactive console was also failing to setup sys.argv as empty, so it was containing ['/path/to/gpython']. It was also, contrary to standard python, unconditionally showing '>>>' prompt even when stdin was not a tty. Fix all that and add a test to cover pymain functionality.
Showing
gpython/testdata/hello.py
0 → 100644
gpython/testdata/world.py
0 → 100644
Please register or sign in to comment