Still Loving Python

K

Kamilche

I switched to Python a couple years ago, and haven't looked back. I've
used Python for many applications, including several commercial plugins
for Poser. I don't post on here much, because I don't need to; working
in Python is so obvious and easy, it's rare that I get stumped by the
limitations and need help from others. I sometimes read the group to
help others, but not very often. I just wanted to let you all know that
I'm still here, and even though I'm not vocal, I DO still use Python on
a daily basis.

Python still suffers from the lack of a good GUI, which I believe is
slowing its acceptance by the programming community at large. (I know
about tKinter, no need to post links to it, thanks.)

--Kamilche
 
L

Lawrence Oluyede

Il 2005-12-13 said:
Python still suffers from the lack of a good GUI, which I believe is
slowing its acceptance by the programming community at large. (I know
about tKinter, no need to post links to it, thanks.)

Let me say I'm not agree, I'm developing a lot of GUI based stuff in PyGTK
and I'll never look back. The API is not perfect but suits our needs. I'm
a Gnome lover and hence having Gnome-style GUIs it's awesome. Add the plus
that is easy and powerful and you have a good toolkit to work on. I think
that the same thing can be said about the QT-side (not sure about wx,
don't like it at all).

Python *does* have GUI, you only have to decide which one you prefer.

ps. the customer wants Windows as a platform, we develop on Linux using
PyGTK, postgre and sql server for some old data. This is the true power of
cross-platform :)
 
I

Ivan Voras

Lawrence said:
Python *does* have GUI, you only have to decide which one you prefer.

ps. the customer wants Windows as a platform, we develop on Linux using
PyGTK, postgre and sql server for some old data. This is the true power of
cross-platform :)

Maybe the OP really wants a GUI builder.

More than 5 years ago, i programmed in Visual Basic and Delphi and I
still miss the wonderful ease of graphically creating the user interface
in WYSIWYG mode. If you haven't tried it, you don't know what you're
missing :)

I only know about Glade and similar GUI builders (Boa) and they are not
even close to the robustness & ease of use. Are there any easy GUI
builders for any Python-supported toolkits?
 
L

Lawrence Oluyede

Il 2005-12-13 said:
More than 5 years ago, i programmed in Visual Basic and Delphi and I
still miss the wonderful ease of graphically creating the user interface
in WYSIWYG mode. If you haven't tried it, you don't know what you're
missing :)

I used Delphi for some time. It's one of the best environments I've ever
used. The point is that every toolkit works in a different way. You
cannot have one toolkit to rule them all.
I only know about Glade and similar GUI builders (Boa) and they are not
even close to the robustness & ease of use.

Boa is not my tool. Glade + Pygtk (or better Gazpacho) are.
Are there any easy GUI
builders for any Python-supported toolkits?

No
 
?

=?iso-8859-1?q?J=E9r=F4me_Laheurte?=

Maybe the OP really wants a GUI builder.
More than 5 years ago, i programmed in Visual Basic and Delphi and I
still miss the wonderful ease of graphically creating the user interface
in WYSIWYG mode. If you haven't tried it, you don't know what you're
missing :)

Do you miss the 75+ attributes classes and globals as well ? I'm still
forced to work with Delphi from time to time (though whenever I can do
something in Python instead, I do) and it makes me want to throw up. Sure,
the designer is nice, but when you look at the generated code...

Sorry for the harsh tone, I just think GUI builders are *evil*. Except
maybe for QT Designer, which has a nice model where you implement
callbacks by subclassing the generated classes. At least you don't have to
look at the generated code.

Anyway, if the OP is looking for a 'Python Delphi', I think Boa
constructor is just that. I can't stand it :)
 
S

Steve Holden

Lawrence said:
I used Delphi for some time. It's one of the best environments I've ever
used. The point is that every toolkit works in a different way. You
cannot have one toolkit to rule them all.




Boa is not my tool. Glade + Pygtk (or better Gazpacho) are.




No
There's wxDesigner. It costs money, but IMHO it's well worth the
relatively modest price.

regards
Steve
 
G

gene tani

Lawrence said:
Let me say I'm not agree, I'm developing a lot of GUI based stuff in PyGTK
and I'll never look back. The API is not perfect but suits our needs. I'm
a Gnome lover and hence having Gnome-style GUIs it's awesome. Add the plus
that is easy and powerful and you have a good toolkit to work on. I think
that the same thing can be said about the QT-side (not sure about wx,
don't like it at all).

Python *does* have GUI, you only have to decide which one you prefer.

ps. the customer wants Windows as a platform, we develop on Linux using
PyGTK, postgre and sql server for some old data. This is the true power of
cross-platform :)

