• 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
..
hello.py Loading commit data...
world.py Loading commit data...