I have created a custom class GPSPosition. This class has the standard method str() defined, which would return a long string with all the values of the object returned in a specific format. If I write the string into a file, my GPS Device would be able to read the position information from the file.
I have a list of GPSPosition object, with all the values populated by the user. The next task is to loop through the list, and get the string representation of each GPSPosition object and write it to the file.
writeFileHandler.write(GPSPositionObject)
This does not work, as I get an error saying that write expects a string, but I am passing an object.