Похожие чаты

Is there any way to read the vars (like with

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

4 ответов

15 просмотров

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

ㄥ卂Ҡㄚッ-- 馬泰奧 Автор вопроса
Muflone
Just don't write mess is the only solution. Each m...

I need it just to see if any other classes have started

Похожие вопросы

Обсуждают сегодня

Xem delist ho rha hai agr naa bhechu toh kya hoga after 1 july?
ABHI
27
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
VIP 332 Quarterly XVS Buyback, Funds Allocation and New Tokenomics Summary This VIP outlines the protocol’s Quarterly Buyback and Funds Allocation strategy as per our Tokeno...
Venus Announcements
8
Quick reminder regarding the first phase of the token merger⚠️ As we approach Phase 1 of the token merger, OCEAN and AGIX will migrate to FET starting July 1st! Here's a li...
Stip11
1
is there no compile time way to get the number of fields in a struct?
anonimikmak
14
Hey, Oceaners 🌊 As we approach Phase 1 of the token merger, OCEAN and AGIX will migrate to FET starting July 1st! Here's a list of exchanges that have communicated their su...
KreigDK | Never DM first🌊
3
Did you guys see the latest tweet from TonGifts? 🚀
Mike
44
База данных не поможет. Шифрование не поможет. Какие там ещё варианты? Накидывайте.
КТ315
20
I love the passion, really do. I do think this is being blown way out of proportion. We are not deleting our Telegram or not allowing you to talk about anything you want, a...
Mike Herron
3
А табстоп это сообщение от окна или от элемента управления?
The Bird of Hermes
18
Карта сайта