os module and sys module~

Arief stefanus.arief at ai.astra.co.id
Mon Sep 23 04:17:22 EDT 2002


Based on Python documentation:

sys.path is "A list of strings that specifies the search path for modules.
Initialized from the environment variable PYTHONPATH, or an
installation-dependent default".

os.path is "Common pathname manipulations".

So in simple words, sys.path shows you only the search path where you
imports modules (using "import" statement).
The os.path is collection of functions that manipulate directory, file or
path name.


Mostly os module handles Operating System functions.
-----
Arief

-----Original Message-----
From: python-list-admin at python.org [mailto:python-list-admin at python.org]On
Behalf Of black
Sent: Monday, 23 September 2002 3:01 PM
To: python-list at python.org
Subject: os module and sys module~

Hi, all~
    I couldnt tell the difference between them immediately, and some same
method confused me much, for example they both have "path" attribute but
what's the difference ?





More information about the Python-list mailing list