Changes between Version 146 and Version 147 of UserGuideGit
- Timestamp:
- Mar 4, 2009, 8:40:01 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuideGit
v146 v147 184 184 185 185 # Launch external command 186 p = subprocess.Popen(["gphoto2", "--capture-image"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 186 args = ["gphoto2", "--capture-image"] 187 p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 187 188 188 189 # Wait end of execution … … 191 192 return p.returncode, stdout, stderr 192 193 }}} 194 195 The external program name (herre, '''"gphoto2"''') should be the first element of the list '''{{{args}}}'''; optional params (here '''"--capture-image"''') should be given as additional elements of the list. If you want to give the bracketNumber value, use '''{{{"%d" % bracketNumber}}}'''. 196 197 Under Windows, the full path of the program must be given, like '''{{{"C:\\Program Files\notepade.exe"}}}'''. 193 198 194 199 * ''Note 1: the tethered program needs to support command-line call.''