why have to "from compiler import *"

John Purser jmpurser at gmail.com
Tue Sep 5 01:12:05 EDT 2006


On Mon, 2006-09-04 at 21:40 -0700, mark_galeck_spam_magnet at yahoo.com
wrote:
> Hi,  why does
> 
> >>> import compiler
> >>> compileFile("foo.py")
> 
> complain name 'compileFile' not defined.  But
Because 'compileFile' is not defined.  But I think you'll find that
compiler.compileFile IS defined.

John Purser


> 
> >>>from compiler import *
> 
> works.  Why?  (I did read the tutorial, it seems to say "import module"
> should work.  
> 
> Thank you,  Mark
> 




More information about the Python-list mailing list