Show More
@@ -8,9 +8,14 b' from warnings import warn' | |||||
8 | import IPython |
|
8 | import IPython | |
9 | from IPython.utils.importstring import import_item |
|
9 | from IPython.utils.importstring import import_item | |
10 | from IPython.utils.path import ( |
|
10 | from IPython.utils.path import ( | |
11 | get_home_dir, get_xdg_dir, get_xdg_cache_dir, compress_user, _writable_dir, |
|
11 | get_home_dir, | |
12 | ensure_dir_exists, fs_encoding) |
|
12 | get_xdg_dir, | |
13 | from IPython.utils import py3compat |
|
13 | get_xdg_cache_dir, | |
|
14 | compress_user, | |||
|
15 | _writable_dir, | |||
|
16 | ensure_dir_exists, | |||
|
17 | ) | |||
|
18 | ||||
14 |
|
19 | |||
15 | def get_ipython_dir() -> str: |
|
20 | def get_ipython_dir() -> str: | |
16 | """Get the IPython directory for this platform and user. |
|
21 | """Get the IPython directory for this platform and user. | |
@@ -103,7 +108,8 b' def get_ipython_module_path(module_str):' | |||||
103 | mod = import_item(module_str) |
|
108 | mod = import_item(module_str) | |
104 | the_path = mod.__file__.replace('.pyc', '.py') |
|
109 | the_path = mod.__file__.replace('.pyc', '.py') | |
105 | the_path = the_path.replace('.pyo', '.py') |
|
110 | the_path = the_path.replace('.pyo', '.py') | |
106 | return py3compat.cast_unicode(the_path, fs_encoding) |
|
111 | return the_path | |
|
112 | ||||
107 |
|
113 | |||
108 | def locate_profile(profile='default'): |
|
114 | def locate_profile(profile='default'): | |
109 | """Find the path to the folder associated with a given profile. |
|
115 | """Find the path to the folder associated with a given profile. |
General Comments 0
You need to be logged in to leave comments.
Login now