From 4c759bf1b897b85b9689cbc68a37210f579b071f Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Thu, 25 Aug 2011 14:26:00 +0200 Subject: [PATCH] Autodetect NEPI's path --- src/nepi/util/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nepi/util/server.py b/src/nepi/util/server.py index 60b1c876..762139a1 100644 --- a/src/nepi/util/server.py +++ b/src/nepi/util/server.py @@ -835,7 +835,10 @@ def popen_python(python_code, #cmd += "if strace echo >/dev/null 2>&1; then CMD='strace -ff -tt -s 200 -o strace.out'; else CMD=''; fi\n" #cmd += "$CMD " #cmd += "strace -f -tt -s 200 -o strace$$.out " - cmd += "python -c 'from nepi.util import server; server.decode_and_execute()'" + import nepi + cmd += "python -c 'import sys; sys.path.append(%s); from nepi.util import server; server.decode_and_execute()'" % ( + repr(os.path.dirname(os.path.dirname(nepi.__file__))).replace("'",'"'), + ) if communication == DC.ACCESS_SSH: tmp_known_hosts = None -- 2.47.0