Here are some surveys of the landscape
http://pythonology.org/howto
http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=User
http://en.wikibooks.org/wiki/Programming:Python_GUI_Programming

http://www.awaretek.com/tutorials.html#gui
http://python.codezoo.com/pub/category/197
http://directory.google.com/Top/Computers/Programming/Languages/Python/Modules/GUI/
 
R

Ravi Teja

Nothing beats Delphi for the raw design speed and choices for GUI
development. .NET is another good option. The good news is you don't
have to loose their benefits just because we chose Python. Python for
Delphi works quite well to get you the best of both worlds. I develop
the app in Python as a library first (Python is great for quick
prototyping), make my GUI in Delphi and simply call my library from it.
Bundling Python manually into an installer can be a chore but you will
get used to it. Once IronPython is complete, it should do the same for
..NET. I currently use Boo in a similar fashion.

For simpler UIs, libglade does a great job of seperating concerns.
Are there any easy GUI
builders for any Python-supported toolkits?

Most UI toolkits have sort of builders
GTK - Glade
wxWindows - wxGlade
Fox - Fox Dialog Editor
FLTK - Fluid
TkInter - SpecTcl (I think I remember it exporting to Python)

Ofcourse, none are as robust as Delphi's.
 
M

Mike Meyer

Jérôme Laheurte said:
Sorry for the harsh tone, I just think GUI builders are *evil*.

I agree. I've tried a number of different gui builders. I find it much
faster to type something like:

ui.add_button("New", self.new)
ui.add_button("Open", self.open)
ui.add_button("Save", self.save)
ui.add_button("Save As", self.save_as)

Than have to drag four menu buttons from a pallette, then open the
properties of each one to edit the text of the button and the callback
entry (or whatever dance they need so you can enter the required
text).
Anyway, if the OP is looking for a 'Python Delphi', I think Boa
constructor is just that. I can't stand it :)

Never tried it. My experiences with GUI builders has convinced me I
don't want anything to do with them.

<mike
 
P

Peter Maas

Mike said:
I agree. I've tried a number of different gui builders. I find it much
faster to type something like:

ui.add_button("New", self.new)
ui.add_button("Open", self.open)
ui.add_button("Save", self.save)
ui.add_button("Save As", self.save_as)

Than have to drag four menu buttons from a pallette, then open the
properties of each one to edit the text of the button and the callback
entry (or whatever dance they need so you can enter the required
text).

If you design a moderately complex UI a designer will be faster. It's
not the speed of typing vs. dragging that matters. You see the result
instantly and don't have to start your program, look, type code, start
again and so on. A GUI builder is more pleasant to work with, at least
with a good one like Delphi or Qt designer.

It's not a good idea to do everything in code. I find it tiresome to
create menus and toolbars by writing code. It's not as bad as creating
an image by typing addpixel(x,y,color) a million times but it comes
close.

Creating visual resources visually is the direct way, creating them in
code is a detour. Code is too lengthy and too versatile for such a
job.
 
L

Luis M. Gonzalez

I just wanted to mention that, according to the latest news from
Ironpython's mailing list, an Ironpython plug-in for Visual Studio is
 
D

DH

Ivan said:
Maybe the OP really wants a GUI builder.

More than 5 years ago, i programmed in Visual Basic and Delphi and I
still miss the wonderful ease of graphically creating the user interface
in WYSIWYG mode. If you haven't tried it, you don't know what you're
missing :)

I only know about Glade and similar GUI builders (Boa) and they are not
even close to the robustness & ease of use. Are there any easy GUI
builders for any Python-supported toolkits?

Search for QT Designer. It's the best designer you're going to find by far.
http://www.riverbankcomputing.co.uk/pyqt/
http://www.opendocs.org/pyqt/
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

It's a shame though because pygtk and wxpython are probably better gui
apis for python, but their gui builders are no where near as nice.
QT Designer lets you drop in controls as you are designing, and THEN
apply layout constraints, instead of the reverse like in other gui
builders.
 
M

Mike Meyer

Peter Maas said:
If you design a moderately complex UI a designer will be faster. It's
not the speed of typing vs. dragging that matters. You see the result
instantly and don't have to start your program, look, type code, start
again and so on.

