I am reading an XML file and reorganizing the necessary data into Python data structures (lists, tuples, etc.).
For example, one of my XML parser modules creates the following data:
animals = ['Chicken', 'Sheep', 'Cattle', 'Horse']
population = [150, 200, 50, 30]
Then I have a plotter module that roughly matches, for example:
from data_miner import animals, population
plot(animals, population)
Using this method, I have to parse the XML file every time I make a plot. I am still testing other aspects of my program, and the XML file does not change as often as it is now. Avoiding the parsing step would greatly improve the testing time.
:
data_miner.py plotter.py , , animals population, plotter.py (, ), data_miner.py . , csv ASCII, . plotter.py :
from data_file import animals, population
plot(animals, population)
:
MATLAB save, .mat. - .mat Python.
:
pickle cpickle, , . , . , .