I have been using Python for years and I love it. I'm trying to use wxPython for the past few days and I'm absolutely smashing my head into a brick wall! How in the world do you learn this library? I've done every tutorial and looked at many of the included demos. I've bought the "wxPython in Action" book and would gladly pay GOOD MONEY to learn what I need to know. I want to master this thing. But I'm at my wits end!
Here is the simple (or so I thought) GUI I am attempting to build. I want three main panels on splitters. I also need a menu bar and status bar. But I have all of that layout working already. Where I am struggling is filling those panels with text/tree widgets and figuring out how the heck to tie everything together with my model.
The first (#1 top left) panel will have a few check boxes and a tree viewer (filled by the model of files on disk.) Clicking on leaves on the tree will activate the second (#2 top right) window to display the appropriate widget for that leaf (or file type from the model.) Some leaves will have configuration pages (checkboxes and dropdowns) and others will have a report list. The bottom panel (#3) will have a scrolling log file, which could simply be the redirection of stdout/stderr, or I could fill it from my logger (in the model) directly. It must scroll like a console window. I feel like I could inherit PyOnDemandOutput() but I can't figure out how to do it.
What do you think? How can I learn this library to accomplish this task?
Maybe the MediaLocker demo might help you get going.
Your #2 and #3 are in medialocker the dialogs which open when you edit, there is no reason that they couldn't have been done as a pane showing up next to the objectlistview (a listctrl wrapper we used).
I have done a shareware with wxPython and wanted to re-write it using better programming techniques and the above was kind of a proof of concept which was inspired by Mike's blog post and by the thread "Separating GUI code from Logic" on this list.
I would also suggest to start what you want to do and when you run against the wall (or better shortly before you hit it:-) ) you put the question/problem in a post here with some sample code (MakingSampleApps - wxPyWiki) and I am sure someone on this list will help you get around the wall.
Wow! Thanks! I will will definitely check that out. This is what I need, more exposure will help. I will definitely post code samples when I have a sticky issue, but my problem right now is trying to understand the “theory of operation” or larger picture. Usually by this time into a project it starts to make sense but with this one the plot just seems to thicken. I did have a major breakthrough last night however, got #1 somewhat working and #3 totally done. By the end of this project I think I will have to write a book to help out beginners because this is a great tool.
···
On Saturday, February 2, 2013 5:14:27 AM UTC-6, werner wrote:
Hi David,
On 02/02/2013 04:49, David Lynch wrote:
Hi everyone,
I have been using Python for years and I love it. I’m trying to use
wxPython for the past few days and I’m absolutely smashing my head
into a brick wall! How in the world do you learn this library? I’ve
done every tutorial and looked at many of the included demos. I’ve
bought the “wxPython in Action” book and would gladly pay GOOD MONEY
to learn what I need to know. I want to master this thing. But I’m
at my wits end!
Here is the simple (or so I thought) GUI I am attempting to build. I
want three main panels on splitters. I also need a menu bar and
status bar. But I have all of that layout working already. Where I
am struggling is filling those panels with text/tree widgets and
figuring out how the heck to tie everything together with my model.
The first (#1 top left) panel will have a few check boxes and a tree
viewer (filled by the model of files on disk.) Clicking on leaves on
the tree will activate the second (#2 top right) window to display the
appropriate widget for that leaf (or file type from the model.) Some
leaves will have configuration pages (checkboxes and dropdowns) and
others will have a report list. The bottom panel (#3) will have a
scrolling log file, which could simply be the redirection of
stdout/stderr, or I could fill it from my logger (in the model)
directly. It must scroll like a console window. I feel like I could
inherit PyOnDemandOutput() but I can’t figure out how to do it.
What do you think? How can I learn this library to accomplish this task?
Maybe the MediaLocker demo might help you get going.
Your #2 and #3 are in medialocker the dialogs which open when you edit,
there is no reason that they couldn’t have been done as a pane showing
up next to the objectlistview (a listctrl wrapper we used).
I have done a shareware with wxPython and wanted to re-write it using
better programming techniques and the above was kind of a proof of
concept which was inspired by Mike’s blog post and by the thread
“Separating GUI code from Logic” on this list.
I would also suggest to start what you want to do and when you run
against the wall (or better shortly before you hit it:-) ) you put the
question/problem in a post here with some sample code
(http://wiki.wxpython.org/MakingSampleApps) and I am sure someone on
this list will help you get around the wall.