trouble with Tkinter and Tix

2006-04-11 Thread CT
Hi,
I installed python 2.4.3, Tcl 8.4 Tk8.4 and also with Tix 8.4

I got some error like _tkinter.TclError:ambigous option "-col": must be
column, etc with my LabelFrame from Tix.

It seems that the python interpreter is mixing my Tix with Tkinter? If
I put Tix.LabelFrame and use import Tix instead of from Tix import *,
the problem seems to be gone.

Any idea how to fix it without editing all the codes?

thanks,
CT

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hide text in entry box when i click on it.(GUI using Tkinter in python)

2017-11-11 Thread tonysmart . ct
Thanks it was helpful
-- 
https://mail.python.org/mailman/listinfo/python-list


UnicodeDecodeError

2005-05-05 Thread thomas ct
Hi Fredrik
 
Sorry that I confused u 
Thomas Thomas wrote:>there's no way the tuple creation will generate a UnicodeDecodeError>all by itself.  are you sure the error occurs on that line?u r right, the error is not generated in tuple creation . it generated where join the strings at the line 
 
body = CRLF.join(L)
what i was trying to say was how the various tuples behave..if i use
 
file = ('file', filename, data)  #it gives me unicode error
in this case I am using binary data..
 
file = ('file', filename, 'data'*100)but the same filename works fine if i pass text data
 
file = ('file', 'test.pdf', data)
 
so if hardcode the file name /use 
filename=filename.encode("ascii") things work with binary data as well..
 
I was wondering why..
 
thanks 
Thomasimport httplib, mimetypesimport os;def get_content_type(filename):    return mimetypes.guess_type(filename)[0] or 'application/octet-stream'filepath= 'c:/Documents and Settings/Administrator/Desktop/tmp/test.pdf';f = open(filepath, "rb")data = "">f.close()(filedir, filename) = os.path.split(filepath)filename=unicode(filename);#file = ('file', filename, data)  #This won't work will give a UnicodeDecodeError: 'ascii' codec can't decode byte 0xc7 in position 10: ordinal not in range(128)file = ('file', filename, 'data'*100) #this will work fine#file = ('file', 'test.pdf', data) #This also works finefiles = [file]CRLF = '\r\n'L = []for (key, filename, value) in files:    L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))    L.append(value)body = CRLF.join(L)
		Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. Learn more.-- 
http://mail.python.org/mailman/listinfo/python-list