By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

removing module

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.