Python Forum
Command in Bash not working in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command in Bash not working in python
#2
Try replacing your subprocess to this

subprocess.Popen("7z a -t7z Backup-01-04-18.7z *", cwd="/home/dvdsrv/stores")
Reply


Messages In This Thread
Command in Bash not working in python - by pynoob - Jan-05-2018, 04:29 PM
RE: Command in Bash not working in python - by hshivaraj - Jan-05-2018, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 654 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  Call a bash script from within a Python programme Pedroski55 6 2,577 Dec-06-2021, 01:53 PM
Last Post: DeaD_EyE
  Showing and saving the output of a python file run through bash Rim 3 2,617 Oct-06-2021, 10:48 AM
Last Post: gerpark
  How to kill a bash script running as root from a python script? jc_lafleur 4 6,122 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  Subprocess command working for one cmd and for cmd one not wrking PythonBeginner_2020 0 4,191 Mar-25-2020, 01:52 PM
Last Post: PythonBeginner_2020
  Long command with characters not working in Python on Oracle Linux 7 iaas_infra 10 6,415 Jul-19-2019, 04:53 PM
Last Post: ichabod801
  Trying to convert my Expect/bash to Python sumncguy 4 4,133 Jun-07-2019, 07:14 AM
Last Post: DeaD_EyE
  Make bash call my own Python modules Pedroski55 10 5,350 Apr-22-2019, 04:04 PM
Last Post: snippsat
  Linux command output not working adam2020 2 2,789 Mar-23-2019, 01:20 PM
Last Post: adam2020
  t.onkey command isn't working PythonSnake 2 3,130 Jan-24-2019, 08:02 PM
Last Post: PythonSnake

Forum Jump:

User Panel Messages

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