mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Set ipython home directory to a subdir of the calibre config dir to ensure it is always writable
This commit is contained in:
parent
71f2ef4946
commit
c621908aa1
@ -190,6 +190,9 @@ def main(args=sys.argv):
|
|||||||
elif opts.develop_from is not None:
|
elif opts.develop_from is not None:
|
||||||
develop_from(opts.develop_from)
|
develop_from(opts.develop_from)
|
||||||
else:
|
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
|
from IPython.Shell import IPShellEmbed
|
||||||
ipshell = IPShellEmbed()
|
ipshell = IPShellEmbed()
|
||||||
ipshell()
|
ipshell()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user