Changeset 1ca493a for src/Python
- Timestamp:
- Jun 25, 2020, 8:26:37 PM (5 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- b56827
- Parents:
- 912a6f
- git-author:
- Frederik Heber <frederik.heber@…> (04/16/19 23:09:54)
- git-committer:
- Frederik Heber <frederik.heber@…> (06/25/20 20:26:37)
- Location:
- src/Python
- Files:
-
- 2 edited
-
Makefile.am (modified) (1 diff)
-
PythonScripting.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Python/Makefile.am
r912a6f r1ca493a 19 19 noinst_LTLIBRARIES += libMolecuilderPython.la 20 20 libMolecuilderPython_la_includedir = $(includedir)/MoleCuilder/ 21 libMolecuilderPython_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(PYTHON_INCLUDE_DIR)21 libMolecuilderPython_la_CPPFLAGS = $(AM_CPPFLAGS) $(BOOST_PYTHON_CPPFLAGS) 22 22 libMolecuilderPython_la_LDFLAGS = $(AM_LDFLAGS) $(BOOST_PYTHON_LDFLAGS) 23 23 libMolecuilderPython_la_LIBADD = \ 24 24 $(BOOST_PYTHON_LIBS) \ 25 $ {CodePatterns_LIBS}\26 -l$(PYTHON_LIB)25 $(BOOST_PYTHON_LIB) \ 26 ${CodePatterns_LIBS} 27 27 28 28 nobase_libMolecuilderPython_la_include_HEADERS = ${PYTHONHEADER} -
src/Python/PythonScripting.cpp
r912a6f r1ca493a 54 54 { 55 55 try { 56 #ifdef HAVE_PYTHON2 56 57 PyImport_AppendInittab( "pyMoleCuilder", &initpyMoleCuilder ); 58 #else 59 PyImport_AppendInittab( "pyMoleCuilder", &PyInit_pyMoleCuilder ); 60 #endif 57 61 58 62 Py_Initialize(); … … 66 70 main_namespace["pyMoleCuilder"] = molecuilder_module; 67 71 68 std::string enveloped_script("print \"BEGIN of "+python_scripttitle+":\"\n");72 std::string enveloped_script("print(\"BEGIN of "+python_scripttitle+":\")\n"); 69 73 enveloped_script += python_string+std::string("\n"); 70 enveloped_script += std::string("print \"END of "+python_scripttitle+":\"\n");74 enveloped_script += std::string("print(\"END of "+python_scripttitle+":\")\n"); 71 75 72 76 boost::python::handle<> ignored(( PyRun_String( enveloped_script.c_str(),
Note:
See TracChangeset
for help on using the changeset viewer.
