0

Hi,

My project requires me to read in multiple ascii files and process them. So I am going to go through the data and using conditional statements store the result in lists. After this, I need to store this data and plot some of it using matlab and display the matlab graph and relevant data on a display.

I have learnt python and in the process of learning wxPython for my GUI. However, i have some queries:

In order to display the result do you need to (read data in - process - write and store - read in and display on GUI?)

With wxPython is it possible to say click on the button and "transition" to another panel/frame or window. So think of it as a page 2. So i have 9 small cards with results and on button click need to go to page 2 for details.

Is it possible to have the 'live graph' in wxPython. I mean it reads data and dynamically changes?

My primary focus right now is how to integrate my processed data into the GUI.

Any help would be appreciated.

Thanks

2
Contributors
1
Reply
29
Views
4 Years
Discussion Span
Last Post by vegaseat
0

You could try wxPython's excellent tabbed notebook widget ...

    ''' pwx_Notebook_simple1.py
experiments with wxPython's wx.Notebook() widget
wx.Notebook(parent, id, pos, size, style, name)
tab position style=wx.NB_TOP is default
others are wx.NB_BOTTOM, wx.NB_LEFT or wx.NB_RIGHT

tested with Python273 and wxPython291

For Python32 downloaded the most recent
wxPython-Phoenix-r73709-win32-py3.2.tar.gz
from
http://wxpython.org/Phoenix/snapshot-builds/
then simply extracted the wx folder to
C:\Python32\Lib\site-packages

note from vegaseat: also available for Python33 now
'''

import wx

class MyPanel(wx.Panel):
    """
    each panel instance gives the notbook page content and color
    """
    def __init__(self, parent, bgcolor, toolbar=False):
        wx.Panel.__init__(self, parent, wx.ID_ANY)
        self.SetBackgroundColour(bgcolor)


app = wx.App(0)

# create an instance of a frame, no parent
caption = "testing simple wx.Notebook()"
frame = wx.Frame(None, -1, caption, size=(400,300))
# create an instance of a notebook, parent is the frame
notebook = wx.Notebook(frame, -1)
# create an instance of MyPanel
# each panel instance has the content and colour of a notebook page
panel1 = MyPanel(notebook, "yellow")
panel2 = MyPanel(notebook, "green")
panel3 = MyPanel(notebook, "red")
# now create the notebook pages
# add the panel content and title to each page
notebook.AddPage(panel1, "Page1")
notebook.AddPage(panel2, "Page2")
notebook.AddPage(panel3, "Page3")

# add a label to one of the panels (pages)
# the label will auto size to fit text
text = "What time does the two o'clock bus leave?"
label_1 = wx.StaticText(panel1, wx.ID_ANY, text)


frame.Show(True)
app.MainLoop()

Edited by vegaseat

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.