(self, file_abspath, proxies)
Save list of ProxyModel in a file.
Save list of ProxyModel in a file.
Save list of ProxyModel in a file .
def saveToFile(self, file_abspath, proxies):
        '''Save list of ProxyModel in a file.'''
        if os.path.exists(file_abspath):
            os.remove(file_abspath)
            print "$proxy/> remove %s." % file_abspath

        # write to file
        f = file(file_abspath, "w")
        for proxyModel in proxies:
            f.write(proxyModel.to_line())
            f.write("\n")
        f.close()
        print "$proxy/> write proxies to %s." % f.name
def saveToFile ( self , file_abspath , proxies ) : if os . path . exists ( file_abspath ) : os . remove ( file_abspath ) print "$proxy/> remove %s." % file_abspath # write to file f = file ( file_abspath , "w" ) for proxyModel in proxies : f . write ( proxyModel . to_line ( ) ) f . write ( "\n" ) f . close ( ) print "$proxy/> write proxies to %s." % f . name