• Kirill Smelkov's avatar
    gpython: Fix pymain to properly setup sys.path[0] · 6b4990f6
    Kirill Smelkov authored
    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.
    6b4990f6
Name
Last commit
Last update
golang Loading commit data...
gpython Loading commit data...
.gitignore Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...