The type of a tkinter StringVars and IntVars?
bob at passcal.nmt.edu
Fri Oct 22 18:23:43 CEST 2004
Oooo. You are very smart (and have saved the project :).
Right there on pg 20 of Essential Reference. Tsk tsk tsk on me.
"Steven Bethard" <steven.bethard at gmail.com> wrote in message
news:mailman.5287.1098400041.5135.python-list at python.org...
> Bob Greschke <bob <at> passcal.nmt.edu> writes:
>> How would I do the same thing if
>> a = IntVar()
>> and then do
>> if type(a) == IntVar:
> I don't do much GUI programming, but I believe you're looking for
> the 'isinstance' function:
>>>> class IntVar(object):
> ... pass
>>>> a = IntVar()
>>>> isinstance(a, IntVar)
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
More information about the Python-list