| 457 | } |
| 458 | |
| 459 | PythonObject names_from_module(const char* module_name) |
| 460 | { |
| 461 | char buffer[strlen(module_name) + 30]; |
| 462 | snprintf (buffer,strlen(module_name) + 30, "SINGULAR_MODULE_NAME = '%s'", module_name); |
| 463 | PyRun_SimpleString(buffer); |
| 464 | PyRun_SimpleString("from sys import modules"); |
| 465 | PyRun_SimpleString("exec('from ' + SINGULAR_MODULE_NAME + ' import *')"); |
| 466 | |
| 467 | return python_eval("[str for str in dir(modules[SINGULAR_MODULE_NAME]) if str[0] != '_']"); |
| 468 | } |
| 469 | |
| 470 | void from_module_import_all(const char* module_name) |
| 471 | { |
nothing calls this directly
no test coverage detected