[Tutor] running more than one python program at the same time
Alan Gauld
alan.gauld at btinternet.com
Wed Aug 29 10:07:32 CEST 2012
On 29/08/12 01:09, Dave Angel wrote:
> On 08/28/2012 07:19 PM, Ben Fishbein wrote:
>> Stupid question: how do I run a program from the terminal?
>
> Ben at mymachine:~$ python mydir/myscript.py
>
> If the script takes arguments, you'd put them after the script name.
If it doesn't take arguments you can do this by dragging the script from
Finder into the Terminal, it saves some typing...
Also note you don't need a Terminal per program.
If you end the program line with an ampersand (&) the program will run
in the background. You can then start another program in the same Terminal.
Of course, if they require user interaction then things get a bit
complicated so you're better with multiple Terminals, but if its
just background data processing you can run as many programs as
you like in a single Terminal.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list