What about logging to a database?
Malcolm
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
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
p
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 wrote:
> On Wed, Mar 14, 2012 at 2:55 PM, Tony Cappellini wrote:
>>
On Wed, Mar 14, 2012 at 2:55 PM, Tony Cappellini 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, not a
>
I've used the multiprocessing module to send data between processes:
http://docs.python.org/library/multiprocessing.html
But, its only in 2.6 and newer. Since they are all separate processes,
you could spawn a logging process and your worker processes as processes
that use a newer python and
> >>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 ser
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
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
bet
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 l
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 ha
10 matches
Mail list logo