You are not logged in.

#1 2010-02-06 00:20:14

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

How to design a GUI Python app properly?

Hi guys. As motivation to actually learn Python, I want to carry out a fairly simple application that's been brewing in my head for months; a "game manager" that a gamer can use to keep track of the games he owns, the games he's beaten, and any specific challenges he's completed in said games.

The problem is that I can't seem to wrap my head around Python. I look through its docs to solve problems but I almost always end up lost. I come from PHP, which is supposedly sloppy, but it's also very easy to get almost anything done quickly. In my frustration, I proved that I could get more progress in 15 minutes in PHP than I had gotten in 2 hours in Python. I was right, but I know that PHP isn't the right tool for the job. I want to make an actual desktop application that relies on an sqlite db.

With my frivolous backstory out of the way, could anyone offer any enlightenment on Python? I've tried the tutorials, I've tried the docs... where can I go to learn not only how to code my app, but how to design it? Design is more important than syntax, imo, because it relies on concepts which form the foundation of whatever app you're building.

I can post an overview of how I want the app to behave, if that would help others advise me on how to build it in Python. I'd really like to pick the language up, but it's being anything but "easy to learn".

Offline

#2 2010-02-06 00:28:35

tomd123
Developer
Registered: 2008-08-12
Posts: 565

Re: How to design a GUI Python app properly?

imo, if you can't pick up python after trying, your next move should be to drop the thought of creating this gui program now, and focus on smaller programs. Read the python tutorial, read a book, code something smaller, get comfortable. Then once you think you have a handle on python, go back and focus on your program. You will have to learn a gui library once you do jump into it immediately, which will probably be a little painful.
do project euler #'s 1-40 if you want to get a little comfortable with python. Don't just code python the "php way" but rather, try using python constructs which will open your eyes to the simplicity of python.

Offline

#3 2010-02-06 01:56:13

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: How to design a GUI Python app properly?

Curiosity.  Is PHP the only "programming" language you know?

Offline

#4 2010-02-06 02:00:30

sdolim
Member
Registered: 2010-01-20
Posts: 67

Re: How to design a GUI Python app properly?

I recommend http://www.diveintopython.org to get "into" Python quickly.

Also, when it comes to GUIs, your choice of framework (e.g. Qt, wxwidget, etc) affects your app design as much as the language.

Offline

#5 2010-02-06 03:46:28

Michael C.
Member
From: Vancouver, BC
Registered: 2009-12-16
Posts: 33

Re: How to design a GUI Python app properly?

Design doesn't come all at once, in my experience, especially in Python, where there aren't many restrictive constructs (interfaces/strict typing, access levels, etc.). Really, the best way I've found of creating an application is to not think about the details until I have to.

Offline

#6 2010-02-06 03:59:12

Eratosthenes
Member
Registered: 2009-11-02
Posts: 19

Re: How to design a GUI Python app properly?

This is a pretty good free book on python: http://www.greenteapress.com/thinkpython/thinkCSpy/

Offline

#7 2010-02-06 04:16:55

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: How to design a GUI Python app properly?

You can give a try of Glade. It's a library can help you to build GUI interfaces in python.

Offline

#8 2010-02-06 04:32:48

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: How to design a GUI Python app properly?

If you ever write this program I would love to use it to track my progress for Touhou Project games.

Last edited by zowki (2010-02-06 04:33:05)


How's my programming? Call 1-800-DEV-NULL

Offline

#9 2010-02-06 05:05:51

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: How to design a GUI Python app properly?

Are you sure you've read the helpful tutorial? If you can't grasp it, perhaps PHP has finally penetrated the shell of coding sense surrounding your brain and started eating. wink (I used to be close to that point. Now I believe Python is god.)

Oh, and never start with something as big as a full-blown graphical application. Trust me, it is never as simple as it first seems when you conceive the idea. Start with small, one-file utilities and work your way up from there. Consider downloading the full documentation so you always have a local copy.

And remember: If your code seems ugly, it probably is. There is almost always a better way in Python.

Last edited by Peasantoid (2010-02-06 05:14:43)

Offline

#10 2010-02-07 10:16:37

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: How to design a GUI Python app properly?

tomd123: I tried my hand at Euler's problems, but I'm horribly stuck on #3 and it's making me feel pretty dumb. Perhaps I am, due to Algebra 1 being my highest math course. Anyways, how is this going to help me learn the language?

Trent: Yes, PHP is the only language that I have enough skill in to make things without consulting a reference every 5 minutes.

zowki: I'll be sure to PM or e-mail you if I ever make it. smile

edit: solved #3.. not looking forward to #4.

Last edited by xelados (2010-02-07 11:25:33)

Offline

#11 2010-02-07 15:13:06

linkmaster03
Member
Registered: 2008-12-27
Posts: 269

Re: How to design a GUI Python app properly?

A lot of people say to use Project Euler, and it may help some learn a language, but I could never get into it. When I was a beginner in Python, I just wrote whatever program came to mind. I wrote little scripts that made everyday tasks a little bit faster. You will get more comfortable with the language and then you can move on to writing GUIs when you feel ready.

Last edited by linkmaster03 (2010-02-07 15:14:24)

Offline

Board footer

Powered by FluxBB