Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
subprocess.Popen
#11
Smile 
(May-07-2018, 02:52 PM)wavic Wrote: Yes but this is not quite safe. I imagine the day I am away from the laptop and my little sister starts typing whatever she wants. Cry
No little sister at work (actually, no little sister)!

Since OP could use sudo in a app, probably that's how his user is defined.

At my employee's VMs in the lab are defined with some users sudoers - otherwise, running anything on a test server will be next to impossible - and our environment is behind VPN.

Back to our muttons - program started with sudo cannot be interrupted without it (sudo) by a regular user - that was OP's problem before he started the whole script with sudo.
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Understanding subprocess.Popen Pedroski55 6 310 May-12-2024, 10:46 AM
Last Post: Pedroski55
Information subprocess.Popen() suddenly giving me grief? davecotter 3 688 Dec-13-2023, 10:49 PM
Last Post: davecotter
  Use subprocess.Popen and time.sleep chucky831 2 1,996 Aug-11-2022, 07:53 PM
Last Post: carecavoador
  Subprocess.Popen() not working when reading file path from csv file herwin 13 15,475 May-07-2021, 03:26 PM
Last Post: herwin
  Did subprocess.Popen() causes main routine to pause stdout? liudr 4 3,718 May-04-2021, 08:58 PM
Last Post: liudr
  disable subprocess.popen prompt echo paul18fr 1 2,062 Feb-04-2021, 02:50 AM
Last Post: Larz60+
  how to pass the interactive string to Popen subprocess maiya 1 1,918 Sep-18-2020, 09:36 PM
Last Post: Larz60+
  How to get program output from subprocess.Popen? glestwid 1 2,409 Aug-19-2020, 05:44 AM
Last Post: buran
  subprocess.Popen() and encodings voltron 0 5,815 Feb-20-2020, 04:57 PM
Last Post: voltron
  Mock call to subprocess.Popen failing with StopIteration tharpa 7 6,005 Nov-08-2019, 05:00 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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