ipython notebook to cmdline script