June 22nd, 2005, 05:14 AM
Request cvs data
I want to write a program that returns all file that have been commited after a certain date.
I walk through the path with os.path.walk and tried to invoke something like:
The problem now is that the program does not return after executing os.execl
os.execl("c:\\cvs\\cvs.exe", "cvs", "log", file)
Is there an other possiblity to do that?
June 22nd, 2005, 06:19 AM
Check out popen in the same os module or the popen2 module or the subprocess module (Python 2.4).
Last edited by Grim Archon; June 22nd, 2005 at 06:20 AM.
Reason: misspelt Python!
June 22nd, 2005, 07:33 AM
Now I tried something like:
Originally Posted by Grim Archon
The process now returns but I get an error message:
f = os.popen(cvsExe + "log " + file, "w")
How can I read what the cvs returns?
IOError: [Errno 9] Bad file descriptor
June 22nd, 2005, 07:58 AM
I found a solution:
Originally Posted by Wizard2003
p = subprocess.Popen([cvsExe, "log", file, stdout=subprocess.PIPE)
cvsResult = p.communicate()
Comments on this post