Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.111 diff -c -r2.111 sysmodule.c *** sysmodule.c 8 Oct 2002 02:44:28 -0000 2.111 --- sysmodule.c 8 Jan 2003 13:28:30 -0000 *************** *** 969,974 **** --- 969,977 ---- void PySys_SetArgv(int argc, char **argv) { + #ifdef MS_WINDOWS + char fullpath[MAX_PATH]; + #endif PyObject *av = makeargvobject(argc, argv); PyObject *path = PySys_GetObject("path"); if (av == NULL) *************** *** 1011,1016 **** --- 1014,1028 ---- #if SEP == '\\' /* Special case for MS filename syntax */ if (argc > 0 && argv0 != NULL) { char *q; + #ifdef MS_WINDOWS + char *ptemp; + if (GetFullPathName(argv0, + sizeof(fullpath), + fullpath, + &ptemp)) { + argv0 = fullpath; + } + #endif p = strrchr(argv0, SEP); /* Test for alternate separator */ q = strrchr(p ? p : argv0, '/');