(continued from previous pagesys ps 'ccprint('yuck!'yuckcthese two variables are only defined if the interpreter is in interactive mode the variable sys path is list of strings that determines the interpreter' search path for modules it is initialized to default path taken from the environment variable pythonpathor from built-in default if pythonpath is not set you can modify it using standard list operationsimport sys sys path append('/ufs/guido/lib/python' the dir(function the built-in function dir(is used to find out which names module defines it returns sorted list of stringsimport fibosys dir(fibo['__name__''fib''fib 'dir(sys['__displayhook__''__doc__''__excepthook__''__loader__''__name__''__package__''__stderr__''__stdin__''__stdout__''_clear_type_cache''_current_frames''_debugmallocstats''_getframe''_home''_mercurial''_xoptions''abiflags''api_version''argv''base_exec_prefix''base_prefix''builtin_module_names''byteorder''call_tracing''callstats''copyright''displayhook''dont_write_bytecode''exc_info''excepthook''exec_prefix''executable''exit''flags''float_info''float_repr_style''getcheckinterval''getdefaultencoding''getdlopenflags''getfilesystemencoding''getobjects''getprofile''getrecursionlimit''getrefcount''getsizeof''getswitchinterval''gettotalrefcount''gettrace''hash_info''hexversion''implementation''int_info''intern''maxsize''maxunicode''meta_path''modules''path''path_hooks''path_importer_cache''platform''prefix''ps ''setcheckinterval''setdlopenflags''setprofile''setrecursionlimit''setswitchinterval''settrace''stderr''stdin''stdout''thread_info''version''version_info''warnoptions'without argumentsdir(lists the names you have defined currentlya [ import fibo fib fibo fib dir(['__builtins__''__name__'' ''fib''fibo''sys'note that it lists all types of namesvariablesmodulesfunctionsetc dir(does not list the names of built-in functions and variables if you want list of thosethey are defined in the standard module builtins the dir(function