[Python-checkins] r42567 - peps/trunk/pep-0302.txt
david.goodger
python-checkins at python.org
Fri Feb 24 23:47:19 CET 2006
Author: david.goodger
Date: Fri Feb 24 23:47:18 2006
New Revision: 42567
Modified:
peps/trunk/pep-0302.txt
Log:
patch from Paul Moore
Modified: peps/trunk/pep-0302.txt
==============================================================================
--- peps/trunk/pep-0302.txt (original)
+++ peps/trunk/pep-0302.txt Fri Feb 24 23:47:18 2006
@@ -365,13 +365,15 @@
loader.get_data(path)
This method returns the data as a string, or raise IOError if the
- "file" wasn't found. It is meant for importers that have some
- file-system-like properties. The 'path' argument is a path that can
- be constructed by munging module.__file__ (or pkg.__path__ items)
- with the os.path.* functions, for example:
+ "file" wasn't found. The data is always returned as if "binary" mode
+ was used - there is no CRLF translation of text files, for example.
+ It is meant for importers that have some file-system-like properties.
+ The 'path' argument is a path that can be constructed by munging
+ module.__file__ (or pkg.__path__ items) with the os.path.* functions,
+ for example:
d = os.path.dirname(__file__)
- data = __loader__.get_data(os.path.join(d, "mydata.txt"))
+ data = __loader__.get_data(os.path.join(d, "logo.gif"))
The following set of methods may be implemented if support for (for
example) Freeze-like tools is desirable. It consists of three
More information about the Python-checkins
mailing list