Find the path to an IPython module in this version of IPython. This will always find the version of the module that is in this importable IPython package. This will always return the path to the ``.py`` version of the module.
(module_str)
| 94 | |
| 95 | |
| 96 | def get_ipython_module_path(module_str): |
| 97 | """Find the path to an IPython module in this version of IPython. |
| 98 | |
| 99 | This will always find the version of the module that is in this importable |
| 100 | IPython package. This will always return the path to the ``.py`` |
| 101 | version of the module. |
| 102 | """ |
| 103 | if module_str == 'IPython': |
| 104 | return os.path.join(get_ipython_package_dir(), '__init__.py') |
| 105 | mod = import_item(module_str) |
| 106 | the_path = mod.__file__.replace('.pyc', '.py') |
| 107 | the_path = the_path.replace('.pyo', '.py') |
| 108 | return the_path |
| 109 | |
| 110 | |
| 111 | def locate_profile(profile='default'): |
nothing calls this directly
no test coverage detected
searching dependent graphs…