Newbie pythoner, with bizzare problem

Paul Prescod paul at prescod.net
Sat Jul 22 12:38:26 EDT 2000


Gordon McMillan wrote:
> 
> >What surprises me, though, is that no one ever
> >mentions the possibility of writing
> >  inp = __builtin__.open("c:/autoexec.bat",'r')
> 
> Because __builtin__ is a module and has to be imported. And someone who
> says

Well yes, but not __builtins__ (with the "s")

Python 1.6a2 (#0, Apr  6 2000, 11:45:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> __builtins__
<module '__builtin__' (built-in)>

-- 
 Paul Prescod - Not encumbered by corporate consensus
New from Computer Associates: "Software that can 'think', sold by 
marketers who choose not to."




More information about the Python-list mailing list