[Tutor] running more than one python program at the same time
oscar.j.benjamin at gmail.com
Tue Sep 4 11:13:37 CEST 2012
It's best if you can avoid top-posting and put your responses in between
the appropriate parts of the message you are replying to like I have below:
On 4 September 2012 02:53, Benjamin Fishbein <bfishbein79 at gmail.com> wrote:
> I used Python Launcher and it opened it in the terminal.
> On Sep 3, 2012, at 2:50 PM, Oscar Benjamin wrote:
> > On Mon, 03 Sep 2012 18:55:43 +0100, Alan Gauld <
> alan.gauld at btinternet.com> wrote:
> >> On 03/09/12 16:01, Benjamin Fishbein wrote:
> >> > Hi. I started running the program in the terminal rather than
> > IDLE. It
> >> > works, and I can run several programs at the same time. The
> > problem is
> >> > that when the program is finished running, it prints:
> >> > exit status: 0
> >> > logout
> >> >
> >> > [Process completed]
> > What do you mean when you say you ran the program in the terminal? Do
> you mean that you opened a terminal window and then typed 'python
> myprog.py'? Or did you click on the python file and choose 'run in
> terminal' or similar? That output looks to me like what happens on OSX when
> a terminal window is open but the shell has been closed.
So you were using the python launcher on the dock? I guess you are using
OSX, then (it's good to provide this kind of information).
The reason you're not seeing any output is probably because you're not
printing it. If your program has a variable called 'total' that you would
like to see the value of simply put a line like 'print(total)' at the end
of your script. Then you should see the output.
> > I think the instruction to run in a terminal should look like:
> > 1) open the terminal (how to do this depends on your OS).
> > 2) type 'cd /path/to/my/script/folder' and then hit enter.
> > 3) type 'python script.py' and then hit enter.
Have you tried the instructions above. Assuming you're using OSX you can do
step 1 by hitting cmd-space to open spotlight. Then you type 'terminal' and
hit enter and you will have a terminal window.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor