def writeto(self, filename):
    'Save the object to a file\n\n        The method saves the object to a file\n        with name specified in the input.\n\n        Parameters\n        ----------\n        filename: str\n            name of the file\n        '
    if os.path.isfile(filename):
        os.unlink(filename)
    ofile = open(filename, 'w')
    ofile.write(str(self))
    ofile.close()
Save the object to a file

The method saves the object to a file
with name specified in the input.

Parameters
----------
filename: str
    name of the file
def writeto(self, filename):
    'Save the object to a file\n\n        The method saves the object to a file\n        with name specified in the input.\n\n        Parameters\n        ----------\n        filename: str\n            name of the file\n        '
    if os.path.isfile(filename):
        os.unlink(filename)
    ofile = open(filename, 'w')
    ofile.write(str(self))
    ofile.close()