I have a code that makes a folder:
if not os.path.exists('C:\\Users\\MYNAME\\Documents\\Myfiles):
os.chdir('C:\\Users\\MYNAME\\Documents')
os.mkdir('Myfiles')
I want this to be able to run on any computer, so how can I get the default user without asking and doing something like:
DefaultUser = input('What is the default user for this PC?: ')
if not os.path.exists('C:\\Users\\' + DefaultUser + '\\Documents\\Myfiles'):
os.chdir('C:\\Users\\' + DefaultUser + '\\Documents')
os.mkdir('Myfiles')
EDIT: By default user, I mean the one currently running the program.