Changeset 1251 for python


Ignore:
Timestamp:
Nov 9, 2017, 11:02:54 AM (8 years ago)
Author:
dmik
Message:

Make sys.executable work for fancy python exe names on OS/2.

Closes #277.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Modules/getpath.c

    r391 r1251  
    170170
    171171
     172#ifndef PYOS_OS2
    172173static int
    173174isxfile(char *filename)         /* Is executable file */
     
    182183    return 1;
    183184}
     185#endif
    184186
    185187
     
    424426#endif
    425427
     428#ifdef PYOS_OS2
     429    /* This will search for prog in PATH and leave progpath empty on failure */
     430    _path2(prog, ".exe", progpath, MAXPATHLEN);
     431#else
    426432        /* If there is no slash in the argv0 path, then we have to
    427433         * assume python is on the user's $PATH, since there's no
     
    472478        else
    473479                progpath[0] = '\0';
     480#endif /* PYOS_OS2 */
     481
    474482#ifndef ALTSEP
    475483        if (!IS_ABSPATH(progpath) && progpath[0] != '\0')
Note: See TracChangeset for help on using the changeset viewer.