From: Vincent Le Gallic Date: Sat, 25 Jul 2015 16:10:08 +0000 (+0200) Subject: Il y a deux paths possibles pour le fichier d'historique ipython X-Git-Url: http://gitweb.pimeys.fr/?p=scripts-20-100.git;a=commitdiff_plain;h=992fba38b00fb33dbe4e1a2f8cbe5c98742bcc85 Il y a deux paths possibles pour le fichier d'historique ipython --- 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)