Nov. 3, 2015
1:22 a.m.
On 2015-11-03 00:02, Greg Ewing wrote:
Terry Reedy wrote:
'' is not very informative ;-). I suspect the full path added in the past, but it is not now. import os; os.getcwd() works better
You misunderstand. The point is *not* to find the cwd, it's to find the directory containing the main script, so you can load resources related to it.
There are probably other and possibly better ways to go about that, but it works and is sometimes used. The proposed change would break it.
I use os.path.dirname(__file__) in the main script.