python -i (interactive environment)
Pierre Barbier de Reuille
pierre.barbier at cirad.fr
Sun Mar 6 13:21:10 EST 2005
Very simple is you're on UNIX ...
You juste have to put at the beginnin of your file :
#!/usr/bin/python -i
And it juste does what you want :)
Pierre
Joe a écrit :
> When you run "python -i scriptname.py" after the script completes you left
> at the interactive command prompt.
>
> Is there a way to have this occur from a running program?
>
> In other words can I just run scriptname.py (NOT python -i scriptname.py)
> and inside of scriptname.py I decide that I want to fall back to the
> interactive prompt?
>
> I've searched and so far the only thing I've come up with is to use pdb, but
> that is not exactly the same as the interactive prompt.
>
> Is there any way to do it that I have missed?
>
> Thanks.
>
>
More information about the Python-list
mailing list