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)
| 92 | |
| 93 | |
| 94 | def get_ipython_module_path(module_str): |
| 95 | """Find the path to an IPython module in this version of IPython. |
| 96 | |
| 97 | This will always find the version of the module that is in this importable |
| 98 | IPython package. This will always return the path to the ``.py`` |
| 99 | version of the module. |
| 100 | """ |
| 101 | if module_str == 'IPython': |
| 102 | return os.path.join(get_ipython_package_dir(), '__init__.py') |
| 103 | mod = import_item(module_str) |
| 104 | the_path = mod.__file__.replace('.pyc', '.py') |
| 105 | the_path = the_path.replace('.pyo', '.py') |
| 106 | return py3compat.cast_unicode(the_path, fs_encoding) |
| 107 | |
| 108 | def locate_profile(profile='default'): |
| 109 | """Find the path to the folder associated with a given profile. |
no test coverage detected