2009/7/30 Johnny Vestergaard :
> Hi,
>
> I recently upgraded from Python 2.4 to Python 2.6.2 and have had some
> unexpected issues with unicode.
>
> I had the following code working properly in 2.4:
>
> ---code start---
> import Tkinter
> import tkFileDialog
> root = Tkinter.Tk()
> input_files = tk
Johnny Vestergaard skrev:
I dident really find out why this happens, but figured out a workaround:
def string2list(input_string):
input_string = input_string.lstrip('{')
input_string = input_string.rstrip('}')
output = input_string.split('} {')
return output
import Tkinter
import tk
Hi,
I recently upgraded from Python 2.4 to Python 2.6.2 and have had some
unexpected issues with unicode.
I had the following code working properly in 2.4:
---code start---
import Tkinter
import tkFileDialog
root = Tkinter.Tk()
input_files = tkFileDialog.askopenfilenames(filetypes = [('.TXT f
Thanks to both Sorin and Cameron for the lambda trick which did the job.
Sorin Schwimmer skrev:
lambda is your friend:
optiondict[option].bind("", lambda t='this is a string i want to pass':
self.newdestination(t))
HTH
SxN
__
Hi all,
I played a little to see how one could write gui-building code with Tkinter
in a more 'declarative' way, sorta like a DSL,
and also - and more importantly - less redundant.
After a few iterations I got this:
# code begin
top = Tk( 'top' ) # first argument of any widget is the name