Por que readline.read_history_file me fornece 'IOError: [Errno 2] Nenhum arquivo ou diretório
Meu arquivo de histórico do Python existe em ~ / .pyhistory e contém o seguinte:
from project.stuff import *
quit()
from project.stuff import *
my_thing = Thing.objects.get(id=21025)
my_thing
my_thing.child_set.all()
my_thing.current_state
my_thing.summary_set
my_thing.summary_set.all()
[ x.type for x in my_thing.child_set.all() ]
[ x.type for x in my_thing.child_set.all().order_by( 'datesubmitted' ) ]
quit()
Estou usando o virtualenv e o virtualenvwrapper para criar ambientes virtuais. Hoje estou tendo um problema com readline não lendo no meu arquivo de histórico:
>>> historyPath
'/Users/johndoe/.pyhistory'
>>> readline.read_history_file(historyPath)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 2] No such file or directory
O arquivo é legível e pode ser escrito por mim:
[johndoe@here]# ls -l ~/.pyhistory
-rw------- 1 johndoe somegroup 325 21 Sep 2012 /Users/johndoe/.pyhistory
O que poderia causar este problema?