Python Forum
How to pass arguments to popen?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass arguments to popen?
#2
subprocess.Popen(['C:\Program Files (x86)\XYplorer\XYplorer.exe', myfile])
this way you pass the myfile variable, in your code (with the quotes) you pass the string 'myfile'
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
How to pass arguments to popen? - by zBernie - Jul-08-2018, 04:46 AM
RE: How to pass arguments to popen? - by buran - Jul-08-2018, 05:10 AM
RE: How to pass arguments to popen? - by zBernie - Jul-09-2018, 01:26 AM
RE: How to pass arguments to popen? - by volcano63 - Jul-08-2018, 09:58 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to pass encrypted pass to pyodbc script tester_V 0 912 Jul-27-2023, 12:40 AM
Last Post: tester_V
  Possible to dynamically pass arguments to a function? grimm1111 2 2,250 Feb-21-2021, 05:57 AM
Last Post: deanhystad
  Why Pass Functions as arguments? muzikman 14 5,834 Jan-18-2021, 12:08 PM
Last Post: Serafim
  how to pass arguments between pythons scripts? electricDesire 2 2,214 Oct-19-2020, 07:19 PM
Last Post: electricDesire
  how to pass the interactive string to Popen subprocess maiya 1 1,912 Sep-18-2020, 09:36 PM
Last Post: Larz60+
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 2,601 Sep-07-2020, 08:02 AM
Last Post: perfringo
  How to pass multiple arguments into function Mekala 4 2,498 Jul-11-2020, 07:03 AM
Last Post: Mekala
  Pass Arguments to Function phillyfa 2 2,072 Mar-27-2020, 12:05 PM
Last Post: phillyfa
  Pass by reference vs Pass by value leodavinci1990 1 2,255 Nov-20-2019, 02:05 AM
Last Post: jefsummers
  # of Positional arguments to pass for creating an object? burvil 2 3,889 Sep-09-2017, 06:43 PM
Last Post: burvil

Forum Jump:

User Panel Messages

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