Re: Running autogenerated code in another python instance

2005-11-06 Thread Paul Cochrane
On Mon, 07 Nov 2005 00:01:29 +, Bengt Richter wrote: > On Thu, 03 Nov 2005 14:23:53 +1000, Paul Cochrane <[EMAIL PROTECTED]> wrote: > >>On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: >> >>> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> >>> wrote: >>> >

Re: Running autogenerated code in another python instance

2005-11-06 Thread Paul Cochrane
On Thu, 03 Nov 2005 19:56:48 +, Tom Anderson wrote: > On Thu, 3 Nov 2005, Paul Cochrane wrote: > >> On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: >> >>> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> >>> wrote: >>> I've got an application that I'm

Re: Running autogenerated code in another python instance

2005-11-06 Thread Bengt Richter
On Thu, 03 Nov 2005 14:23:53 +1000, Paul Cochrane <[EMAIL PROTECTED]> wrote: >On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: > >> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> >> wrote: >> >>>Hi all, >>> >>>I've got an application that I'm writing that auto

Re: Running autogenerated code in another python instance

2005-11-03 Thread Tom Anderson
On Thu, 3 Nov 2005, Paul Cochrane wrote: > On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: > >> On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> >> wrote: >> >>> I've got an application that I'm writing that autogenerates python >>> code which I then execute wi

Re: Running autogenerated code in another python instance

2005-11-02 Thread Paul Cochrane
On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: > On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> > wrote: > >>Hi all, >> >>I've got an application that I'm writing that autogenerates python code >>which I then execute with exec(). I know that this is not the

Re: Running autogenerated code in another python instance

2005-11-02 Thread Do Re Mi chel La Si Do
With good spaces : def runcode(srcode): import sys,traceback sret=True try: ccod=compile(srcode, 'Paul-code', 'exec') flagcompile=True except: print "compilo-error" flagcompile=False if flagcompile==True: try: exec(ccod

Re: Running autogenerated code in another python instance

2005-11-02 Thread Do Re Mi chel La Si Do
Hi! I did not understand anything with your chatterer message. But, perhaps, the code below will help you. @-salutations Michel Claveau def runcode(srcode): import sys,traceback sret=True try: ccod=compile(srcode, 'Paul-code', 'exec') flagcompile=True except: print

Re: Running autogenerated code in another python instance

2005-11-02 Thread Bengt Richter
On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> wrote: >Hi all, > >I've got an application that I'm writing that autogenerates python code >which I then execute with exec(). I know that this is not the best way to >run things, and I'm not 100% sure as to what I really

Running autogenerated code in another python instance

2005-11-02 Thread Paul Cochrane
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to what I really should do. I've had a look through Programming Python and the Python Cookbook, which hav