Show More
@@ -106,12 +106,24 b' def _get_nbext_dir(nbextensions_dir=None, user=False, prefix=None):' | |||
|
106 | 106 | return nbext |
|
107 | 107 | |
|
108 | 108 | |
|
109 |
def check_nbextension(files |
|
|
109 | def check_nbextension(files, user=False, prefix=None, nbextensions_dir=None): | |
|
110 | 110 | """Check whether nbextension files have been installed |
|
111 | 111 | |
|
112 | files should be a list of relative paths within nbextensions. | |
|
113 | ||
|
114 | 112 | Returns True if all files are found, False if any are missing. |
|
113 | ||
|
114 | Parameters | |
|
115 | ---------- | |
|
116 | ||
|
117 | files : list(paths) | |
|
118 | a list of relative paths within nbextensions. | |
|
119 | user : bool [default: False] | |
|
120 | Whether to check the user's .ipython/nbextensions directory. | |
|
121 | Otherwise check a system-wide install (e.g. /usr/local/share/jupyter/nbextensions). | |
|
122 | prefix : str [optional] | |
|
123 | Specify install prefix, if it should differ from default (e.g. /usr/local). | |
|
124 | Will check prefix/share/jupyter/nbextensions | |
|
125 | nbextensions_dir : str [optional] | |
|
126 | Specify absolute path of nbextensions directory explicitly. | |
|
115 | 127 | """ |
|
116 | 128 | nbext = _get_nbext_dir(nbextensions_dir, user, prefix) |
|
117 | 129 | # make sure nbextensions dir exists |
@@ -346,4 +358,4 b' class NBExtensionApp(BaseIPythonApplication):' | |||
|
346 | 358 | |
|
347 | 359 | if __name__ == '__main__': |
|
348 | 360 | NBExtensionApp.launch_instance() |
|
349 | No newline at end of file | |
|
361 |
General Comments 0
You need to be logged in to leave comments.
Login now