[Python-Dev] PEP 273 - Import from Zip Archives
Thomas Heller
thomas.heller@ion-tof.com
Tue, 5 Mar 2002 11:25:12 +0100
[bootstrapping an importer]
> > What do strop or string provide that string methods don't? It's likely that
> > if you needed to import either in the past, you don't need to now.
>
>
> The real problem isn't the string module, it is the os module. Any
> importer will need this. The usual hack is to duplicate its logic
> in the my_importer module. That is, the selection of the correct
> builtin os functions.
Couldn't this be solved in the same way that made the string
module obsolete?
I mean, move the functionality from the os module into
methods of file objects (or class methods of the file type)?
Example:
file.stat(pathname) instead of os.stat(pathname)
Thomas