View Full Version : GUIs
Halide
10-01-2002, 10:23 AM
anyone know of some GUI resources for Python?
I'm gonna browse around now...
/me likes GUIs :)
Halide
10-01-2002, 10:45 AM
woot
I found something interesting... python ROX :)
URL - http://www.wxpython.org/
Halide
10-01-2002, 10:58 AM
now if only I could compile a python program with the GUI lib in the same executable :)
Halide -> look into py2exe
http://starship.python.net/crew/theller/py2exe/
Halide
10-01-2002, 02:08 PM
sweet, thx for link kmj
1 question tho: can you have the python.dll inside the exe?
sorry if that's a dumb question
--
also
--
i want to create my first python (whole) program from a TI-BASIC calculator program i made a while ago
basically you enter a WordFind puzzle and it lets you search for the words, and tells you where it is.
i want a grid of text or something, maybe with actual grid lines between them...was wondering if there's an easy way to do that :)
also, i could draw an arrow or something on the word? how can you do that in wxPython ?
i'm gonna start messin with it now :P
Halide: py2exe makes it so you can have on exe that doesn't depend on anything else, so you can put it on different computers and use it. Note that it won't make the application any faster, as all it does is stick the python dll (and other required dlls) in a executable.
I'm sure you can do it, but I've never used wxPython. It shouldn't be hard, but you're probably going to have to draw it all yourself. Like I said, I've never used wxPython, but to see how easy it is to do in Tkinter, check this out ....
My Tkinter TicTacToe example (http://codeexamples.org/cgi-bin/c2h/hl.cgi?filename=TkTacToe.py&type=HTML-detail)
If you search around, you should be able to find docs for wxWindows.
inkedmn
10-01-2002, 02:26 PM
actually, py2exe does create one .dll file that must be present to execute the program (usually python2#.dll - # = version).
i've been meaning to toy about with wxpython myself. jython/swing too :)
[edit]
http://wiki.wxpython.org/
a wxPython tutorial
oh, whoops. It's been a while . :)
darelf
10-03-2002, 09:41 AM
PyQt
If you do not speak PyQt, you are missing the absolute, hands-down best GUI available for Python.
I also use py2exe and have a script derived called qt2exe that packages up everything and then use Inno to make an installer for windows boxes.
It is muy cool. It is generally faster than the alternatives (other than Tk, but that's another story), and has more features even than wxPython. It also looks and acts cleaner on most systems. (There is a free version of Qt for windows, it's the "non-commercial" version.)
Supposedly Gtk+-2.0 works well on windows also.... I haven't tried it, yet.
Halide
10-03-2002, 11:13 AM
Originally posted by darelf
PyQt
If you do not speak PyQt, you are missing the absolute, hands-down best GUI available for Python.
I also use py2exe and have a script derived called qt2exe that packages up everything and then use Inno to make an installer for windows boxes.
[snip]
woohoo, darelf!
and I just found out how much better it is ;) thanks a ton
it even has a full book to learn both Python AND PyQt...awsome... If i get $45 to spare i might buy it, but, until then, I'll just read it online.
http://www.opendocspublishing.com/pyqt/index.lxp?lxpwrap=book1%2ehtm
----
can you spare some more info on py2exe and inno, please?
I actually bought that; but I haven't had a chance to read it.
darelf
10-03-2002, 01:13 PM
Inno Setup
http://www.jrsoftware.org/isinfo.php
Very cool windows installer.
There are good docs for py2exe that gives you all the options and stuffs.... just can't remember where I put them.
Basically, in the script for making your app you need to pull in the qt libraries or it forgets the qt dlls.... but that may have been fixed recently (I can't remember right off).
Halide
10-03-2002, 01:39 PM
cool - thx again
i'll fiddle with python/qt/inno now :P
GnuVince
10-03-2002, 01:56 PM
Hum, how about use the right GUI for the right job?
If I had to create a simple software that I wanted to run on any platform that supports Python, I'd use Tkinter.
If you want something more advanced (cause Tk is quite limited), you can look into GTK+ and QT.
darelf
10-03-2002, 03:51 PM
Well... now this may sound strange... but if my needs are that simple... I'll use tclkit... it is a single executable that has Tcl/Tk, metakit and a few other extensions all in one. Write your simple Tcl script and off you go. Distribution is just the tclkit exe and the script file.
Tk is very, very fast... but really only usable in the simple case (although I use it every day, since most of my stuff is simple case).
And tclkit can handle ODBC work ( http://tclodbc.sourceforge.net ) so I can now use it for my database work here... (yay!)
But once your application moves beyond the simple, you will desperately want all the features of Python and a good GUI (a la Qt/GTK+) as Tcl lacks things like classes.....
GnuVince
10-03-2002, 05:51 PM
darlef: Do you know TK well enough? I'm trying to add two things to my entry in the contest vs inkedmn. If you can help me, I'd like it.
Halide
10-03-2002, 07:08 PM
hmm
seeing as how I can't get Qt installed since I don't have VISUAL STUDIO 6 :eh:
I'll try tcl/tk stuff ;)
GnuVince
10-03-2002, 07:55 PM
Halide: tcl is another programming language. You probably want to try Python/Tkinter if you wanna stick with Python.
Halide
10-03-2002, 08:09 PM
Originally posted by GnuVince
Halide: tcl is another programming language. You probably want to try Python/Tkinter if you wanna stick with Python.
aha! my newbiness shines ;)
thx...
darelf
10-04-2002, 09:12 AM
There is a Qt non-commercial version for windows that is a prepackaged binary (no need to compile).
If you install that, plus the SIP/PyQt stuff from riverbank, it will work with Python.
GnuVince.... what's the problem? Can you email me? ( finkbeid@bellsouth.net )
Halide
10-04-2002, 10:53 AM
Originally posted by darelf
There is a Qt non-commercial version for windows that is a prepackaged binary (no need to compile).
If you install that, plus the SIP/PyQt stuff from riverbank, it will work with Python.
GnuVince.... what's the problem? Can you email me? ( finkbeid@bellsouth.net )
I couldn't find any prepackaged binary from their site. It said something like "requires Microsoft Visual Studio 6" on the "binary download" whatever that means.
What is SIP? Is BlackAdder a good IDE/UI designer?
darelf
10-04-2002, 12:46 PM
Ok... I'm beginning to think that pointing you at Tk (a la, Tkinter) is a better idea.
The note is for if you are compiling it with C++. Which you won't be. You'll be installing SIP and PyQt (which is the glue that allows you to use Qt from Python, instead of C++).
Start here:
http://www.riverbankcomputing.co.uk/pyqt/index.php
You download the Windows package for the version of Python you have installed (i.e. Py2.2)
It's all very simple. I swear.
Halide
10-05-2002, 12:17 AM
yeah, but now it says i'm missing a dll :p
darelf
10-07-2002, 09:03 AM
The answer to every windows question:
reboot?
After that, just re-read the docs.
If nothing else, use Tkinter instead. Not as full-featured, but guaranteed to work on almost every platform that Python works on. (Obviously, it doesn't work on Palm, etc)
Halide
10-07-2002, 09:36 AM
Sorry for not updating my situation -- I got it to work after rebooting...
I'll probably mess with Tkinter.
I just recently got Debian `woody' with kde and a bunch of cool stuff installed. :)
[edit] (thanks strike for some help!)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.