Hi all,
I'm a recent, belated convert from Perl. I work in a physics lab and
have been using Python to automate a lot of measurement equipment
lately. It works fabulously for this purpose. Recently I've wanted to
start writing GUIs for some of my programs, for data visualization and
to make the programs easier to use for some of my co-workers.
So far I've experimented with two Python GUI toolkits: Tkinter and
PyGTK. I've had some issues with each:
* PyGTK - not very "pythonic", in my opinion. Have to use get_ and
set_ methods rather than properties. Have to write ugly things like
textview.insert (textview.get_e nd_iter(), ...) to append text to a text
buffer. No useful doc strings, which makes experimenting with new
widgets in IPython a huge pain. The toolkit feels very "heavyweigh t".
I don't want to write an XML file and an "action group" just to make a
piddly little menubar with 10 items.
I'm an avid Gnome fan, and love the professionalnes s and completeness
of GTK, but PyGTK seems frustratingly C-like compared to the
wonderfully designed high-level abstractions I've come to love in
Python!
* TkInter - Seems easy to learn, and better for quick "lightweigh t"
GUIs. I wrote a complete working instrument GUI in less than a day of
figuring things out. Not very Pythonic in terms of creating and
modifying widgets. No factory functions to quickly create menu items.
My biggest problem with Tkinter is that it is very unreliable under
Cygwin: programs freeze and slow intermittently and the tkMessageDialog
stock dialog boxes show no visible text.
So, is there another toolkit I should be looking at? Having something
that can run easily on Cygwin and native Windows is a priority so that
I can quickly move programs to new measurement computers. I like GTK a
lot and Tk is growing on me too.. are there any higher-level "wrapper"
toolkits for GTK and Tk?
Thanks for any advice!
Dan Lenski
University of Maryland 161 5366
Dan Lenski wrote:
So, is there another toolkit I should be looking at?
I highly recommend wxPython. It's very mature, full-featured, and
portable, and fairly easy to learn as well. I can't really compare it to
other toolkits (not having used any of them, except Tkinter), but it's
definitely one of the most popular and well-supported ones out there. http://www.wxpython.org/
John Salerno wrote:
Dan Lenski wrote:
So, is there another toolkit I should be looking at?
I highly recommend wxPython. It's very mature, full-featured, and
portable, and fairly easy to learn as well. I can't really compare it to
other toolkits (not having used any of them, except Tkinter), but it's
definitely one of the most popular and well-supported ones out there.
http://www.wxpython.org/
I highly recommend that you try PythonCard (which sits on top of
wxPython). You can get productive very very quickly. Take a look at: http://pythoncard.sourceforge.net/walkthrough1.html
John Salerno <jo******@NOSPA Mgmail.comwrote :
Dan Lenski wrote:
So, is there another toolkit I should be looking at?
I highly recommend wxPython.
I'd second that!
There is a book also
"WxPython in Action" http://www.amazon.com/Wxpython-Actio.../dp/1932394621
Which is certainly my preferred way of learning new stuff!
It's very mature, full-featured, and portable, and fairly easy to
learn as well.
....with native look and feel on each platform unlike GTK / TK
It has got a huge set of widgets and an excellent demo program in
which you can try them all out and steal their code.
There are some bits of it in which the C++ heritage sticks out, but
over the years the toolkit designers have been tucking those under the
carpet. The MethodNaming is a bit odd too!
A minor annoyance is that there are a number of features which only
work on a subset of the platforms. These are well documented though.
IMHO the best of the toolkits, but it is a personal choice and yours
may differ!
There is also PyQT which we wrote off as we wanted to write commercial
applications too. As it happens we have a commercial QT licence, but
we decided we didn't want to have to incurr the additional expense of
renewing it.
--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Nick Craig-Wood a écrit :
There is also PyQT which we wrote off as we wanted to write commercial
applications too. As it happens we have a commercial QT licence, but
we decided we didn't want to have to incurr the additional expense of
renewing it.
Note: Nothing in the GPL prevents you from writting commecial software ;)
Christophe <ch************ *@free.frwrote:
Nick Craig-Wood a écrit :
There is also PyQT which we wrote off as we wanted to write commercial
applications too. As it happens we have a commercial QT licence, but
we decided we didn't want to have to incurr the additional expense of
renewing it.
Note: Nothing in the GPL prevents you from writting commecial
software ;)
A completely valid point!
s/commercial applications/closed source applications/ would be more
accurate.
However, in this case, our customer didn't want the source code
released as it contained some of their confidential stuff.
--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Nick Craig-Wood wrote:
>>So, is there another toolkit I should be looking at?
I highly recommend wxPython.
I'd second that!
There is a book also
"WxPython in Action"
Oh yeah, how could I forget "The Book"! :) It's great to read straight
through, and also a fantastic reference, and covers just about all there
is to know to get very far in wxPython.
Can anyone find a flaw with this change in syntax?
Instead of dividing a compound statement with a colon, why not divide it
on a newline? For example, the colon could be dropped from this statement:
if self.hungry:
self.eat()
to
if self.hungry
self.eat()
Python is already sensitive to whitespace and the newline anyway, so why
not put it to good use? For example, Python rejects this statement
because of the newline present:
if self.hungry or
self.depressed:
self.eat()
You need to use the backslash to continue the expression on the next line:
if self.hungry or \
self.depressed:
self.eat()
The colon that divides the statement therefore seems redundant. The
colon could continue to be used for single-line statements:
if self.hungry: self.eat()
I think the colon could be omitted from every type of compound
statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything?
Thanks,
- Mike
In <ma************ *************** ************@py thon.org>, Michael Hobbs
wrote:
Python is already sensitive to whitespace and the newline anyway, so why
not put it to good use? For example, Python rejects this statement
because of the newline present:
if self.hungry or
self.depressed:
self.eat()
You need to use the backslash to continue the expression on the next line:
if self.hungry or \
self.depressed:
self.eat()
You don't need the backslash if you use parenthesis:
if (self.hungry
or self.depressed) :
self.eat()
I think the colon could be omitted from every type of compound
statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything?
I would miss auto-indenting in my editor to which the colon at the line
end is an important clue.
Ciao,
Marc 'BlackJack' Rintsch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Greg Scharlemann |
last post by:
I am attempting to upload a picture to a webserver and create a
thumbnail from the picture uploaded. The problem comes in when I
attempt to create an Image object from the File object (which is the
location of the uploaded picture)...I get the following error:
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at...
|
by: Martin Bless |
last post by:
The good news:
Along with Python-2.4 comes really good news to Windows users. Yes,
you now CAN build extension modules yourself using the SAME C++
compiler and linker Python is built with itself. Everything you need
is available at no costs (except download hassle and installation
time). Once your system is set up properly its just a matter...
|
by: Chive Software |
last post by:
Chive Software are pleased to announce a new version of its Apoc PDF
Toolkit, part a of its Apoc suite of products.
Apoc PDF Toolkit is a high quality software component that developers
can add to their applications in order to manipulate existing PDF
documents and create new PDF documents. Developed using Microsoft's
..NET environment,...
|
by: Ney André de Mello Zunino |
last post by:
Hello.
I gladly learned yesterday that Microsoft was making the Visual C++
Toolkit 2003 available for free. Today, I downloaded and installed it
and went on to try building some simple applications. I quickly found
out that the toolkit does not come with the multi-threaded versions of
the runtime, such as the one I needed to build a...
|
by: Alex |
last post by:
Hi there
I'm switching from VC++ 6.0 to VC++ .NET 2003. Since there is no stand-alone
version of VC++ .NET 2003 Pro, I went and purchased the Standard version,
which does not have an optimizing compiler.
I have been made aware of the existence of the VC++ Toolkit 2003:
http://msdn.microsoft.com/visualc/vctoolkit2003/
| |
by: miffy900 |
last post by:
Will there be a Visual C++ Toolkit 2005?
I really appreciated that there was the Visual C++ 2003 Optimising Compiler
distributed for free in the 2003 Toolkit.
Will Microsoft continue with this toolkit? Or will it be mainly focused on
the 'Express' edition of Visual C++?
|
by: Rental |
last post by:
I'm having the sam problem as described below with the Localization
toolkit. Does anyone know if there is a solution to this problem.
--->When attempting to generate resource dlls with
--->LocalizationManagement.exe, I get an exception:
--->Unable to generate loose file resources
|
by: krishnakant Mane |
last post by:
hello all.
after finishing a project in record time using python we have taken up
one more project.
this time however, we need to do a gui based project which will run
on windows xp and 2000.
now My question is which gui toolkit should I choose?
I had initially raised some doubt about accessibility (which is very
important for me ), and...
|
by: Anthony Irwin |
last post by:
Hi All,
I am currently trying to decide between using python or java and have
a few quick questions about python that you may be able to help with.
#1 Does python have something like javas .jar packages. A jar file
contains all the program files and you can execute the program with
java -jar program.jar
I am sort of hoping python has...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |