Author pablogsal
Recipients lkollar, ncoghlan, ned.deily, pablogsal, ronaldoussoren, vstinner
Date 2019-03-18.23:10:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If we set argv0 to ".":

             if (_Py_wgetcwd(fullpath, Py_ARRAY_LENGTH(fullpath))) {
                argv0 = fullpath;
                n = wcslen(argv0);
             else {
                argv0 = L".";
                n = 1;

then the caller does not have any way of knowing if the returned argv0 is due
to the fact that _Py_wgetcwd failed so it will blindly add "." to sys.path unless
we set the result using PyObject** and then returning some error code to signal
what happened (or something similar). On the other hand, I do not like this API,
because returning some error code != 0 from _PyPathConfig_ComputeArgv0 would be
weird because the call actually succeeded (it has returned "." as the value for argv0).

What do you think is the best way to signal pymain_run_python that the current directory
does not exist (because _Py_wgetcwd has failed)?
Date User Action Args
2019-03-18 23:10:07pablogsalsetrecipients: + pablogsal, ronaldoussoren, ncoghlan, vstinner, ned.deily, lkollar
2019-03-18 23:10:07pablogsalsetmessageid: <>
2019-03-18 23:10:07pablogsallinkissue36236 messages
2019-03-18 23:10:07pablogsalcreate