[issue11290] ttk.Combobox['values'] String Conversion to Tcl

Clayton Darwin report at bugs.python.org
Fri Feb 25 21:39:52 CET 2011


Clayton Darwin <claytondarwin at gmail.com> added the comment:

This is a simple work around.  

def fix_tcl_error(s):

    if '\\' in s and not ' ' in s:
        s = '{'+s+'}'

    return s

You can get the text from the Combobox with no issues.  The error is in posting it to the Combobox when you have backslashes and no spaces (I think).  I have just been running everything through this def before adding it.  It has worked with no problems so far using Windows paths and grep-type search strings.

CD

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11290>
_______________________________________


More information about the Python-bugs-list mailing list