[PySide] strange module init code?

John Ehresman jpe at wingware.com
Fri Jun 28 00:16:41 CEST 2013

On 6/27/13 4:21 PM, Matthew Woehlke wrote:
> I have a generated my_module_wrapper.cpp with code like:
>     Shiboken::AutoDecRef requiredModule(
>       Shiboken::Module::import("PySide.QtCore"));
>     if (requiredModule.isNull())
> This doesn't seem right... should this be instead throwing an exception
> (Py_FatalError) or something? Or maybe there is a 'return' missing?

This should raise a python exception and then simply return under Python 
2 and return NULL under Python 3.  It should be possible to continue 
after a import of a dependent import fails.


More information about the PySide mailing list