continuous plotting with Tkinter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martin Blume

    continuous plotting with Tkinter

    I have a number-crunching application that spits out
    a lot of numbers. Now I'd like to pipe this into a python
    app and plot them using Tkinter, such as:
    $ number_cruncher | myplot.py
    But with Tkinter once I call Tkinter's mainloop() I
    give up my control of the app and I can't continue to
    read in data from stdin. Or can I? If so, how?

    Regards
    Martin



  • David Douard

    #2
    Re: continuous plotting with Tkinter

    Martin Blume wrote:
    [color=blue]
    > I have a number-crunching application that spits out
    > a lot of numbers. Now I'd like to pipe this into a python
    > app and plot them using Tkinter, such as:
    > $ number_cruncher | myplot.py
    > But with Tkinter once I call Tkinter's mainloop() I
    > give up my control of the app and I can't continue to
    > read in data from stdin. Or can I? If so, how?
    >
    > Regards
    > Martin[/color]

    Maybe the simpler is to run the Tk mainloop in a separate thread.
    You may have a look a candygram which gives a very simple to use
    multi-thread semantics (ala Haskell) and is simpler to use than the
    threading module.


    Comment

    Working...