[Twisted-Python] Question about processes in python

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Apr 12 09:40:02 EDT 2010

On 01:24 pm, alexandre at quessy.net wrote:
>2010/4/12 Reza Lotun <rlotun at gmail.com>:
>>>yes, I'd thought of that, but I can't get the function's code, I 
>>>the inspect module but
>>>it only works of the code is written to disk; I'd rather not have to
>>>first write the code to disk just to be able to turn it into a string
>>>and feed it to python -c. Any ideas on how I could do this?
>>You don't have to write it to disk - you can use cStringIO.
>That's interesting. :) You would write string in a string buffer
>that's in the memory, and then... how do you pass it to the child
>process? You could not get a pointer to the same location in memory,
>as far as I know. You would still need a socket, or something like
>that. Am I wrong?

Sticking with "python -c" is probably easiest.


More information about the Twisted-Python mailing list