Python Forum
install pacman package without password
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
install pacman package without password
#1
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.
Reply
#2
you can try the pexpect module to insert the password into the child process
Recommended Tutorials:
Reply
#3
Oh thank you, i will try it :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem install somewhere package akbarza 1 493 Dec-27-2023, 01:25 PM
Last Post: Gribouillis
  Not able to install package caldwellpy and requirement txt file Samta282006 1 719 Dec-07-2023, 11:59 PM
Last Post: Larz60+
  Problem: Restart kernel onPydev console when trying to install a python package poppy2020 1 7,720 Nov-25-2020, 06:13 PM
Last Post: Larz60+
  invalid syntax when trying install package Omer_ 1 2,389 Jul-28-2020, 03:51 PM
Last Post: buran
  What package to install to PyCharm... REGEX or RE? charlesauspicks 4 6,162 May-23-2020, 02:36 PM
Last Post: charlesauspicks
  Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv Thisisaline 6 3,799 Jul-19-2019, 04:58 PM
Last Post: snippsat
  can't install package web in version python 3.7 a21250450 1 2,608 Mar-29-2019, 11:28 AM
Last Post: Larz60+
  PyDev package install/download at runtime user2103 0 2,484 Jan-30-2018, 08:39 AM
Last Post: user2103
  Problems installing Python - Failed to install MSI package Johnnyq70 1 4,878 Oct-29-2017, 08:50 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020