IGN:Set ipython home directory to a subdir of the calibre config dir to ensure it is always writable

This commit is contained in:
Kovid Goyal 2009-10-05 17:28:33 -06:00
parent 71f2ef4946
commit c621908aa1

View File

@ -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()