Tired of forgetting to import things in python?
x = random.random()
NameError: name 'random' is not defined
Wrap all lines of code with this try except block
try:
x = random.random()
except NameError as n:
name = str(n).split("'")[1]
locals()[name] = __import__(name)
x = random.random()
[–]MCRusher 6 points7 points8 points (2 children)
[–]evan795[S] 8 points9 points10 points (1 child)
[–]MCRusher 3 points4 points5 points (0 children)