#4 combo box fix for cygwin

open
nobody
None
5
2002-05-02
2002-05-02
John Williams
No

On cygwin, the popup part of a combo box always
appears in the top right corner of the screen. This
is because os.name == "posix" in cygwin Python. To
fix this problem, change PmwBase.py line 234 from
this:

if os.name == 'nt':

to this:

if os.name == 'nt' or sys.platform == 'cygwin':

Discussion

  • Greg McFarlane
    Greg McFarlane
    2002-05-16

    Logged In: YES
    user_id=71522

    The value of sys.platform in the version of cygwin
    I have access to is "cygwin_nt-4.01".

    Would this be a better patch?:

    if os.name == 'nt' or \ os.name == 'posix' and \ string.find(sys.platform, 'cygwin') == 0:

     
  • John Williams
    John Williams
    2002-05-16

    Logged In: YES
    user_id=44174

    This looks good to me. As a matter of style I'd prefer
    sys.platform.startswith('cygwin'), but then again this
    method only seems to have appeared in Python 2.1; I'm not
    sure how important it is to be backward compatible.