Tell me how in a python program, under certain actions, request a user password (sudo). For example, I want some files of my program to be stored in a folder in the home directory (home), for this you need to create a directory (for example / home / user / folder), how to make the system ask for a password at this moment and if it is correct created a folder? Xubuntu system 18.04. Python 2.7.
PermissionErrorwithoutsudo. It’s hard to say something if you don’t say exactly what actions you want to perform. - mkkiksudo. For example,os.system('sudo ...')orsubprocess.run(['sudo', ....]). - mkkik pm