How to make boolean value inverse?
There are several ways how to convert a Boolean value to its 'reverse'

option 1: using not

not will reverse False into True and True into False.

spec = not mat.fsxm_nobasespec


option 2: using a translation dict

REVERSE_BOOLEAN_DICT = {
    True: 0,
    False: 1,
}
spec = RESERVER_BOOLEAN_DICT.get(mat.fsxm_nobasespec)


These options can be wrapped in a property for convenience.

@property
def reverse_basespec(self):
    return not self.fsxm_nobasespec
Material.fsxm_basespec = reverse_basespec


Looking at the code that is posted as comment below the best option is to:

Exporter.File.Write("BaseMaterialSpecular {\n") 
Exporter.File.Write(" %i; // Not Using Specular Map\n" %(not Material.fsxm_nobasespec)) 
Exporter.File.Write("}\n").


Please note that this is using python2 formatting conventions. Using python3 conventions it is best to use.

Exporter.File.Write("""BaseMaterialSpecular {{
 {fsxm_nobasespec:d}; // Not Using Specular Map
}}
""".format(fsxm_nobasespec=not Material.fsxm_nobasespec))