Re: Compiling Python code within a module

2007-05-19 Thread Gabriel Genellina
En Fri, 18 May 2007 20:49:33 -0300, Mitko Haralanov <[EMAIL PROTECTED]> escribió: > On 18 May 2007 15:51:40 -0700 > ici <[EMAIL PROTECTED]> wrote: > >> exec it :) > > Thank you! That works when I compile/exec it in the main body of the > program. However, when I try to do that in a separate modu

Re: Compiling Python code within a module

2007-05-18 Thread Mitko Haralanov
On 18 May 2007 15:51:40 -0700 ici <[EMAIL PROTECTED]> wrote: > exec it :) Thank you! That works when I compile/exec it in the main body of the program. However, when I try to do that in a separate module it doesn't. For example: Module Foo: import compiler class Foo: def __init__ (self)

Re: Compiling Python code within a module

2007-05-18 Thread ici
On May 19, 12:52 am, Mitko Haralanov <[EMAIL PROTECTED]> wrote: > For various reason, what I need to do is be able to send some Python > code (mostly entire functions in the form of a string) to a remote > server (written in Python), have that server compile the code and > insert it in the local na

Compiling Python code within a module

2007-05-18 Thread Mitko Haralanov
For various reason, what I need to do is be able to send some Python code (mostly entire functions in the form of a string) to a remote server (written in Python), have that server compile the code and insert it in the local namespace so it is available to be called at a later time. I have gotten

Re: compiling python code

2005-05-26 Thread Fredrik Lundh
Gabriele *Darkbard* Farina wrote: > I have a python file inside a zip file. I'd like to compile it and add > the resulting .pyc file into the zip. I tryed reading the source and > compiling it using compile(), but I don't know how to write .pyc file. > Can someone give me some help? a PYC file co

compiling python code

2005-05-26 Thread Gabriele *Darkbard* Farina
Hi, I have a python file inside a zip file. I'd like to compile it and add the resulting .pyc file into the zip. I tryed reading the source and compiling it using compile(), but I don't know how to write .pyc file. Can someone give me some help? bye, gabriele -- http://mail.python.org/mailman