Tutorials on Windows GUI programming with Python, please?

T

Thomas Eyde

Hi all,

Are there any tutorials or other resources on Windows GUI programming?
Cross-platform code is not very interesting at this point, I would
rather have a GUI toolkit which works the Python-way, if there are any
which don't.

I have found a few tutorials on Python itself and some pointers to
different GUI toolkits, but no tutorials.

Thanks, Thomas
 
L

Larry Bates

Thomas said:
Hi all,

Are there any tutorials or other resources on Windows GUI programming?
Cross-platform code is not very interesting at this point, I would
rather have a GUI toolkit which works the Python-way, if there are any
which don't.

I have found a few tutorials on Python itself and some pointers to
different GUI toolkits, but no tutorials.

Thanks, Thomas

Get a copy of Mark Hammond's Python Programming on Win32. It has
examples using Tkinter, wxWindows, and Windows GUI via COM. IMHO
wxWindows is a good choice, but it is huge and the learning curve
is pretty steep.

Larry Bates
 
G

Gerhard Haering

[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

-- Gerhard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBkNnkdIO4ozGCH14RAomAAJ9eMNPMx+J4QsYwme3mwQlPMfXjOACeMVIh
AHzmJw/DfkoNpW/Sk5aHK+w=
=KSff
-----END PGP SIGNATURE-----
 
?

=?ISO-8859-1?Q?F=E1bio?= Mendes

Em Ter, 2004-11-09 às 15:53 +0100, Gerhard Haering escreveu:
[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

Just swap x and y axis ;-)

-Fabio
 
R

Richie Hindle

[Larry]
[...] the learning curve > is pretty steep.
[Gerhard]
Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

I think you have knowledge on the y-axis and proficiency on the x-axis.
So a steep learning curve means you need to gain a lot of knowledge before
gaining much proficiency.
 
M

Mark Jackson

Gerhard Haering said:
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

One would think so, but. . .
But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

Evidently it's

|
|
|
|
Effort |
Required |
|
|
|___________________
Capability
 
?

=?ISO-8859-1?Q?F=E1bio?= Mendes

This is how it works :)

| / (C)
| /
| /
| /
Effort | /
Required | | ____ (Python :)
| | ____/
| /___/
|/___________________
Capability

You can have the following scenarion if you put a lot of effort on the
wrong directions (ex.: learning metaclasses to do simple admin scripts),
the former lacks such ambiguity.

|
|
|
| ____ ....
Capability | /
| __ /
| / \__/
|/
|___________________
Time

Fabio
 
M

marcus

Gerhard said:
[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

-- Gerhard
Time/energy is on the y, and progress/knowledge on the x - it's
literally like a slope a wheeled vehicle would travel up :)

|_____x
|_____x
Time |_____x
Elapsed |____x_
|_x x__
|______

Progress Made

After years of searching for a way to travel the other way, to
free-wheel *down* the curve, several programming/scripting languages
have been developed that enable students to gain time and lose progress.

I believe there's no need to name any :shifty:
 
R

Rick Holbert

Think of it in these terms:

What if you have a lot of information to learn in a short period of time...

Then you would have a steep learning curve.

Rick

Gerhard said:
[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

-- Gerhard
 
J

James Stroud

I think Rick said what Larry said, but different.

However, I think the way "Learning Curve" is used in practice is to normalize
the X-axis for each learning curve at the level of minimal proficiency or
competence (and not necessarily all that there is to know about the subject).
Then plot the amount learned on the Y and interpret the slope.

Lets think of food preparation. Minimal proficiency can be acquired in two
easy steps:

1. Pour cereal.
2. Pour milk.

Very shallow learning curve for food preparation. However, one could easily
spend several lifetimes learning all there is to know about culinary arts.

Flying a jet airplane on the other hand has a very steep learning curve (path
to proficiency) that defies a simple list like the one above.

James

Think of it in these terms:

What if you have a lot of information to learn in a short period of time...

Then you would have a steep learning curve.

Rick


--
James Stroud, Ph.D.
UCLA-DOE Institute for Genomics and Proteomics
611 Charles E. Young Dr. S.
MBI 205, UCLA 951570
Los Angeles CA 90095-1570
http://www.jamesstroud.com/
 
L

Lucas Raab

Speaking of which, does anybody know if Python Programming on Win32 is in
any libraries in Illinois?? I've been searching in my local area, but no
luck. Sorry, for OT post, btw.
 
T

Tony C

When you install PythonCard, there are some sample projects which are
somewhat tutorial based.

WxPython has some tutorials on their website.

PyQT- there's a book called GUI Programming in Python (or something
close to that) which is online, and free to browse, which will show
you how to create guis using QT/PyQT.

I don't know about Tk/TkInter but would expect something to get you
started.
 
Y

Yet Another Mike

Thomas Eyde said:
Hi all,

Are there any tutorials or other resources on Windows GUI programming? ...
I have found a few tutorials on Python itself and some pointers to
different GUI toolkits, but no tutorials.

Thanks, Thomas

Ah, something I'm currently struggling with. First, I worked through a
couple of Python tutorials. Then I installed wxPython. Now, I've trying to
figure out how to use it. Lots of support tools with little documentation
for the newbie. There is all kind of stuff out there like PyCrust,
Scintilla, etc. It's really tough to figure out where or how to start. FWIW
(less than 2 cents!!), here is how I'm currently tackling wxPython:

0) Install Python, wxPython, and SPE 0.5.1.g (Stani's Python Editor from
http://www.spe.pycs.net)

1) open the Python IDLE with an edit window
this is where I write my code then F5 to run it under IDLE

2) open SPE, go to help, open wxWindows documentation.
page through it to find a function I need

