Python Forum
need a little with python3.5 oprnibg other program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need a little with python3.5 oprnibg other program
#1
Hi,
  Sorry no code, been looking for some type of code to open and run other programs on win 7.
I made a very nice control program that does what ever I till it to do. One of the things I want
it to do is run exe programs. Is their a way to open and run, let say MS paint.
Thank you
renny

my code here
Reply
#2
Quote:Is their a way to open and run, let say MS paint.
Use subprocess.
Open Ms paint.
C:\1
λ ptpython
>>> import subprocess

>>> subprocess.run(['mspaint.exe'])
Open a image in folder C:\1 with mspaint.
C:\1
λ ptpython
>>> import subprocess

>>> subprocess.run(['mspaint', 'C:/1/wx16.jpg'])
CompletedProcess(args=['mspaint', 'C:/1/wx16.jpg'], returncode=0)
Reply
#3
Hey, snippsat that works very well Thank you very much .
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 4,973 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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