X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=blobdiff_plain;f=extract_ipython.py;h=2e06dc67baa467503a1f2a5c7e44e8c5cef3c26d;hp=50cd04ea149dfdb282dddf6e83b3ad4157849b50;hb=HEAD;hpb=0b16271a5e0c386578ece0ea6d8bcf3239b32a5e diff --git a/extract_ipython.py b/extract_ipython.py index 50cd04e..2e06dc6 100755 --- a/extract_ipython.py +++ b/extract_ipython.py @@ -20,7 +20,10 @@ else: req = 'SELECT * FROM history WHERE session=%s;' % sessionid #print req -history_file = os.path.expanduser('~/.ipython/profile_default/history.sqlite') + +history_file = os.path.expanduser('~/.config/ipython/profile_default/history.sqlite') +if not os.path.isfile(history_file): + history_file = os.path.expanduser('~/.ipython/profile_default/history.sqlite') c = sqlite3.connect(history_file) r = c.execute(req)