Re: [Pythonmac-SIG] Stupid question

2007-05-21 Thread Kent Johnson
Calder Coalson wrote: >> That is exactly what modules and imports let you do. > It really doesn't seem to be doing that, because I import a bunch of > stuff and define it in my main file, then I import another file and it > can't use the global variables and the modules imported in the main file.

Re: [Pythonmac-SIG] Stupid question

2007-05-21 Thread Andrea Tomadin
Calder Coalson wrote: > All I want to do is split up my file into multiple files, Why not a simple execfile("otherprogram.py")? All the code in otherprogram.py is executed as if it was typed into the main program. No namespace issues or import problems. (Not OOP either, in fact!) Hope this he

Re: [Pythonmac-SIG] Stupid question

2007-05-20 Thread Kent Johnson
Calder Coalson wrote: > Ok, I have a program with multiple different states, but it does, (to > some extent) run linearly. All I want to do, is to be able to take > chunks of the program and put it in separate files so I don't have to > scroll through a couple thousand lines of stuff every time

Re: [Pythonmac-SIG] Stupid question

2007-05-20 Thread Kent Johnson
Calder Coalson wrote: > 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, These requirements seem a bit contradictory. If you have one program that you want to split into multiple modules

Re: [Pythonmac-SIG] Stupid question

2007-05-20 Thread Ronald Oussoren
On Saturday, May 19, 2007, at 11:48PM, "Calder Coalson" <[EMAIL PROTECTED]> wrote: >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

Re: [Pythonmac-SIG] Stupid question

2007-05-19 Thread Henning Hraban Ramm
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 int

[Pythonmac-SIG] Stupid question

2007-05-19 Thread 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 jus