##// END OF EJS Templates
Actually warn that `ipython <subcommand>` is deprecated....
Matthias Bussonnier -
Show More
@@ -185,7 +185,7 b' class BaseIPythonApplication(Application):'
185 185 super(BaseIPythonApplication, self).__init__(**kwargs)
186 186 # ensure current working directory exists
187 187 try:
188 directory = py3compat.getcwd()
188 py3compat.getcwd()
189 189 except:
190 190 # exit if cwd doesn't exist
191 191 self.log.error("Current working directory doesn't exist.")
@@ -195,6 +195,16 b' class BaseIPythonApplication(Application):'
195 195 # Various stages of Application creation
196 196 #-------------------------------------------------------------------------
197 197
198 def initialize_subcommand(self, subc, argv=None):
199 if subc in self.deprecated_subcommands:
200 import time
201 self.log.warning("Subcommand `ipython {sub}` is deprecated and will be removed "
202 "in future versions.".format(sub=subc))
203 self.log.warning("You likely want to use `jupyter {sub}`... continue "
204 "in 5 sec".format(sub=subc))
205 time.sleep(5)
206 return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv)
207
198 208 def init_crash_handler(self):
199 209 """Create a crash handler, typically setting sys.excepthook to it."""
200 210 self.crash_handler = self.crash_handler_class(self)
@@ -50,22 +50,11 b' ipython --matplotlib=qt # enable matplotlib integration with qt4 backend'
50 50 ipython --log-level=DEBUG # set logging to DEBUG
51 51 ipython --profile=foo # start with profile foo
52 52
53 ipython qtconsole # start the qtconsole GUI application
54 ipython help qtconsole # show the help for the qtconsole subcmd
55
56 ipython console # start the terminal-based console application
57 ipython help console # show the help for the console subcmd
58
59 ipython notebook # start the IPython notebook
60 ipython help notebook # show the help for the notebook subcmd
61
62 53 ipython profile create foo # create profile foo w/ default config files
63 54 ipython help profile # show the help for the profile subcmd
64 55
65 56 ipython locate # print the path to the IPython directory
66 57 ipython locate profile foo # print the path to the directory for profile `foo`
67
68 ipython nbconvert # convert notebooks to/from other formats
69 58 """
70 59
71 60 #-----------------------------------------------------------------------------
@@ -209,28 +198,16 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
209 198 StoreMagics,
210 199 ]
211 200
212 subcommands = dict(
201 deprecated_subcommands = dict(
213 202 qtconsole=('qtconsole.qtconsoleapp.JupyterQtConsoleApp',
214 203 """DEPRECATD: Launch the Jupyter Qt Console."""
215 204 ),
216 205 notebook=('notebook.notebookapp.NotebookApp',
217 206 """DEPRECATED: Launch the Jupyter HTML Notebook Server."""
218 207 ),
219 profile = ("IPython.core.profileapp.ProfileApp",
220 "Create and manage IPython profiles."
221 ),
222 kernel = ("ipykernel.kernelapp.IPKernelApp",
223 "Start a kernel without an attached frontend."
224 ),
225 208 console=('jupyter_console.app.ZMQTerminalIPythonApp',
226 209 """DEPRECATED: Launch the Jupyter terminal-based Console."""
227 210 ),
228 locate=('IPython.terminal.ipapp.LocateIPythonApp',
229 LocateIPythonApp.description
230 ),
231 history=('IPython.core.historyapp.HistoryApp',
232 "Manage the IPython history database."
233 ),
234 211 nbconvert=('nbconvert.nbconvertapp.NbConvertApp',
235 212 "DEPRECATED: Convert notebooks to/from other formats."
236 213 ),
@@ -241,10 +218,25 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):'
241 218 "DEPRECATED: Manage Jupyter kernel specifications."
242 219 ),
243 220 )
244 subcommands['install-nbextension'] = (
221 subcommands = dict(
222 profile = ("IPython.core.profileapp.ProfileApp",
223 "Create and manage IPython profiles."
224 ),
225 kernel = ("ipykernel.kernelapp.IPKernelApp",
226 "Start a kernel without an attached frontend."
227 ),
228 locate=('IPython.terminal.ipapp.LocateIPythonApp',
229 LocateIPythonApp.description
230 ),
231 history=('IPython.core.historyapp.HistoryApp',
232 "Manage the IPython history database."
233 ),
234 )
235 deprecated_subcommands['install-nbextension'] = (
245 236 "notebook.nbextensions.InstallNBExtensionApp",
246 237 "DEPRECATED: Install Jupyter notebook extension files"
247 238 )
239 subcommands.update(deprecated_subcommands)
248 240
249 241 # *do* autocreate requested profile, but don't create the config file.
250 242 auto_create=Bool(True)
General Comments 0
You need to be logged in to leave comments. Login now