Closed berland closed 6 years ago
A currenttly-API-breaking suggestion is to have TimeVector.load() only from a string containing the deck, and let the user be responsible for wrapping a filename with open() if needed.
This would be similar to yaml.load()
Currently there are methods: TimeVector.load()
to load from a file, and TimeVector,load_string()
to load from a string. Furtheremore the TimeVector.__init__( )
method has two optional arguments base_file = ...
and base_string = ..
- so I would say what you request is certainly possible; but the API might change?!
Ok, the functionality seems to be there. Closing.
TimeVector should be able to load from a string containing a Schedule deck, not only a filename containing the Schedule deck.
(the use case is string manipulation in Python before passing it off to sunbeam for merging)