You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: