Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to spawn a process in background within Perl+GUI script

by saintmike (Vicar)
on Apr 13, 2006 at 14:32 UTC ( #543100=note: print w/ replies, xml ) Need Help??


in reply to How to spawn a process in background within Perl+GUI script

When you're spawning a process within a program running a GUI, there's a few gotchas. You need to make sure the GUI keeps ticking and you probably need to communicate between the GUI and your extra process.

An elegant way of handling this is POE. It lets you hook into various GUI event loops (Gtk, perl/Tk, etc.). Check out this article on using POE with Gtk.

Another way of communicating between the GUI and the spawned process are watchers in the GUI, here's an article which uses an XML-defined GUI and Glib's add_watch method.


Comment on Re: How to spawn a process in background within Perl+GUI script
Download Code
Re^2: How to spawn a process in background within Perl+GUI script
by Scott7477 (Chaplain) on Apr 13, 2006 at 17:48 UTC
    The article is outstanding. What I would like to do is take the code discussed in the article and adjust it to access Yahoo's Stock Screener. The Stock Screener lets you filter and grab stock prices throughout the day by a bunch of different criteria. One can, for example, use it to download a CSV file of the latest price of every single stock on a particular exchange, such as the NYSE.

    If anyone has code that automates the interface with Yahoo Stock Screener, I'd love to see it. Otherwise, I'll put something together and post it.
Re^2: How to spawn a process in background within Perl+GUI script
by vkon (Deacon) on Apr 13, 2006 at 21:56 UTC
    I needed something much more simplistic, because this time I did not need control spawned program.

    Thanks for excellent articles, BTW!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://543100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-12-22 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (116 votes), past polls