Prev | Index | NextImporting Modules
- Use the import statement to make a module accessible in your program
>>> import sys
>>> sys.version
'2.2.2 (#1, Feb 15 2003, 00:29:18)
[GCC 2.95.4 20011002 (Debian prerelease)]'
Python tries to find the module in the current directory, the environment variable PYTHONPATH, and finally in an installation-dependent default path
An Introduction To Python