Thanx Fredrik, that works and thats what I wanted. Amit
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Amit Dhingra wrote: > > > I would like to excute a script and upon completion, how can I just a python > > prompt with the functions and variables already defined. > > > > I know you can do this in the window gui(IDLE). I was wondering if this can > > be done in POSIX systems as well. > > does "python -i" do what you want? > > $ python -h > usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... > Options and arguments (and corresponding environment variables): > -c cmd : program passed in as string (terminates option list) > -d : debug output from parser (also PYTHONDEBUG=x) > -E : ignore environment variables (such as PYTHONPATH) > -h : print this help message and exit > -i : inspect interactively after running script, (also PYTHONINSPECT=x) > and force prompts, even if stdin does not appear to be a terminal > ... > > $ more myprogram.py > message = "hello, world" > print messae > $ python -i myprogram.py > hello, world > >>> print message.upper() > HELLO, WORLD > > </F> > > > -- http://mail.python.org/mailman/listinfo/python-list