Getting Directory of Command Line Entry Point For Packages

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Nov 13 02:11:06 EST 2021


On 13/11/21 7:23 pm, Abdur-Rahmaan Janhangeer wrote:
> os.getcwd is giving the path of site-packages and not
> the directory from
> which the command is run from.

Something must be changing the working directory before getcwd
is called. Once that happens there's no way I know of to find
out what it was. You'll have to capture it earlier in the process
somehow and pass it to where it's needed.

-- 
Greg


More information about the Python-list mailing list