Thank you for your answer.

> Why do you think you can't have noncopyable?

I understood it prevents the registration of converters for the class. I just read the manual again and now i understand it only remove converter which copy instances, i.e. conversion of values.

Anyhow, I'd recommend trying

class_<Keyboard, noncopyable>("Keyboard", no_init);

with the rest of what you have.

That's what I initially tried. It produced runtime error:

TypeError: No Python class registered for C++ class OIS::Keyboard

Thanks to you, I know understand some points i couldn't catch reading the manual 3-4 times. I'm now able to fix the current problem by importing my module before assigning the variable 'keyboard'. Which leads me to another question : is there a way to register converters without importing the module ?


_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to