hi everyone,
I am newbie in wxPython, Sorry in advance if my topic is posted
before , thou i have searched in many places and unable to find my
solution. I am trying to make a GUI in which there will be a main
layout GUI,in which one panel on the left and one panel on the right;
I want my buttons on the left and on click of each button executes
different application and get update on the right panel. each button
executes different file like in "subprocess()" but the output of the
file should update on the same right panel.Can any one help me.
Thanking you in advance for your precious help , and please dnt mind
of any mistakes in my post.
hi everyone,
I am newbie in wxPython, Sorry in advance if my topic is posted
before , thou i have searched in many places and unable to find my
solution. I am trying to make a GUI in which there will be a main
layout GUI,in which one panel on the left and one panel on the right;
I want my buttons on the left and on click of each button executes
different application and get update on the right panel. each button
executes different file like in "subprocess()" but the output of the
file should update on the same right panel.Can any one help me.
Thanking you in advance for your precious help , and please dnt mind
of any mistakes in my post.
Anil ph
What you want to do is redirect stdout to a text control. You can have
a set of buttons on the left and a multiline text control on the
right. All these controls would be on one panel. I'd probably add the
buttons to a vertically oriented BoxSizer and then add the BoxSizer
instance and the textctrl to a horizontal BoxSizer.
Anyway, I've got a couple articles that should help you figure out
some of the plumbing. This one tells you how to redirect stdout:
And this one tells you one way to grab data from a process you run
with subprocess:
If you have questions, ask them here.
···
On Jul 7, 6:25 am, anil ph <ph.anilsha...@gmail.com> wrote:
Thanks Mike,
Thanking you for the quick and immediate help.I would like to add more information on my problem which i may have missed out,sorry for this.I am using ubuntu linux , what i want to do is to update my right panel with a GUI which is define in another module in another python page . Like,I have 2/3 pages which displays different FFT displays of a signal which is implemented inside a frame.And i want to display this FFT display when i click on my button which triggers different FFTs, what i want is to update the part of the right side panel with the appropriate FFT display which is define in the another pages as a module… Hope I have narrated my requirement in a simple understandable way. Thanks in advance and please do guide me if i have made any mistakes in the post.
OK, I think basically what you'll want to do is something like:
0) Import your FFT-display making modules into your app.
1) Come up with a layout of your buttons and right hand panel that you
like (best to use wxPython sizers there, but at first you don't have
to just to get started).
2) Figure out how you are embedding your FFT displays into a wxPython
app (or maybe you have already, and that's what you mean that it is
already in a frame?).
3) Bind EVT_BUTTON events to your buttons.
4) In their event handler functions, change the display appropriately
by doing something like destroying the current FFT display, invoking
the code in the other module that creates a new one, and .Show() that
new display in/as a panel on the right hand side. (or, if they are not
newly generated from new data each time, you could just .Hide() ones
you don't want to show and .Show() ones you do)
If you are new to wxPython, each of these may generate further
questions for you, but you can Google around for answers, search the
list archive, or ask more questions. Also, trying to make a small
runnable sample for the list, if you get stuck, is a great approach.
(MakingSampleApps - wxPyWiki)
Che
···
On Thu, Jul 8, 2010 at 12:29 AM, Anil Sharma <ph.anilsharma@gmail.com> wrote:
Thanks Mike,
Thanking you for the quick and immediate help.I would like to add more
information on my problem which i may have missed out,sorry for this.I am
using ubuntu linux , what i want to do is to update my right panel with a
GUI which is define in another module in another python page .
Like,I have
2/3 pages which displays different FFT displays of a signal which is
implemented inside a frame.And i want to display this FFT display when i
click on my button which triggers different FFTs, what i want is to update
the part of the right side panel with the appropriate FFT display which is
define in the another pages as a module.... Hope I have narrated my
requirement in a simple understandable way. Thanks in advance and please do
guide me if i have made any mistakes in the post.
Thanks Mike ,
I will try to implement what you have guided me and google out which ever i may need , and if more
problem comes up you wil have to guide me again.Hope you would not mind.
Thanks mike for your immediate reply and concern over my struggle to solve my problem.