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