original_docstring: Edits the font in the optionFile defined at the very top of the program
docstring: Edits the font in the optionFile defined at the very top of the program
docstring_tokens: Edits the font in the optionFile defined at the very top of the program
code: def edit(self, event=None, default=False):
          '''Edits the font in the optionFile defined at the very top of the program'''
  
          chosen = self.dropdown.get()
          ratio = self.fontratioentry.get()
          optionlist = GetOptions()
          foundFont, foundRatio = False, False
  
          if default:
              chosen = 'Calibri'
              ratio = '1'
          if not ratio:
              ratio = '1'
  
          #checking if in options
          for option in optionlist:
              if option[0] == 'font':
                  option[1] = chosen
                  foundFont = True
              elif option[0] == 'fontRatio':
                  option[1] = ratio
                  foundRatio = True
  
          #adding to options if not already in
          if not foundFont:
              optionlist.append(['font', chosen])
          if not foundRatio:
              optionlist.append(['fontRatio',fontRatio])
  
          #writing to optionFile
          c.execute('DELETE FROM options')
          c.executemany('INSERT INTO options VALUES (?, ?)', optionlist)
          conn.commit()
  
          messagebox.showinfo(message='Please restart the app to see the changes take effect :)')
  
          self.window.destroy()
code_tokens: def edit ( self , event = None , default = False ) : chosen = self . dropdown . get ( ) ratio = self . fontratioentry . get ( ) optionlist = GetOptions ( ) foundFont , foundRatio = False , False if default : chosen = 'Calibri' ratio = '1' if not ratio : ratio = '1' for option in optionlist : if option [ 0 ] == 'font' : option [ 1 ] = chosen foundFont = True elif option [ 0 ] == 'fontRatio' : option [ 1 ] = ratio foundRatio = True if not foundFont : optionlist . append ( [ 'font' , chosen ] ) if not foundRatio : optionlist . append ( [ 'fontRatio' , fontRatio ] ) c . execute ( 'DELETE FROM options' ) c . executemany ( 'INSERT INTO options VALUES (?, ?)' , optionlist ) conn . commit ( ) messagebox . showinfo ( message = 'Please restart the app to see the changes take effect :)' ) self . window . destroy ( )
short_docstring: Edits the font in the optionFile defined at the very top of the program
short_docstring_tokens: Edits the font in the optionFile defined at the very top of the program
comment: '''Edits the font in the optionFile defined at the very top of the program'''$SEP$#checking if in options
  $SEP$#adding to options if not already in
  $SEP$#writing to optionFile
  