mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 10:35:20 -04:00
Fix #4581 (WSJ not downloading fully) and fix invocation of embedded python interpreter via call to ipython not working because of command line arguments
This commit is contained in:
@@ -451,6 +451,8 @@ if isosx:
|
||||
traceback.print_exc()
|
||||
|
||||
def ipython(user_ns=None):
|
||||
old_argv = sys.argv
|
||||
sys.argv = ['ipython']
|
||||
if user_ns is None:
|
||||
user_ns = locals()
|
||||
from calibre.utils.config import config_dir
|
||||
@@ -514,5 +516,6 @@ main()
|
||||
from IPython.Shell import IPShellEmbed
|
||||
ipshell = IPShellEmbed(user_ns=user_ns)
|
||||
ipshell()
|
||||
sys.argv = old_argv
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user