title: GUI for choosing different sorting in python by Tkinter
body: <p>I am using this code for radio buttons:</p>
  
  <pre><code>  v= IntVar()
  
    self.button1 = Radiobutton( self, text = "Bubble Sort" ,variable=v,value=1)
    self.button1.grid( row = 1, column = 0, sticky = W+E+N+S )
  
  
    self.button2 = Radiobutton( self, text = "Quick Sort",variable=v,value=2)
    self.button2.grid( row = 1, column = 1, sticky = W+E+N+S )
  
  
    self.button3 = Radiobutton( self, text = "Shell Sort", variable=v,value=3)
    self.button3.grid( row = 1, column = 2, sticky = W+E+N+S )
  </code></pre>
  
  <p>For more reference the full code is above and screen shot is like this:</p>
  
  <p><img src="https://i.stack.imgur.com/rFcc2.png" alt="enter image description here"></p>
  
  <p>How do I do sorting on these numbers by clicking button after selecting the sort? Do I first have to select the sort from three given and then click button sort to sort the numbers?</p>
  
  <p>Here is the rest:</p>
  
  <pre><code>from Tkinter import *
  import random
  class Sorting( Frame ):
    def __init__( self ):
     Frame.__init__( self )
     self.master.title( "Sorting" )
  
     self.master.rowconfigure( 5, weight = 1 )
     self.master.columnconfigure( 5, weight = 1 )
     self.grid( sticky = W+E+N+S )
     #label for sort intro
  
     self.label1 = Label( self, text = "Select Sort", width = 25 ,height=2)
     self.label1.grid( row = 0, column = 1, sticky = N )
  
  
  
     #Radio buttons for sorts
     v= IntVar()
  
     self.button1 = Radiobutton( self, text = "Bubble Sort" ,variable=v,value=1)
     self.button1.grid( row = 1, column = 0, sticky = W+E+N+S )
  
  
     self.button2 = Radiobutton( self, text = "Quick Sort",variable=v,value=2)
     self.button2.grid( row = 1, column = 1, sticky = W+E+N+S )
  
  
     self.button3 = Radiobutton( self, text = "Shell Sort", variable=v,value=3)
     self.button3.grid( row = 1, column = 2, sticky = W+E+N+S )
  
   #function to do soting
     #def sort():
  
   #label to store value
     def gen():
      self.nums = []
      for x in range(0, 10):
         self.nums.append(random.randint(0, 100))
    # . . . . . . . . . .  .    &lt;- maybe here call sorting method on self.nums
  
  
         num = ''.join('%4i' % num for num in self.nums)
         self.label2 = Label( self, text=num, width=2, height=2)
         self.label2.grid(row=3, columnspan=10, sticky=W+E+N+S)
  
           #self.label2.pack(fill="both")
  
       #Button for sorting
     self.button5=Button(self,text='start sorting')
     self.button5.grid( row = 4,column=1, sticky = W+E+N+S )
  
     #button to generate number
     self.button4 = Button( self,text='Generate no.',command=gen )
     self.button4.grid( row = 2,column=1, sticky = W+E+N+S )
     self.rowconfigure( 1, weight = 1 )
     self.columnconfigure( 1, weight = 1 )
  def main():
    Sorting().mainloop()   
  
  if __name__ == "__main__":
    main()
  </code></pre>