Skip to content

Commit

Permalink
Allowed overriding the notebook profile via commandline args
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed May 27, 2015
1 parent f702429 commit c1e467b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions topo/misc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ def n_action(option,opt_str,value,parser):
sys.argv = ['notebook']
NotebookApp.ipython_dir = param.resolve_path('platform/ipython', path_to_file=False)
NotebookApp.profile = 'topo'
if options.profile is not None:
NotebookApp.profile = options.Profile
if options.IP is not None:
NotebookApp.ip = options.IP
if options.Port is not None:
Expand All @@ -518,6 +520,9 @@ def n_action(option,opt_str,value,parser):
topo_parser.add_option("--port", action="store", default=None, dest="Port",
type=int, help="Store the provided notebook port.")

topo_parser.add_option("--profile", action="store", default=None, dest="Profile",
type=str, help="Store the provided notebook port.")

topo_parser.add_option("-n", "--notebook", action="callback", callback=n_action,
default=False, dest="notebook",
help="launch the IPython Notebook interface")
Expand Down

0 comments on commit c1e467b

Please sign in to comment.