Home > other >  Python read the current file path of the operation
Python read the current file path of the operation

Time:09-20

For several days did not solve
Found the Windows API GetFullPathNameA like can use but don't know how to use, or there are other better way?

Consult everybody, thank you thank you!

CodePudding user response:

Procedure is to py path?

 

The import OS
BASE_DIR=OS. The path. The dirname (OS) path) abspath (__file__))
Print (BASE_DIR)

CodePudding user response:

Not is the folder path of the current operation, such as PM on D: \ tool \ after pass the complete address to a python program
  • Related