| Conditions | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | #!/usr/bin/env python |
||
| 7 | @public |
||
| 8 | def issharedobject(obj): |
||
| 9 | """return True if module is shared object (*.so)""" |
||
| 10 | if not obj: |
||
| 11 | return False |
||
| 12 | module = inspect.getmodule(obj) |
||
| 13 | if not module: |
||
| 14 | return |
||
| 15 | path = getattr(module, "__file__", None) |
||
| 16 | if path: |
||
| 17 | return os.path.splitext(path)[1] == ".so" |
||
| 18 | return False |
||
| 19 |