importing a cython module

Asked by matthias

Hi all,
i want transfer some functions for motion and analysing to a (faster) cython coded module (shared opject motion.so). so that's an easy excercise. but while importing to yade, ther is an problem.

the module motion.so is placed in the same directory as the yade model file.
import motion
ImportError: No module named motion

same problem, i want to import other .py

curiously importing .pyc files works after a sys.path.append("./"), but not .py

it seems like a "path" error, yade looks wrongs path to find my motion.so?

Matthias

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

> it seems like a "path" error, yade looks wrongs path to find my motion.so?

If you place your .so file in standard path, where it should be, it will be imported.
I think, setting LD_LIBRARY_PATH should also help you to import your shared
library.

Anton

Can you help with this problem?

Provide an answer of your own, or ask matthias for more information if necessary.

To post a message you must log in.