3) take function I found in step 2 and go back to IDLE. Guess the form of
the function name and do a help in IDLE
e.g., I find wxFrame in wxWindows. I've learned that wxPython converts
these to names like wx.Frame. So I do
help(wx.Frame) at the IDLE >>> prompt to get the correct Python
calling sequence. Take this to step 1 and repeat.

4) Also, in another window, I have the wxPython demo running. This is also
a good place to find functions, classes, etc.

Using all the above, I've created a simple Frame with Panels and radio
controls. By following the demo and some of the tutorials, I can kind of
guess what is happening, but often have no idea of why some things don't
work (like Frame within a Frame doesn't work as expected). It's all very
much monkey see, monkey do, and if another monkey hasn't done it, you're
SOL. I've done some work under MFC with Visual C++, and miss that level of
documentation (and handholding, I know). Don't miss the high cost of VC++ or
the books.

I tried using Tools/wxGlade under SPE, but crashed it. Probably my requests
were so incredibly stupid, wxGlade couldn't take it. I could probably use
SPE for everything, but find it too overwhelming right now. Eventually, I
will use it for more than just a help file. PyCrust (or just Py now) sounds
like it might be useful, but where to start?


Anyway, here are some of the wxPython tutorials I found:

http://wxpython.org/tutorial.php
http://www-106.ibm.com/developerworks/library/l-wxpy/index.html "wxPython
for Newbies" (uses old naming convention)
http://wiki.wxpython.org/ various tutorials and docs
 
A

Antoon Pardon

Op 2004-11-09 said:
This is how it works :)

| / (C)
| /
| /
| /
Effort | /
Required | | ____ (Python :)
| | ____/
| /___/
|/___________________
Capability

You can have the following scenarion if you put a lot of effort on the
wrong directions (ex.: learning metaclasses to do simple admin scripts),
the former lacks such ambiguity.

|
|
|
| ____ ....
Capability | /
| __ /
| / \__/
|/
|___________________
Time

Fabio

No, that is not a learning curve. A learning curve has on the X-axis
the number of repetions and on the Y axis, the time to complete one
repetion. So the more you have repeated a task, the more you learned
about it, the better you became at it, the lesser time you needed
to complete it. And yes steep learning curves mean that you become
proficient at the task fast. But it is steep downwards.
 
B

Bengt Richter

Gerhard Haering said:
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

[...] the learning curve > is pretty steep.

Anybody care to explain the term "learning curve" to me?

I'd assume that you have time on the x-axis, and knowledge on the
y-axis. So a steep curve would mean that you know much in short time.

One would think so, but. . .
But that doesn't seem to be how the terms steep/flat learning curve is
used :-S

Evidently it's

|
|
|
|
Effort |
Required |
|
|
|___________________
Capability
IMO it's more like


Capability level
^
Guru --+
| __
Pro --+ /x
| |xx
| ___/xxx
Useful Wkr-+ /xxxxxxx
| __/ xxxxxxx
Newbie --+ / xxxxxxx
|/_ xxxxxxx
+------+------+-----------> Time
^ ^ ^
| | |
Job Start Project
Start Useful Deadline
Work

I.e., if you have a near deadline and have to learn a lot
in order to produce the required work (x), then d<capability>/dt
is the slope of the learning curve, and it will have to be steep.

Whether one has the horsepower for rapid ascent is another matter,
but the fun in python is a good fuel additive ;-)

Regards,
Bengt Richter
 
C

Cameron Laird

Speaking of which, does anybody know if Python Programming on Win32 is in
any libraries in Illinois?? I've been searching in my local area, but no
.
.
.
Talk to your librarian about "inter-library loan". You're
likely to gratify him or her, and you're certain to learn
something you'll find very, very valuable.
 
R

R.Marquez

Are there any tutorials or other resources on Windows GUI programming? ...
Have you seen this one.

http://www.oreilly.com/catalog/pythonwin32/chapter/ch20.html

It is the whole chapter on GUIs from the "Python Programing on Win32"
book. Please note that it is a little outdated. wxPython has had
some changes since this was written. However, it explains the basic
concepts fairly well, and those haven't changed.

Ah, something I'm currently struggling with. First, I worked through a
couple of Python tutorials. Then I installed wxPython. Now, I've trying to
figure out how to use it. Lots of support tools with little documentation
for the newbie. There is all kind of stuff out there like PyCrust,
Scintilla, etc. It's really tough to figure out where or how to start. FWIW
(less than 2 cents!!), here is how I'm currently tackling wxPython:

0) Install Python, wxPython, and SPE 0.5.1.g (Stani's Python Editor from
http://www.spe.pycs.net)

1) open the Python IDLE with an edit window
this is where I write my code then F5 to run it under IDLE

If you are going to be developing wxPython apps you shouldn't be
running them off of the IDLE IDE. The reason is that they will
conflict with one another. (Unless something has changed lately fo
which I am not aware of.) Well, you could write the code in IDLE, but
have a handy terminal window around to run the app on when ready.

-Ruben

PS: Try Boa IDE for pure wxPython development and PythonCard for a
much simpler and cleaner way of using wxPython.
 
Y

Yet Another Mike

If you are going to be developing wxPython apps you shouldn't be
Thanks. I tried to move away from IDLE IDE to SPE (Stani's Python Editor),
but it can't run PySketch (a wx sample).
I'll try Boa.

BTW, trying to keep ontopic, I'm finding that the PySketch sample is very
cleanly written and makes a good tutorial.
 
S

SM

wxPython applications are not likely to be run inside SPE/Boa as they
are themselves wxPython applications, which can conflict. In SPE
choose Tools>Run in terminal Emulator or press Ctrl+F9
Stani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top