.set_xml_file_extension(+)
PlanitNetworkReaderSettings method
Description
Set the file extension to consider when exploring potential files in the input directory. The default is .xml
but if
for some reason the user has stored their networks under a different extension it can be configured via this method.
Signature
.set_xml_file_extension(extension: str)
with
Parameter | Type | Unit | Default | Description |
---|---|---|---|---|
extension |
String |
.xml |
N/A | The extension to use |
Return type
N/A
Example 1
from planit import *
# create a demands converter
planit_instance = Planit()
converter = planit_instance.converter_factory.create(ConverterType.DEMANDS)
# Planit XML network reader
planit_reader = converter.create_reader(DemandsReaderType.PLANIT)
planit_reader.settings.set_input_directory("<dir_to_input_file>")
planit_reader.settings.set_xml_file_extension(".custom_extension")
See also
N/A
Source code
Class ReaderSettingsWrapper
in converterwrappers.py