def _do_save_logo_cb(self, widget):
     ''' Callback for save project to Logo. '''
     logocode = save_logo(self.tw)
     if len(logocode) == 0:
         return
     save_type = '.lg'
     filename, self.tw.load_save_folder = get_save_name(
         save_type, self.tw.load_save_folder, 'logosession')
     f = file(filename, 'w')
     f.write(logocode)
     f.close()
 def _do_save_logo_cb(self, widget):
     ''' Callback for save project to Logo. '''
     logocode = save_logo(self.tw)
     if len(logocode) == 0:
         return
     save_type = '.lg'
     filename, self.tw.load_save_folder = get_save_name(
         save_type, None, 'logosession')
     if isinstance(filename, unicode):
         filename = filename.encode('utf-8')
     if filename is not None:
         f = file(filename, 'w')
         f.write(logocode)
         f.close()
Esempio n. 3
0
 def _do_save_logo_cb(self, widget):
     ''' Callback for save project to Logo. '''
     logocode = save_logo(self.tw)
     if len(logocode) == 0:
         return
     save_type = '.lg'
     filename, self.tw.load_save_folder = get_save_name(
         save_type, None, 'logosession')
     if isinstance(filename, unicode):
         filename = filename.encode('utf-8')
     if filename is not None:
         f = file(filename, 'w')
         f.write(logocode)
         f.close()