globals().items()) from another file? In the sense here is my case
                  
                  
                  
                  
                  
                  In the main.py file
                  
                  
                  from test import Test
                  
                  
                  
                  
                  
                  a = Test ()
                  
                  
                  a2 = Test ()
                  
                  
                  a2.start ()
                  
                  
                  
                  
                  
                  While in the test.py file
                  
                  
                  class Test:
                  
                  
                      def start (self):
                  
                  
                        HERE I WANT TO PRINT ALL THE VARS OF main.py
                  
                  
                
pass a reference from main namespace and stop writing spaghetti code
.-., is there no way to avoid?
Just don't write mess is the only solution. Each module should not be recursively referencing other modules. Keep your interestin data into class objects without polluting the global namespace
I need it just to see if any other classes have started
Обсуждают сегодня