Import/Create module from buffer

2008-05-12 Thread Gruik
Hi people, I'm currently working on python embedding with C++. My goal is that the C++ part handle files writing/reading so that the Python part only works with buffers. I succeeded in buffer exchanges. The problem is that some of the files I read/write are python files so that, before

Re: Import/Create module from buffer

2008-05-12 Thread Gruik
On May 12, 12:31 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 12 May 2008 05:49:22 -0300, Gruik [EMAIL PROTECTED] escribió: I'm currently working on python embedding with C++. My goal is that the C++ part handle files writing/reading so that the Python part only works

Re: Import/Create module from buffer

2008-05-12 Thread Gruik
On May 12, 1:48 pm, Irmen de Jong [EMAIL PROTECTED] wrote: Gruik wrote: But before that 1 question: what if I'm in Python ? Following your solution, I did that in Python :     def load_buffer(buffer) :         compiled_buffer = compile(buffer, module_name, exec)         exec