but when I run same command from PyDev I get:
/bin/sh: svn: command not found
Tried putting folder:
"/opt/subversion/bin" into PYTHONPATH but no luck. Works only if I use fullpath:
print subprocess.Popen(["/opt/subversion/bin/svn"], shell=True, stdout=subprocess.PIPE).communicate()[0]
Any suggestion how to fix my problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Traceback (most recent call last):
File "C:\workspace\PythonTestProject\pipes\pipe_test.py", line 4, in <module>
print subprocess.Popen("--help", executable="svn", stdout=subprocess.PIPE)
File "C:\Python26\lib\subprocess.py", line 595, in __init__
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 821, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
When I run next command from terminal -> no problems:
import subprocess
print subprocess.Popen(["svn info"], shell=True, stdout=subprocess.PIPE).communicate()[0]
but when I run same command from PyDev I get:
/bin/sh: svn: command not found
Tried putting folder:
"/opt/subversion/bin" into PYTHONPATH but no luck. Works only if I use fullpath:
print subprocess.Popen(["/opt/subversion/bin/svn"], shell=True, stdout=subprocess.PIPE).communicate()[0]
Any suggestion how to fix my problem?
Are your PATH/LIBPATH variables correct to support svn?
Cheers,
Fabio
This is my PYTHONPATH:
http://skitch.com/anton.shishkov/77b4/preferences
Hi,
Actually, that has nothing to do with the PYTHONPATH. What it needs to find is svn at the PATH variable.
Cheers,
Fabio
My path looks like this:
anton-shishkovs-macbook-pro:~ antonshishkov$ echo $PATH
xxx:/opt/subversion/bin:xxx
Yes, Fabio is right.
It has got nothing to do with the PYTHONPATH.
All you have to do is (if its a Windows machine), set the PATH to location where svn.exe is kept.
In my case (on Windows XP), my PATH is set to "C:\Program Files\Subversion\bin" and under "bin" directory I have my svn.exe kept.
And, inside my script I simply use:
subDirs = subprocess.Popen(["svn", "list", libPath], stdout=subprocess.PIPE)
and this works without any problem.
Cheers,
Rajat
Installed blank WinXP added SVN to PATH -> same result
Path=C:\Program Files\Subversion\bin;C:\Program Files\Java\jdk1.6.0_11/bin;C:\ma
ven/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
print subprocess.Popen("svn --help", stdout=subprocess.PIPE).communicate()[0]
Traceback (most recent call last):
File "C:\workspace\PythonTestProject\pipes\pipe_test.py", line 4, in <module>
print subprocess.Popen("--help", executable="svn", stdout=subprocess.PIPE)
File "C:\Python26\lib\subprocess.py", line 595, in __init__
errread, errwrite)
File "C:\Python26\lib\subprocess.py", line 821, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified