Changes between Version 141 and Version 142 of UserGuideGit
- Timestamp:
- Mar 2, 2009, 1:19:41 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuideGit
v141 v142 168 168 169 169 # Launch the external command 170 p = subprocess.Popen(["gphoto2", "--capture-image"], stdout=subprocess.PIPE )170 p = subprocess.Popen(["gphoto2", "--capture-image"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 171 171 172 172 # Wait end of execution 173 p.wait()174 175 # Return result ( must be a tuple containing an int and a string)176 return p.returncode, p.stdout.read() 173 stdout, stderr = p.communicate() 174 175 # Return result (a tuple containing retcode, stdout and stderr) 176 return p.returncode, p.stdout.read(), p.stderr.read() 177 177 }}} 178 178