File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 44
55class  App (tk .Tk ):
66
7-      def  __init__ (self ):
8-          super ().__init__ ()
9-          self .status  =  tk .StringVar ()
10-          tk .Label (self , textvariable = self .status ).pack ()
11-          tk .Button (self , text = "Run Process" ,
12-              command = self .run_process ).pack ()
7+   def  __init__ (self ):
8+     super ().__init__ ()
9+     self .status  =  tk .StringVar ()
10+     tk .Label (self , textvariable = self .status ).pack ()
11+     tk .Button (self , text = "Run Process" ,
12+       command = self .run_process ).pack ()
1313
14-      def  run_process (self ):
15-          self .status .set ("Starting process" )
16-          for  phase  in  range (1 , 5 ):
17-              self .status .set (f"Phase { phase }  )
18-              self .process_phase (phase , 2 )
19-          self .status .set ('All phases complete' )
14+   def  run_process (self ):
15+     self .status .set ("Starting process" )
16+     for  phase  in  range (1 , 5 ):
17+       self .status .set (f"Phase { phase }  )
18+       self .process_phase (phase , 2 )
19+     self .status .set ('All phases complete' )
2020
21-      def  process_phase (self , n , length ):
22-          sleep (length )
21+   def  process_phase (self , n , length ):
22+     sleep (length )
2323
2424
2525App ().mainloop ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments