It is known that it is possible to create a new file through Python through file_create = open(r'C:\Diretório\Diretório...\FileName', 'w')
. However, it is necessary to indicate where this file will be created on the computer.
If we wanted to create a file on an unknown computer, we would download the Python program, how would that be possible? Considering that to originate content that is in a specific location and / or explain on the computer (Desktop or some folder), we need the three elements that precede the 'Desktop' in C: \ Users \ Windows 7 \ Desktop: o 'C ', the' Users', and the username used.
Is there any general command? Or ask the user where they want the data to go?