From 992fba38b00fb33dbe4e1a2f8cbe5c98742bcc85 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Sat, 25 Jul 2015 18:10:08 +0200 Subject: [PATCH] Il y a deux paths possibles pour le fichier d'historique ipython --- extract_ipython.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extract_ipython.py b/extract_ipython.py index 50cd04e..b918e11 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('~/.config/ipython/profile_default/history.sqlite') c = sqlite3.connect(history_file) r = c.execute(req) -- 2.39.2