On Tue, 4 Sep 2012, Matthew Ngaha wrote:

a) IF you happen to have used both, which one fills you with joy and
is more fun for you to program with, GUI programming, or web related /
Framework programming?

Honestly - both. It's really a highly subjective question and depends what you want to do (although with modern browsers like Google Chrome and Firefox the line is becoming more and more blurry). If you want to provide an application that requires no interaction with the outside world, a GUI is probably a better fit and has the advantage that you'll probably only be using one language - in this case, Python ;)

But if you begin doing web programming then you'll start to learn about HTML, JavaScript, and CSS (all valuable technologies and look like they'll be here to stay!)

b) which was easier and less complex for you to learn? or should i say
had a lower learning curve? i ask this because the sooner i get an
understanding of one, i can maybe give the other one a go. But if it's
too hard i usually give 100% to it and never try learning anything
else until it computes.

Honestly, I picked up learning HTML before I learned to actually program. That's what got me interested, was being able to make small changes in the text and see large changes happen in my page. I would say as far as complexity goes, learning basic GUI programming has less "pieces". But again, both directions are perfectly valid and valuable things to learn.


my tutorial had a small section on tkinter. I have now looked for some
tutorials and noticed Python tutorials on both tkinter and Tk. As i
understand they are not the same thing but tkinter is like the
interface of Tk? my question is:

I'm sure someone has addressed this already, but Tkinter is the Python bindings for Tk/Tcl. It allows you to write Python code to do Tk things.

c) which tutorial would be better to study, Tkinter or Tk? and what
exactly is the difference? why do they have separate tutorials?

You would definitely want to focus on Tkinter - and there are quite a few good tutorials, including the effbot tutorial. That's a reference I turn to almost any time I'm doing Tkinter.

i looked at some pyQT articles, but its coding looks less organised
than Tkinter.

I wouldn't say it's less organized, but there's a *lot* more to Qt than Tkinter.

d) is this true? is Tkinter a lot more straight forward and Python friendly?

One thing I noticed about Qt is that you'll be using the Q key a lot. So your left pinky (assuming two hands and a Qwerty keyboard) will get a massive workout. It was super awkward for me while I was learning it.

e) Does pyQT have grids (rows and columns) to place your widgets on
like Tkinter, or do you have to use x and y axis to position widgets
etc..?

You can do both...

In terms of GUI frameworks, I rank them in this order from least- to most-complex:

1. Tkinter
2. wxPython
3. PyGTK+
4. PyQt

Tkinter is kinda the raw materials. You get a few widgets (though that's really grown in the past few years with ttk and tix), and some building blocks.

wxPython gives you some tools to interface with the native UI - so if you set it up right, the same Python application will look like a "real" Windows app, a "real" Gnome(GTK) app, or what have you.

PyGTK seems to me like it gives you a bit more than wx. Again, this is largely subjective. I used to do quite a bit with PyGTK. The normal GTK documentation maps quite well, though it can be a little difficult to figure out why something is doing what it's doing.

PyQt... well that's everything and the kitchen sink. I mean seriously - there's a timer widget built in! It's quite the powerhouse, but ultimately I didn't like using my left pinky to hit the Q key so much.

Before i try to learn either, GUIs or a web Framework, i was looking
into maybe getting a deeper understanding of OOP. my tutorial only
covered it briefly.

f) would this be a good idea tackling OOP next before the other 2, or
is this a skill you master with more programming experience?

I personally would consider OOP fundamentals essential to learning GUI programming with anything besides Tkinter. It's pretty easy to write procedural-ish Tkinter code.

ok my last question is not so important:) im just curious as i grow
more fond of programming. well i keep reading Python is an all-purpose
general programming language(web frameworks, desktop apps,
science/maths etc..). I notice Java has similar features so should
also be considered an all-purpose general programming language. my
question is:

g) not a comparison in 1 specific area, but which language is better
or more suited to all around all-purpose quality.

I'm sure the other folks have mentioned that Java is an extremely verbose language that (at least to me) is entirely too noisy. I did *not* enjoy the two semesters in college that I had to use it.

The term Martin Fowler uses to describe it is a "guiding" language. That means that Java has a certain way to do things and you don't really have a choice if you'd like to do it different.

Python is an "enabling" language - which in my words means "it's a language that gets out of your way". My experience is that when I write Python code I can express the solution to a problem the way I want to. If it's easier to express the solution in an OOP way, I can do that. If it's easier to express procedurally, or even functionally, I can do that too.

Which meant that it's easier to just get stuff done. I don't have to worry about how I can shoehorn the problem into something that the language can solve - I can just solve it.

So I find great joy in writing Python code, and encourage everyone to learn it.

My recommendation for you would be to learn some OOP basics, and once you feel comfortable around objects start learning Tkinter. Unless you really want to do some web programming, in which case, do that ;)

HTH,
Wayne
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to