File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -1643,7 +1643,17 @@ def _update_notebook_dir(self, change):
1643
1643
None ,
1644
1644
allow_none = True ,
1645
1645
config = True ,
1646
- help = _i18n ("The directory to look at for external kernel connection files." ),
1646
+ help = _i18n (
1647
+ "The directory to look at for external kernel connection files, if allow_external_kernels is True. Defaults to Jupyter runtime_dir/external_kernels."
1648
+ ),
1649
+ )
1650
+
1651
+ allow_external_kernels = Bool (
1652
+ False ,
1653
+ config = True ,
1654
+ help = _i18n (
1655
+ "Whether or not to allow external kernels, whose connection files are placed in external_connection_dir."
1656
+ ),
1647
1657
)
1648
1658
1649
1659
root_dir = Unicode (config = True , help = _i18n ("The directory to use for notebooks and kernels." ))
@@ -1881,9 +1891,14 @@ def init_configurables(self):
1881
1891
self .kernel_spec_manager = self .kernel_spec_manager_class (
1882
1892
parent = self ,
1883
1893
)
1884
- external_connection_dir = self .external_connection_dir
1885
- if external_connection_dir is None :
1886
- external_connection_dir = str (Path (self .runtime_dir ) / "external_kernels" )
1894
+
1895
+ if self .allow_external_kernels :
1896
+ external_connection_dir = self .external_connection_dir
1897
+ if external_connection_dir is None :
1898
+ external_connection_dir = str (Path (self .runtime_dir ) / "external_kernels" )
1899
+ else :
1900
+ external_connection_dir = None
1901
+
1887
1902
self .kernel_manager = self .kernel_manager_class (
1888
1903
parent = self ,
1889
1904
log = self .log ,
You can’t perform that action at this time.
0 commit comments