Open ghost opened 11 years ago
I am not able to reload the content of the PriorityQueue from file using the following:
from qr import PriorityQueue filename = "test.data"
pr = PriorityQueue('test')
pr.push('one', 1) pr.push('two', 2) pr.push('end', 3)
print pr.elements()
pr.dumpfname(filename, True)
print file(filename).read()
pr.loadfname(filename)
print len(pr.elements())
When I run the script I see the following:
python test_pq.py ['one', 'two', 'end'] [] S'o' .S't' .S'e' . 0
It appear that it has not possible to reload the content from the file. Not sure if the issue is in the serializing the data to read to file or in th read back from file.
I am not able to reload the content of the PriorityQueue from file using the following:
from qr import PriorityQueue filename = "test.data"
pr = PriorityQueue('test')
pr.push('one', 1) pr.push('two', 2) pr.push('end', 3)
print pr.elements()
pr.dumpfname(filename, True)
print pr.elements()
print file(filename).read()
pr.loadfname(filename)
print len(pr.elements())
When I run the script I see the following:
python test_pq.py ['one', 'two', 'end'] [] S'o' .S't' .S'e' . 0
It appear that it has not possible to reload the content from the file. Not sure if the issue is in the serializing the data to read to file or in th read back from file.