This commit is contained in:
2023-04-19 14:18:22 -04:00
parent 31175b6cce
commit 286afab14a
6 changed files with 519 additions and 1 deletions
+33
View File
@@ -0,0 +1,33 @@
'''
import sys
import importlib.util
# Load only the sys module
importlib.import_module('sys')
# Check the type of the value associated with the 'os' key
os_module = sys.modules['os']
os_module_type = type(os_module)
# Print the type of the value associated with the 'os' key
print("Type of the value associated with the 'os' key in sys.modules: {}".format(os_module_type))
'''
'''
import os
print(type(os))
'''
import builtins
# Access the os module from globals()
os = globals().get('os', None)
# Check if os module is available
if os is not None:
# Call os.getlogin()
username = os.getlogin()
print("Username:", username)
else:
print("os module not available")