]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
Il y a deux paths possibles pour le fichier d'historique ipython
authorVincent Le Gallic <legallic@crans.org>
Sat, 25 Jul 2015 16:10:08 +0000 (18:10 +0200)
committerVincent Le Gallic <legallic@crans.org>
Sat, 25 Jul 2015 16:10:08 +0000 (18:10 +0200)
extract_ipython.py

index 50cd04ea149dfdb282dddf6e83b3ad4157849b50..b918e1111f5c7fa39712db386f70bf4b313b2e39 100755 (executable)
@@ -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)