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

Marc Tompkins marc.tompkins at gmail.com
Wed Aug 29 00:49:01 CEST 2012


On Tue, Aug 28, 2012 at 3:30 PM, Benjamin Fishbein <bfishbein79 at gmail.com>wrote:

> Hello,
> I wrote a program that I want to have running 24/7. But the problem is
> that I also want to write and run other programs. I'm using Idle and it
> won't let me run more than one script at a time. Do you know if there's a
> way to do this? Or do I need to buy a second computer?
> Thanks,
> Ben
>
>
IDLE is just an IDE (Integrated Development Environment), meant to improve
the convenience and efficiency of writing Python.  It is NOT intended to be
the primary way you run your Python scripts once you've written them, and
it specifically cannot handle multiple scripts executing simultaneously.
So the general answer to your question is: only use IDLE for writing and
testing your script, not for running it once it's production-ready.

Under Windows (which, for my sins, is my primary environment), you can:
-  open multiple command prompts (Start/Run/CMD) and type "python
MyScript.py" in each of them
-  double-click on the icon for each .py or file, which will launch a copy
of Python and execute the script
-  create a Task or a Service which will run "python MyScript.py" either at
boot-up or at a scheduled time
-  or any of a few other methods.

You have similar options in Mac and Linux environments, but I'll leave it
to others to enumerate them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120828/0eba7470/attachment.html>


More information about the Tutor mailing list