> >>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, not a shared one.
> > >>Have you tried pickle or other techniques of serialization? Not sure > >>offhand if the logger module supports pickle but it might. > Yes. I've just tried this, even though I expected it not to work. If process A pickles a logger object, and process B unpickles it, referencing of an object in a different process is meaningless. In my case, when the process attempted to write to the logger, no entries were seen in the logfile. Surprisingly, no exceptions occurred- but this could just be a coincidence. >>You can always just create a new logger object using the same > >>parameters as the original (filename, etc), right? >>Or am I missing something? > That may work, and with less effort than my original idea. But if two processes write to the logfile at the same time (especially on a multicore machine), hard-to-read logfiles may result. it's worth a try. It would be great if the process could pass the info to be written to the logfile, back to its creator and let the creator do all the writing.
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32