I have the following:

import sys 
import os 
class Portfolio: 
    @classmethod 
    def menu(cls): 
        print("Main Menu") 
       p = Portfolio() 
       p.clear_screen()  
       p.transaction() 

    def clear_screen(self): 
        os.system('cls' if os.name == 'nt' else 'clear') 
         print(flush=True) 
        sys.stdout.flush() 

    def transaction(self): 
         print("Transaction Menu") 

if __name__ == "__main__" : Portfolio.menu()

When I run this the screen clears AFTER not BEFORE transaction() is run. 
How can I correct that?

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to spyderlib+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/c7b46996-3aea-4a92-99ea-c2519584f7a8n%40googlegroups.com.

Reply via email to