[Tutor] Connecting to interactive program

Alan Gauld alan.gauld at freenet.co.uk
Tue Dec 7 23:38:10 CET 2004

> I would like to create a python script that would function as
> ./script.py intpy
> Where the scipt setsup the comminication to 'intpy' which would be
> interactive python sessions (or some other interactive program).

OK, two steps back here I think.

Can you show us an imaginary user session explaining just what is

> ./script.py intpy

That is the user running a python program called script.py which
is taking a single commandline argument, the string "intpy".

script.py can read intpy via the sys.argv list. But what exactly
does intpy represent? And where does the "other program" that
you refer to come into the picture?

You will need to explain your requirements in a bit more detail
I think.

Alan G
Author of the Learn to Program web tutor

More information about the Tutor mailing list