Python Forum
How to excess external program and get a value back?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to excess external program and get a value back?
#5
Label: Shutter Speed
Type: RADIO
Current: 1/8

Label: Shutter Speed
Type: RADIO
Current: 1/8
with
command = check_output(["gphoto2","--get-config","/main/capturesettings/shutterspeed"])
output = command.decode().strip()
print output.split(' ')
i got:

[u'Label:', u'Shutter', u'Speed\nType:', u'RADIO\nCurrent:', u'1/8']

now i have to print only the last one somehow :D

got it :)

command = check_output(["gphoto2","--get-config","/main/capturesettings/shutterspeed"])
output = command.decode().strip()
output = output.split(' ')
print(output[-1])
Reply


Messages In This Thread
RE: How to excess external program and get a value back? - by hhanswurster - Jun-12-2018, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I can't read data from the clipboard in an external program AlekseyPython 1 2,649 Mar-19-2019, 07:56 AM
Last Post: buran
  How can I move in an external program via Python? Pythoner 0 2,295 Dec-29-2018, 12:43 PM
Last Post: Pythoner
  Embedding Args in external program call brizflysdrones 5 4,939 May-09-2017, 08:29 PM
Last Post: buran
  input-external program-output baolevani 2 3,983 Mar-27-2017, 04:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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