简体   繁体   中英

How to know the correct location of File Path in python?

I have a code as shown below, but I dont know the exact location of the given file. How to find the exact location of file? In code, they have used join method.

       ```
       Code:
       kmatrixconfigxlsx = os.path.join('.', "Polarion_InterfacesSSD.xlsx")
       signalmatrixconfigxlsx = os.path.join('.', "SignalMatrice.xlsx")
       sstconfigxlsx = os.path.join('.', "SST.xlsx")

       Output:
       '.\\Polarion_InterfacesSSD.xlsx'
       ```

Could you let me know, where the exact file location will be?

os.getcwd() shows the current directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM