[Tutor] running more than one python program at the same time

Dave Angel d at davea.name
Wed Aug 29 02:09:21 CEST 2012


On 08/28/2012 07:19 PM, Ben Fishbein wrote:
> Stupid question: how do I run a program from the terminal? I've always just
> gone to the drop down menu and clicked run to do it in idle.
>
>

Haven't you noticed that the correct method of posting on this forum is
to put your remarks AFTER the part you're responding to?  And deleting
the parts you're not responding to?  This message was top-posted.

Anyway, to run a program from the terminal, you type its name, followed
by any arguments it may have.  So if you want to run python, type python
from the prompt. i think you knew that.

Perhaps you're asking how to pass the name of the script to python. 
Fortunately, it simply expects the path name to the script.  So if your
script is at ./'mydir/myscript.py, you'd type:

Ben at mymachine:~$ python mydir/myscript.py

If the script takes arguments, you'd put them after the script name.


-- 

DaveA



More information about the Tutor mailing list