These are chat archives for ipython/ipython

Jun 2018
Jun 05 2018 13:49
@SofianeB no. actually os.system("ls") forks a child process and runs the ls command in the child process. after executing the child process returns 0 which is what is printed. the directory had files and other directories
Jun 05 2018 13:56
@yadunathg No what i meant is: Consider the file structure: A folder a in which there are two files 1.ipynb 2.ipynb and a directory b. inside directory b you have two files 3.ipynb 4.ipynb and another directory c. inside directory c you have two files 5.ipynb 6.ipynb. also suppose /home/my_user/a is the absolute path for directory a. now i run jupyter notebook command inside directory a. now i want to access the path from where i ran jupyter notebook i.e /home/my_user/a working inside any of ipynb files 1-6
Moreover i need to know the jupyter api for converting the code(actually all cells) in a current live jupyter notebook to json ipynb file. basically what i want is that on a button click instead of saving the ipynb file locally it saves on github or some other online storage like google drive. how can this be done?
Min RK
Jun 05 2018 14:06
@darkknightawakens if you want a button, the javascript API is probably the way to go, since this knows things like the current notebook URL
A notebook server extension could also be used, which has access to the filesystem, etc.. The kernel does not have this info, though.