mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-11 12:30:51 +08:00
Improve bundler list output
Include label and module name (if available) to help a user remember which Python module provides which bundler(s) (c) Copyright IBM Corp. 2016
This commit is contained in:
parent
352d3830fd
commit
4412b4bd6c
@ -246,7 +246,7 @@ class ListBundlerExtensionApp(BaseNBExtensionApp):
|
||||
"""List all the nbextensions"""
|
||||
config_dirs = [os.path.join(p, 'nbconfig') for p in jupyter_config_path()]
|
||||
|
||||
print("Known nbextensions:")
|
||||
print("Known bundlerextensions:")
|
||||
|
||||
for config_dir in config_dirs:
|
||||
head = u' config dir: {}'.format(config_dir)
|
||||
@ -262,9 +262,14 @@ class ListBundlerExtensionApp(BaseNBExtensionApp):
|
||||
|
||||
for bundler_id, info in data['bundlerextensions'].items():
|
||||
label = info.get('label')
|
||||
print(u' {} {}'.format(
|
||||
label if label is not None else bundler_id,
|
||||
GREEN_ENABLED if label else RED_DISABLED))
|
||||
module = info.get('module_name')
|
||||
if label is None or module is None:
|
||||
msg = u' {} {}'.format(bundler_id, RED_DISABLED)
|
||||
else:
|
||||
msg = u' "{}" from {} {}'.format(
|
||||
label, module, GREEN_ENABLED
|
||||
)
|
||||
print(msg)
|
||||
|
||||
def start(self):
|
||||
"""Perform the App's functions as configured"""
|
||||
|
Loading…
Reference in New Issue
Block a user