Changeset f230d92 in git for Singular/dyn_modules/python/python_module.cc
- Timestamp:
- Mar 1, 2017, 5:47:39 PM (7 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
- Children:
- dc29160a567b9e04c172ea21b48f03a654afd0a8
- Parents:
- 4d24f6272fb2b5388b2a23b455a78b4439e1eece
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/python/python_module.cc
r4d24f6 rf230d92 9 9 #include <Python.h> 10 10 #include <kernel/mod2.h> 11 #include < tok.h>11 #include <Singular/tok.h> 12 12 #include <kernel/structs.h> 13 13 #include <Singular/mod_lib.h> 14 #include < ipid.h>14 #include <Singular/ipid.h> 15 15 16 #include < locals.h>16 #include <Singular/locals.h> 17 17 #include <omalloc/omalloc.h> 18 18 … … 58 58 extern "C" int SI_MOD_INIT(python_module)(SModulFunctions* psModulFunctions) 59 59 { 60 char *py=getenv("PYTHONPATH"); 61 char buf[1024]; 62 if (py!=NULL) 63 { 64 strcpy(buf,py); 65 strcat(buf,":"); 66 strcat(buf,feResource('s',FALSE)); 67 } 68 else 69 strcpy(buf,feResource('s',FALSE)); 70 Print("setting PYTHONAPTH to %s\n",buf); 71 setenv("PYTHONPATH",buf,1); 72 60 73 Py_Initialize(); 61 74 PyRun_SimpleString("from sys import path\n\
Note: See TracChangeset
for help on using the changeset viewer.