February 6, 2017 at 3:42 PM
Hello, can anybody please show a way to get the port number of the server connection in an IPython notebook command? I could not easily find this in the documentation.Thanks,dg
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/1ceb0932-1641-44a9-854c-f93a968d9835%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello, can anybody please show a way to get the port number of the server connection in an IPython notebook command? I could not easily find this in the documentation.
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/192cebe0-4e5a-4250-9a80-22018744f419%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Feist
Departamento de Física Teórica de la Materia Condensada
Universidad Autónoma de Madrid
johanne...@uam.es
I have a data analysis script, residing in my Documents folder. The script reads raw data files on a server share. It creates a subfolder "Analysis" and puts a bunch of tables and plots in that folder. At the end of the script, I want to:1. Save a copy of the executed notebook (.ipynb format) in the same subfolder, and2. Save an HTML version of it, also in the same subfolder
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/ee3f36ec-349f-453b-ae09-5f177dd08237%40googlegroups.com.
- Open data analysis IPython notebook (from within IPython Jupyter notebook home tab)- change input variables (from which the path to the source files is calculated)
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/2fa3a747-3b8f-41f4-87d2-271a5e3552a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
documentation - I'm not sure there is any for the JavaScript interface in the notebook(?).
%%javascript
var nb = Jupyter.notebook;
var port = window.location.port;
nb.kernel.execute("NB_Port = '" + port + "'");
# Get file path of this notebook
connection_file_path = kernel.get_connection_file()
connection_file = os.path.basename(connection_file_path)
kernel_id = connection_file.split('-', 1)[1].split('.')[0]
for sess in sessions:
if sess['kernel']['id'] == kernel_id:
nb_rel_path = (sess['notebook']['path'])
break
res = !echo ~
nb_path = os.path.join(res[0],nb_rel_path)
nb_path
nb_dir,nb_filename = os.path.split(nb_path)