Newbie on importing

John J. Lee jjl at
Fri Jun 20 19:36:18 CEST 2003

michaeljwhitmore at (Michael J Whitmore) writes:

> Just read the Python tutorial looking for the answer to this question┘
>  What is the difference between (from sys import *) and (import sys). 
> I am aware that the last imported module's functions overwrite any
> identically named functions of previous modules.

Only if you do actually import them.

import sys

Imports the module named 'sys'.

from sys import *

Imports all names from sys (including names referring to functions).


More information about the Python-list mailing list