[Pythonmac-SIG] Re: MacPython and line-endings

Jack Jansen jack@oratrix.nl
Fri, 12 Oct 2001 02:42:51 +0200


Recently, Guido van Rossum <guido@python.org> said:
> I'm missing something.  Why does your function have to work on a bare
> FILE * rather than on a Python file object?

Sorry, I'm being less than clear. [lemme check ... pompom...]
Yes. All the routines in the import chain (both in the find pass and
in the execute pass) send filenames and FILE*s around. Fileobjects are
nowhere to be seen.

That's really the main reason for my original impression that this
should be done at stdio level: all the logic that is in import.c (and
importdl.c, and probably in the source command, etc) knows nothing
about Python objects and uses normal C conventions. So a Python based
solution (or a solution on the level of fileobjects) won't cut it if
you want this to work also for scripts and modules that are imported.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.cwi.nl/~jack        | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm