Changes between Version 144 and Version 145 of UserGuideGit
- Timestamp:
- Mar 2, 2009, 4:01:34 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuideGit
v144 v145 153 153 It can be usefull to call an external program to make tethered shooting, instead of using the Merlin/Orion triggering. 154 154 155 If a '''{{{shoot.py}}}''' python script is found in the user config. dir, the functions '''{{{mirrorLockup( stabilizationDelay)}}}''' and '''{{{shoot(bracketNumber)}}}''' contained in this script will be called instead of internal ones.155 If a '''{{{shoot.py}}}''' python script is found in the user config. dir, the functions '''{{{mirrorLockup()}}}''' and '''{{{shoot(bracketNumber)}}}''' contained in this script will be called instead of internal ones. 156 156 157 157 Here is a minimalistic example script (here, we use '''gphoto2''' as tethered shooting program): … … 161 161 import subprocess 162 162 163 163 164 def mirrorLockup(): 165 """ Lockup the mirror. 166 167 @return: error code, stdout, stderr 168 @rtype: tuple of int, str, str 169 """ 170 164 171 # See shoot() function 172 return 0, "", "" 165 173 166 174 167 175 def shoot(bracketNumber): 168 169 # Launch the external command 176 """ Shoot. 177 178 @param bracketNumber: number of the current bracket picture 179 @type bracketNumber: int 180 181 @return: error code, stdout, stderr 182 @rtype: tuple of int, str, str 183 """ 184 185 # Launch external command 170 186 p = subprocess.Popen(["gphoto2", "--capture-image"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 171 187 … … 173 189 stdout, stderr = p.communicate() 174 190 175 # Return result (a tuple containing return code, stdout and stderr) 176 return p.returncode, stdout, stderr 191 return p.returncode,stdout, stderr 177 192 }}} 178 193