[Tutor] gnuplot from a python gui

spir denis.spir at free.fr
Sat Nov 8 22:05:02 CET 2008


dwbarne at earthlink.net a écrit :
> Hello tutors,
> 
> I'm trying to generate a plot using gnuplot from within a python gui. In Windows, if after the plot is drawn I use a raw_input string demanding a 'RETURN' be hit, the plot will persist on the screen until the 'RETURN' is pressed. In  *nix, one can use the 'persist' switch to easily and much more elegantly accomplish the same.
> 
> My question is, is there a better way IN WINDOWS to keep the plot on the screen rather than having to leave the gui and find the console window in which a 'RETURN' must be pressed to continue? My gui will not 'quit' until I enter the 'RETURN' in the console window. Kind of a chintzy way to end the gui, really.
> 
> There must be a better way than using raw_input???
> 
> Daniel B.

Maybe a stupid question: as your application has a GUI, why do you use this 
raw_input() trick? As far as I know, this is a way to let the console open at 
the end of execution so that the user can watch results (otherwise it's autom. 
closed). What's the point in doing that in a GUI app?
Denis



More information about the Tutor mailing list