Closed NavpreetDevpuri closed 3 years ago
Can i use os for this issue? I'm implementing it like this:
SESSIONDIR=current_local + session_dir
current
would be os.getcwd()
+ os.path.join()
and session_dir
is in the same diretory as the tithiwa.py
and the other scripts. Am I right?
os.getcwd()
can be changed and this may create problems in future.
# Now create a new directory
os.mkdir('NewDirectory')
# Change the working directory to the newly created directory
os.chdir('NewDirectory')
# Print the current working directory
print("Current working directory after changing it:")
print(os.getcwd())
look at this line it seems incorrect because if the user change folder name then it will create problems.
And add the content
SESSIONDIR=something
toconstants.py
and use it.