But you only need to do that if you're wanting near-absolute control
over what's displayed. Once you provide reasonable accessability and
configuration features - letting the user specifiy fonts, which
buttons show up, which toolbars you're going to have, what's in the
menus, etc. In this case, "look" is trivial, and it seldom requires a
second pass.
A GUI builder is more pleasant to work with, at least
with a good one like Delphi or Qt designer.

That is your opinion, and I'm sure it's true for you. It isn't true
for me.
It's not a good idea to do everything in code. I find it tiresome to
create menus and toolbars by writing code.

Maybe you're doing something wrong? Or maybe it is tiresome for you,
and you should be using something else.
Creating visual resources visually is the direct way, creating them in
code is a detour. Code is too lengthy and too versatile for such a
job.

Your application creates code in the end, so that's the direct
route. A visual representation of a modern app is a relatively static
version of the real interface, and thus at best an approximation.

Worse yet, there's a good chance your visual tool stores the
information needed to recreate either the visual version or the code
in either a binary format, or a proprietary one, or both. In the
former case, standard code analysis tools are nearly useless. In the
latter case, they own your code. While that price might be worth it if
you place enough value onj being able to manipulate images instead of
code, either is enough to make me avoid a tool.

<mike
 
I

Ivan Voras

Mike said:
That is your opinion, and I'm sure it's true for you. It isn't true
for me.

Not trying to start a war here, but I consider this discussion something
like using regular expressions vs coding string matchers by hand. Of
course a "real language" is Turing-complete and thus without doubt more
powerful than regular expressions, and certainly there are people who
always code string parsers in their language of choice, but for those
who know how to use it, regular expressions simplify the work a lot.
It's more "natural" to see:

if str.matches("\d\d\d\d"):...

than to code

if str[0] in digits && str[1] in digits && str[2] in digits && str[3] in
digits: ...

And in C, it's even more uglier. The point is: somebody had to code the
RE parser and at the end, it will all fall back to the code written in
C, for both RE and visual designer generated code.

People are visual creatures and GUI designers are simply easier to work
with. :)
 
P

Peter Decker

That is your opinion, and I'm sure it's true for you. It isn't true
for me.

Why, then, do you disparage those who like to do things differently?
Why label visual tools as "evil"? Why this need to have everyone do
things the way you do?

This sounds a lot like the tabs vs. spaces argument, or the emacs vs.
every other editor argument, in that one side seems to feel that "to
each his own", while the other side has a religious zealotry about
them that compels them to want to enforce their preferences on
everyone.

You like to write code? Great! Someone else like to use a visual
designer? Great! Just realize that UI created with visual tools can be
crap, and so can UIs written with raw code. Making fun of people whose
preferences are different than yours only makes you look insecure.
 
M

Mike Meyer

Peter Decker said:
Why, then, do you disparage those who like to do things differently?
Why label visual tools as "evil"?

I didn't label them as "evil" - I agreed with someone who did that
:).
Why this need to have everyone do things the way you do?

Whatever makes you think I have this need? I said I hated them. I'm
pretty sure I didn't say everyone should have to use them.

<mike
 
A

Alex Martelli

Jérôme Laheurte said:
Sorry for the harsh tone, I just think GUI builders are *evil*. Except
maybe for QT Designer, which has a nice model where you implement
callbacks by subclassing the generated classes. At least you don't have to
look at the generated code.

Try Interface Builder on a Mac: it builds interfaces as _data_ files,
not "generated code". You can then use the same UI from Objective C,
Java, Python (w/PyObjC), AppleScript... interface-painters which
generate code are a really bad idea. (I'm sure Apple's IB is not the
only interface-painter which encodes the UI as a datafile, easily
interpreted at startup by a suitable library for whatever language
you're using to flesh it out -- it's such an obviously RIGHT idea!).


Alex
 
K

Kamilche

Yeah, I have a system like that on my product. It's a data file loaded
at code startup time, which results in a UI - no need to cut code to
change the interface. It's saved me a lot of time.

I also have a problem with 'designers'. If the GUI designer is as easy
as making an interface was in VB6, I would like it and use it. If it's
complicated morass of sticky goo that I have to wade through at the
start of the program, like tKinter, I'd rather use pure code, or data
files.
 
P

Paul Rubin

Try Interface Builder on a Mac: it builds interfaces as _data_ files,
not "generated code". You can then use the same UI from Objective C,
Java, Python (w/PyObjC), AppleScript... interface-painters which
generate code are a really bad idea.

Glade also does something like that.

We see the same thing in HTML. Lots of people including serious
designers use wysiwyg HTML layout programs. For fancy layouts they're
almost indispensible. I hand-code my HTML but I keep it simple.
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top