Not Monitored
Tag not monitored by Microsoft.
43,611 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to get a file path by python.
My file is in C:\Users\user1\OneDrive\Desktop\Python\test.py
when I using below code , the result is 'C:\Users\user1', cannot get the real path of the file
import os
apath=os.getcwd()
print(apath)
>C:\Users\user1
Hi @He, Hai Yun , this tag small-basic-featured-program is for Small Basic programming language, not python... I recommend you to add the not-supported tag or an appropriate tag. Thanks. By the way, are you using Visual Studio?