diff options
Diffstat (limited to 'plugin_python.c')
| -rw-r--r-- | plugin_python.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin_python.c b/plugin_python.c index dada5dc..0f52bb3 100644 --- a/plugin_python.c +++ b/plugin_python.c | |||
| @@ -2,7 +2,13 @@ | |||
| 2 | #include <stdio.h> | 2 | #include <stdio.h> |
| 3 | #include "trace-cmd.h" | 3 | #include "trace-cmd.h" |
| 4 | 4 | ||
| 5 | #ifndef PYTHON_DIR | ||
| 6 | #define PYTHON_DIR . | ||
| 7 | #endif | ||
| 8 | |||
| 5 | static const char pyload[] = | 9 | static const char pyload[] = |
| 10 | "import sys\n" | ||
| 11 | "sys.path.append(\"" MAKE_STR(PYTHON_DIR) "\")\n" | ||
| 6 | "import imp, tracecmd, ctracecmd\n" | 12 | "import imp, tracecmd, ctracecmd\n" |
| 7 | "fn = r'%s'\n" | 13 | "fn = r'%s'\n" |
| 8 | "file = open(fn, 'r')\n" | 14 | "file = open(fn, 'r')\n" |
