How to prepare and use scripts separately

12 views
Skip to first unread message

TSUBOTA Masami

unread,
Apr 4, 2012, 2:58:33 PM4/4/12
to wxpytho...@googlegroups.com
Dear all,

I'm quite a new comer for wxPython and this is my first post in this ML. :-)

I want to make scripts for the main GUI frame and an about dialog separately
like the following:
* main.py
* about.py

I confirmed that each script run in a normal way.

What I want to know is that how to call about.py from main.py.
Do you have any suggestions or direct a useful web site?

Thank you in advance.

Wishes,
Masa

Robin Dunn

unread,
Apr 4, 2012, 3:15:42 PM4/4/12
to wxpytho...@googlegroups.com

The same way you would with any other Python code, such as things in the
standard library or from wxPython. You import the things from the
module where they live into the module where you need to use them, and
then you use them normally. For example:

import about
...

dlg = about.AboutDialog(...)

--
Robin Dunn
Software Craftsman
http://wxPython.org

TSUBOTA Masami

unread,
Apr 5, 2012, 3:38:04 AM4/5/12
to wxpytho...@googlegroups.com
Dear Robin,

Thank you for your reply.

It worked!

And after that, I found so many sample codes in my PC,
i.e., wxPython2.8 Dos and Demos folder. I would somehow
make my own GUI programs by arranging/assembling
the sample dodes.

How do you think which is the best text book or web site
explaining wxPython systematically?

Anyway, thank you again.

Wishes,
Masa


2012/4/5 Robin Dunn <ro...@alldunn.com>:

> --
> To unsubscribe, send email to wxPython-user...@googlegroups.com
> or visit http://groups.google.com/group/wxPython-users?hl=en

Werner

unread,
Apr 5, 2012, 6:33:41 AM4/5/12
to wxpytho...@googlegroups.com
On 05/04/2012 09:38, TSUBOTA Masami wrote:
> Dear Robin,
>
> Thank you for your reply.
>
> It worked!
>
> And after that, I found so many sample codes in my PC,
> i.e., wxPython2.8 Dos and Demos folder. I would somehow
> make my own GUI programs by arranging/assembling
> the sample dodes.
>
> How do you think which is the best text book or web site
> explaining wxPython systematically?
There are THE books:

wxPython in Action - by Robin Dunn and Noel Rappin
wxPython 2.8 - by Cody Precord

Other sources:
http://zetcode.com/wxpython/
http://www.blog.pythonlibrary.org/
http://wiki.wxpython.org/

on the wiki to start with:
http://wiki.wxpython.org/How%20to%20Learn%20wxPython
http://wiki.wxpython.org/Using%20wxPython%20Demo%20Code

Werner

Robin Dunn

unread,
Apr 5, 2012, 12:09:18 PM4/5/12
to wxpytho...@googlegroups.com
On 4/5/12 3:33 AM, Werner wrote:
> On 05/04/2012 09:38, TSUBOTA Masami wrote:
>> How do you think which is the best text book or web site
>> explaining wxPython systematically?
> There are THE books:
>
> wxPython in Action - by Robin Dunn and Noel Rappin
> wxPython 2.8 - by Cody Precord

Just for the record, the full title of Cody's book is "wxPython 2.8
Application Development Cookbook"

There are publisher and Amazon affiliate links at the bottom of the main
http://wxPython.org/ page.

TSUBOTA Masami

unread,
Apr 6, 2012, 11:52:22 AM4/6/12
to wxpytho...@googlegroups.com
Dear Werner and Robin,

Thank you so much for your fruitful replies.

I didn't noticed that Robin is THE author of THE book.
I ordered Robin's book. :-)

I will also visit the web sites which Werner told me.

The problem for us, the Japanese, is that resources
about python written in Japanese is not too much.

Cheers,
Masa


2012/4/6 Robin Dunn <ro...@alldunn.com>:

Patrick Maher

unread,
Apr 6, 2012, 1:02:11 PM4/6/12
to wxpytho...@googlegroups.com
As a place to get started, I recommend the online tutorial http://www.zetcode.com/wxpython/. I found Robin's book very useful after I had worked through that.

Patrick
Reply all
Reply to author
Forward
0 new messages