Teilprozess und extra-args

Ich versuche, den folgenden code verwenden:

args = 'LD_LIBRARY_PATH=/opt/java/jre/lib/i386/:/opt/java/jre/lib/amd64/exec /opt/java/jre/bin/java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar'.split()
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Jedoch, die Ergebnisse, die ich erhalten, ist:

Traceback (most recent call last):
File "launch.py", line 29, in <module>
p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1228, in _execute_child raise child_exception
OSError: [Errno 2] No such file or directory

Ohne LD_LIBRARY_PATH Teil, es funktioniert gut. Allerdings brauche ich es. Vielen Dank für die Hilfe.

InformationsquelleAutor dbdii407 | 2011-08-02
Schreibe einen Kommentar