Changes between Version 141 and Version 142 of UserGuideGit


Ignore:
Timestamp:
Mar 2, 2009, 1:19:41 PM (16 years ago)
Author:
Frédéric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuideGit

    v141 v142  
    168168
    169169    # 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)
    171171
    172172    # 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()
    177177}}}
    178178