[Tutor] Does Python have any callback function?

Carlos Daniel Ruvalcaba Valenzuela clsdaniel at gmail.com
Sun Jan 28 22:22:32 CET 2007


That depends very much on how you are running both scripts in
parallel, if you are using Threads or process.

If using threads you can share a variable or object between the
scripts read it on A to check for updates and lock and update on B
(using semaphores for examples), there is an Event object on the
threading module but i have never used it.

If you are using process (via system call or something like that, not
threading) then you need an IPC mechanism, like sockets, signals or
RPC.

There is many ways to approach this problem really, these are just my
2 cents :-).

Good luck.

On 1/28/07, Wong Vincent <thian_seng at yahoo.com> wrote:
> Dear tutor,
>    My current application has 2 python scripts running in parallel, say
> script A and B.
> script A: GUI
> script B: data processing.
>
> A will invoke B to run. If I would like B to update processing status to
> A(so that user is able to see realtime status), how can I do it?
>
> Appreciate your guidance...
>
> Best regards
> Vincent
>
>  ________________________________
> Don't be flakey. Get Yahoo! Mail for Mobile and
> always stay connected to friends.
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
>


More information about the Tutor mailing list