[Pythonmac-SIG] Stupid question
Henning Hraban Ramm
hraban at fiee.net
Sun May 20 07:04:40 CEST 2007
Am 2007-05-19 um 23:46 schrieb Calder Coalson:
> This probably has the simplest solution ever, but how do you run a
> python file from another python program? I've tried import, but that
> doesn't work because the thing has to be completely independent. All
> I want to do is split up my file into multiple files, but I can't
> find a command just to RUN it anywhere!
The Perl people would say: TMTOWTDI
- It depends if the different apps use any GUI and/or async/event/
server framework
- os.system('python yourapp.py') # not preferrable
- via the subprocess module
- I write completeley independents apps whose important classes I can
import and instance in another app anyway. (A matter of clean design.)
You should specify what you really want to do.
Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net
https://www.cacert.org (I'm an assurer)
More information about the Pythonmac-SIG
mailing list