Hi Jakob, Thank you for your reply. I had hoped sumolib would load the config file in a parser so I could easily grab options, such as the location of the .net file, from the .sumocfg. Due to your answer I decided to go at it from a different angle and just read the .sumocfg using xml.etree.cElementTree. So far, everything works like a charm.
Regards, Iris On 22/09/16 09:05, Jakob Erdmann wrote: > Hello, > it appears that the sumolib itself never uses the saveConfiguration() > function. Usually, when a configuration shall be written we just do a > subprocess.call to the application with the desired options and add > ['--save-configuration', 'whatever.sumocfg'] to the parameter array. > regards, > Jakob > > 2016-09-21 18:31 GMT+02:00 Iris Bekker <iris.bek...@braindrops.nl > <mailto:iris.bek...@braindrops.nl>>: > > Dear everyone, > > I am a relative beginner with Python and still getting to grips with > traci. I am trying to use SUMO for my master's thesis and want to look > at comparing different methods of routing traffic through a city-like > network with traffic lights. > > In any case, right now I want to make setting up experiments easier by > using sumo's own configuration file templates. I can of course simply > start SUMO with a configuration file, but I would like to have > access or > maybe create config files from my own code. Now sumolib has the class > ConfigurationReader and functions like pullOptions and > saveConfiguration, but for the love of me I cannot get them to work. > Could someone please supply me with an example of how to use them? > > Thank you in advance, > Iris Bekker > > > ------------------------------------------------------------------------------ > _______________________________________________ > sumo-user mailing list > sumo-user@lists.sourceforge.net > <mailto:sumo-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/sumo-user > <https://lists.sourceforge.net/lists/listinfo/sumo-user> > > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list sumo-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sumo-user