468,303 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,303 developers. It's quick & easy.

removing module

I have static linked module in application plugin.

Thirst thing how to remove this module from memory after Py_Finalize();
Because there is segfault after - deactivate,activate this plugin.

PyImport_AppendInittab("module_name",init_module_n ame);
Py_Initialize();

How to check what provides this module ?
import sys
print sys.modules (is loaded?)

dir(module_name) is it enough?

Thanks for Help.
Bart.

Apr 30 '07 #1
1 2162
En Mon, 30 Apr 2007 18:08:30 -0300, Bart <uz***@o2.plescribió:
I have static linked module in application plugin.

Thirst thing how to remove this module from memory after Py_Finalize();
Because there is segfault after - deactivate,activate this plugin.

PyImport_AppendInittab("module_name",init_module_n ame);
Py_Initialize();
I don't understand exactly what you want to do. You have a module; it is
statically linked; using PyImport_AppendInitTab you tell Python how to
initialise it when someone imports the module.
How to check what provides this module ?
At first, you have to import the module: import module
import sys
print sys.modules (is loaded?)
After importing it, should appear in that list.
dir(module_name) is it enough?
This will show the module namespace: usually, classes and functions
defined inside it.

--
Gabriel Genellina
May 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Steven D'Aprano | last post: by
6 posts views Thread by bruce | last post: by
4 posts views Thread by Michele Simionato | last post: by
7 posts views Thread by =?Utf-8?B?Sm9lbCBNZXJr?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.