yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #03700
Re: Another python software
> I am planning to do this is C:
> #include<yade/scripts/boon/aaa.py
huh? you mean include the .py in the c program? Why not do just this:
def myFunction():
# here, do whatever:
# find relevant data
# or return if you don't want to run at all
O.engine=[...,
PeriodicPythonRunner(command='myFunction()',iterPeriod=1,...)
]
that doesn't work?
> Why does this not work in my Yade C file? It gives segmentation fault
Sorry, I have no time to debug your codes... there is bunch of tutorial
out there on the web.
> #include "Python.h"
> Py_Initialize();
> PyRun_SimpleString("x=1");
> PyRun_SimpleString("print x");
> Py_Finalize();
References