-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Marcelo Garcia edited this page Feb 28, 2023
·
2 revisions
Welcome to the Introduction_Python wiki!
Python search for modules in a list defined in the sys.path:
>>> import sys
>>> sys.path
['', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\\python310.zip',
'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\\DLLs', (...)]
>>>You can even modify the list by adding your modules
>>> sys.path.insert(0, os.path.join(os.path.expanduser('~'), 'Work', 'examples'))
>>> sys.path
['C:\\Users\\Marcelo Garcia\\Work\\examples', '', Here we will put some extra information to complement the main page.