I only want to import a package when the function using that package is called. Is there any way I can do this
class metarmap:
import metar_map as mm
import neopixel
import board
def __init__(self, airport):
pass
def __repr__(self):
return str('Hey Dont import noepixel or board til I call the .metarmap method!')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…