On Windows XP - I've got a program running which has spawned a process
using os.spawnv().
My program has a logger object instantiated that I want to pass to the
process that was spawned.
I need to log errors seen by the process, to the same logfile that the
program uses for logging.
I have the
Without getting into too philosophical of a discussion, the only sense
in which objects can truly move from one process to another is
recreating them in the other process. Even fork() makes copies of
everything.
Have you tried pickle or other techniques of serialization? Not sure
offhand if the
Tony Cappellini wrote:
On Windows XP - I've got a program running which has spawned a process
using os.spawnv().
My program has a logger object instantiated that I want to pass to the
process that was spawned.
That's impossible. Objects are just memory, and memory cannot be shared
between
depends what you mean by share logger object, you might be able to
have logger on both apps share a common log file.
OTH if you want realtime events, I pass a socket from one app to
another and have implemented a proxy dialog so one app writes to the
progress dialog proxy and it in turn sends data
On Wed, Mar 14, 2012 at 2:55 PM, Tony Cappellini cappy2...@gmail.com wrote:
in which objects can truly move from one process to another is
recreating them in the other process. Even fork() makes copies of
everything.
Recreating an object in another process means it's a different object,
If you are really just logging, use separate loggers/files, sync the
clocks, and timestamp records, then merge when you are ready to
process if you need timeline related results.
On Wed, Mar 14, 2012 at 1:29 PM, Preston Landers pland...@gmail.com wrote:
On Wed, Mar 14, 2012 at 2:55 PM, Tony
Thanks for all the advice.
The solution is simple, but neither elegant nor Pythonic. It's a kludge,
but will suffice.
The process simply opens writes a 1 line log file, then closes it. The
process also increments a counter
each time the log file is written, and writes the counter value to the