Skip to content

How to eliminate quotation marks from output? #168

Description

@coderodyhpc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions