mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Create empty ipythonrc.ini before launching ipython shell
This commit is contained in:
parent
487588bb75
commit
b713020a21
@ -455,7 +455,8 @@ def ipython(user_ns=None):
|
|||||||
os.environ['IPYTHONDIR'] = ipydir
|
os.environ['IPYTHONDIR'] = ipydir
|
||||||
if not os.path.exists(ipydir):
|
if not os.path.exists(ipydir):
|
||||||
os.makedirs(ipydir)
|
os.makedirs(ipydir)
|
||||||
rc = os.path.join(ipydir, 'ipythonrc')
|
for x in ('', '.ini'):
|
||||||
|
rc = os.path.join(ipydir, 'ipythonrc'+x)
|
||||||
if not os.path.exists(rc):
|
if not os.path.exists(rc):
|
||||||
open(rc, 'wb').write(' ')
|
open(rc, 'wb').write(' ')
|
||||||
UC = '''
|
UC = '''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user