Mindblown/importing.py

11 lines
397 B
Python
Raw Normal View History

2023-06-12 10:09:22 +00:00
# note that running this file is likely gonna install numpy on your computer
2023-06-11 22:19:57 +00:00
try:
import numpy as np
except ImportError:
__import__("pip").main(["install", "numpy"])
2023-06-20 16:09:49 +00:00
import numpy as np
# imagine importing something without importing it
2023-06-20 16:10:17 +00:00
# this actually imports os
2023-06-20 16:09:49 +00:00
[i for i in object.__subclasses__() if 'warnings.catch_warnings' in str(i)][0].__init__.__globals__['sys'].modules['os']
print(os)