I have a program which makes use of the current working directory.
The path of the file that im running is: /home/pi/Test/file.py
When running os.getcwd() the path returned is /home/pi/
the path i want is /home/pi/Test
what am i missing?
osDir = os.getcwd()
month = osDir + "/" + month
print (osDir)
print (month)
if not os.path.exists(month):
os.makedirs(month)
Using Python3 .
The command to run the file is pi@raspberrypi:~ $ python3 TEST/file.py