[Tutor] Checking if a GtkEntry is empty
Anthony Papillion
papillion at gmail.com
Sat Feb 25 00:02:47 CET 2012
Hi Everyone,
I'm learning pyGtk and am developing my first application. I'm trying to
check if a GtkEntry is empty and I'm using the following code:
if txtSearch.get_text() == "":
print "The entry is empty"
This didn't work. So I thought, maybe I need to reference self and tried:
if self.txtSearch.get_text() == "":
print "The entry is empty"
Neither worked. What am I doing wrong?
Thanks1
Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120224/999a0d7c/attachment.html>
More information about the Tutor
mailing list