Python Forum
Pass command line argument with quotes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass command line argument with quotes
#1
I'm relatively new to Python and have googled around enough to understand in general how to use os.system and subprocess, but struggling to essentially send a command like this via my python script:

C:\Program Files\Editor\Editor.exe C:\Downloads\123.pdf

When I type that into my cmd, it opens 123.pdf with Editor.

Thanks in advance!
Reply


Messages In This Thread
Pass command line argument with quotes - by koticphreak - May-31-2019, 10:25 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to pass a mongdb command to a module and execute it. cspower 0 357 Feb-03-2024, 09:54 PM
Last Post: cspower
  How to pass encrypted pass to pyodbc script tester_V 0 912 Jul-27-2023, 12:40 AM
Last Post: tester_V
  Command line argument issue space issue mg24 5 1,395 Oct-26-2022, 11:05 PM
Last Post: Yoriz
  accept command line argument mg24 5 1,391 Sep-27-2022, 05:58 PM
Last Post: snippsat
  Why does absence of print command outputs quotes in function? Mark17 2 1,437 Jan-04-2022, 07:08 PM
Last Post: ndc85430
Question How to pass a method as argument in an another method? anilanvesh 6 2,825 Sep-30-2021, 10:18 PM
Last Post: deanhystad
  Regex - Pass Flags as a function argument? muzikman 6 3,700 Sep-06-2021, 03:43 PM
Last Post: muzikman
  Accessing varying command line arguements Rakshan 3 2,100 Jul-28-2021, 03:18 PM
Last Post: snippsat
  How to input & output parameters from command line argument shantanu97 1 2,617 Apr-13-2021, 02:12 PM
Last Post: Larz60+
  Two types of single quotes Led_Zeppelin 2 1,965 Mar-15-2021, 07:55 PM
Last Post: BashBedlam

Forum Jump:

User Panel Messages

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