On 13/11/2021 10.51, Abdur-Rahmaan Janhangeer wrote:
> Greetings list,
> 
> Let's say i created a package named miaw
> 
> miaw also has a cli command called miaw
> 
> miaw prints files and folders in the directory it is called in
> 
> except that when miaw is used, it prints the files and folders in
> site-packages
> 
> This is an analogy for  a package i have.
> 
> Well forgetting about the lines above, how do i get the path from
> which miaw the command is called from?

try:

file_path = __file__
print( file_path )

and process file_path as-required.

-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to