I run Python file from cmd and I need a path where I opened cmd
C:\Users\test\Desktop\> D:\DEV\test.py
I need C:\Users\test\Desktop\ path
I'm not sure I fully understand the question but, to get the current working dir for the one containing your script you can use:
import os
print(os.getcwd())
You can find more information in the Python Docs