Hello,
I'm having trouble getting rid of quotation marks when writing some variables. A snippet reads
self.variable1 = 'test',
self.variable2 = 'true',
init['variables'] = OrderedDict(
variable1 = self.variable1,
variable2 = self.variable2,
)
nml = f90nml.Namelist(init)
nml.indent = 2
nml.write('file name', force=True)
which writes
&variables
variable1 = 'test',
variable2 = 'true',
when I need to have:
&variables
variable1 = 'test',
variable2 = true,
I have unsuccessfully tried to get rid of the 2nd quotation marks. Is there any way that this can be achieved in an elegant fashion?
Thanks.
Hello,
I'm having trouble getting rid of quotation marks when writing some variables. A snippet reads
which writes
when I need to have:
I have unsuccessfully tried to get rid of the 2nd quotation marks. Is there any way that this can be achieved in an elegant fashion?
Thanks.