From c621908aa1c282ff93bf06a5002c7f3a7154d8fa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 5 Oct 2009 17:28:33 -0600 Subject: [PATCH] IGN:Set ipython home directory to a subdir of the calibre config dir to ensure it is always writable --- src/calibre/debug.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/debug.py b/src/calibre/debug.py index 575308fe14..55e34c7963 100644 --- a/src/calibre/debug.py +++ b/src/calibre/debug.py @@ -190,6 +190,9 @@ def main(args=sys.argv): elif opts.develop_from is not None: develop_from(opts.develop_from) else: + from calibre.utils.config import config_dir + ipydir = os.path.join(config_dir, ('_' if iswindows else '.')+'ipython') + os.environ['IPYTHONDIR'] = ipydir from IPython.Shell import IPShellEmbed ipshell = IPShellEmbed() ipshell()