File: utils.py

package info (click to toggle)
poselib 2.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,592 kB
  • sloc: cpp: 15,023; python: 182; sh: 85; makefile: 10
file content (11 lines) | stat: -rw-r--r-- 394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
def import_module_symbols(globals_dict, module, exclude=None):
    """Import all public symbols from a module into globals."""
    if exclude is None:
        exclude = set()
    
    symbols = []
    for name in dir(module):
        if not name.startswith('_') and name not in exclude:
            globals_dict[name] = getattr(module, name)
            symbols.append(name)
    return symbols