Mindblown/importing.py

11 lines
397 B
Python

# note that running this file is likely gonna install numpy on your computer
try:
import numpy as np
except ImportError:
__import__("pip").main(["install", "numpy"])
import numpy as np
# imagine importing something without importing it
# this actually imports os
[i for i in object.__subclasses__() if 'warnings.catch_warnings' in str(i)][0].__init__.__globals__['sys'].modules['os']
print(os)