Python Forum
How to launch a program through python script - Mac OS Mojave
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to launch a program through python script - Mac OS Mojave
#2
"input_file" is embedded as a string, it's not used as a variable. You need to do string formatting like so:
"voronota get-balls-from-atoms-file --annotated < {}".format(input_file)
Note that code like this is subject to security issues if anyone can specify the filename. Not likely an issue but hard to not at least bring up here.
Reply


Messages In This Thread
RE: How to launch a program through python script - Mac OS Mojave - by micseydel - May-07-2019, 09:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on first Python launch garryp4 5 216 May-07-2024, 03:56 PM
Last Post: deanhystad
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,401 Jun-29-2023, 11:57 AM
Last Post: gologica
  Launch Python IDLE Shell from terminal Pavel_47 5 1,305 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Launch Windows Application OEMS1 0 2,167 Mar-26-2021, 07:42 PM
Last Post: OEMS1
Photo Python won`t launch error newbieee 0 1,802 Feb-02-2021, 11:51 PM
Last Post: newbieee
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,985 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  Launch another python command without waiting for a return. SpongeB0B 13 11,091 Jun-18-2020, 10:45 AM
Last Post: Yoriz
  win32 API: Launch Application to RDP session from background process python script rangeshgupta 0 2,188 May-28-2020, 09:41 PM
Last Post: rangeshgupta
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,335 May-28-2020, 05:27 PM
Last Post: micseydel
  Why my program works from script but not from GUI? Matgaret 0 1,558 Dec-13-2019, 01:51 PM
Last Post: Matgaret

Forum Jump:

User Panel Messages

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