Initialization problem of shared library in HP-UX11

gother flz at cfdrc.com
Mon Apr 1 17:14:57 EST 2002


This works in other platform. This is other thing. Another thing is
the global variables with used-defined class type belong to the big
software package. We only export a few functions to the python and
cannot modify the original package. Sometime, we even don't know how
many this kind of variables inside the packages. The global variables
are used inside the package, not explcitly used by the function we
exported to python. So no way we can put those variables inside the
module's init function.

I know windows do the initialization when it load the shared lib. In
HP, when the shared lib links to an main function, it do the same
thing. But somehow HP-UX11 failed to do it inside the python which
called shl_load function. So I guess inside the executable the shared
lib is loaded with different system function call instead of shl_load
or different arguments of shl_load. If anybody be familar with the
internal loading process of HP, he must have the answer.

Thanks of Martin's reply  


martin at v.loewis.de (Martin v. Loewis) wrote in message news:<m37knr71pl.fsf at mira.informatik.hu-berlin.de>...
> flz at cfdrc.com (gother) writes:
> 
> > Anybody know how to resolve this problem?
> 
> I recommend to initialize the variable inside the module's init
> function.
> 
> Regards,
> Martin



More information about the Python-list mailing list