Python Forum

Full Version: install pacman package without password
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

First, I am French, sorry for my English Tongue

For my project, with TKinter, I need to install several packages with PACMAN, is there a command line to bypass the password ?

for an example, here is a part my code :

def InstallGedit(self, popup):
	popup.destroy()
	os.system('gnome-terminal -x sudo pacman -S gedit')
When I hit the "install" button, it calls this function, open the terminal and sends the request of install of "GEDIT" package.

I know it's not recommended but i will be the only one to use it, it's just for me.
I know th e process for modify the /etc/sudoers with visudo but it's not that i want. I just want a command line.
I know too that for allow install, we can write "yes | " before sudo pacman.... for automatically validate command.

Thanks you all.
you can try the pexpect module to insert the password into the child process
Oh thank you, i will try it :)