# running on Windows XP, Python 3.1 from tkinter import * from tkinter import ttk # repair def fix_Tcl_string_error(s): if '\\' in s and not ' ' in s: return '{'+s+'}' else: return s # the root root = Tk() root.geometry('+300+300') # a frame f1 = ttk.Frame(root) f1.pack() # a combobox cb = ttk.Combobox(f1,width=72) cb.pack() # the problem test_strings = [r'C:\Python31\Lib\tkinter\test\test_ttk', # path, no spaces r'C:\Documents and Settings\Administrator\desktop', # path with spaces 'oneword', 'two words', 'this /3 that', 'special* character?', r'escaped\? special\\ characters\*' ] # make repairs ##test_strings = [fix_Tcl_string_error(s) for s in test_strings] # add to combo box cb['values'] = test_strings cb.current(0) # run root.mainloop()