diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/howto/urllib2.rst | 7 | ||||
-rw-r--r-- | Doc/lib/libstringio.tex | 4 | ||||
-rw-r--r-- | Doc/tut/tut.tex | 13 |
3 files changed, 16 insertions, 8 deletions
diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index 858c9b1..f8f4a2b 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -541,7 +541,9 @@ steps to setting up a `Basic Authentication`_ handler : :: .. note:: Currently ``urllib2`` *does not* support fetching of ``https`` - locations through a proxy. This can be a problem. + locations through a proxy. However, this can be enabled by extending + urllib2 as shown in the recipe [#]_. + Sockets and Layers ================== @@ -596,3 +598,6 @@ This document was reviewed and revised by John Lee. is set to use the proxy, which urllib2 picks up on. In order to test scripts with a localhost server, I have to prevent urllib2 from using the proxy. +.. [#] urllib2 opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe + <http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195>`_. + diff --git a/Doc/lib/libstringio.tex b/Doc/lib/libstringio.tex index 2431251..73ff0e4 100644 --- a/Doc/lib/libstringio.tex +++ b/Doc/lib/libstringio.tex @@ -78,6 +78,10 @@ Unlike the memory files implemented by the \refmodule{StringIO} module, those provided by this module are not able to accept Unicode strings that cannot be encoded as plain \ASCII{} strings. +Calling \function{StringIO()} with a Unicode string parameter populates +the object with the buffer representation of the Unicode string, instead of +encoding the string. + Another difference from the \refmodule{StringIO} module is that calling \function{StringIO()} with a string parameter creates a read-only object. Unlike an object created without a string parameter, it does not have diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index a322eb5..74468b1 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -2942,15 +2942,14 @@ which the current module is a submodule), the \keyword{import} statement looks for a top-level module with the given name. When packages are structured into subpackages (as with the -\module{sound} package in the example), there's no shortcut to refer -to submodules of sibling packages - the full name of the subpackage -must be used. For example, if the module -\module{sound.filters.vocoder} needs to use the \module{echo} module -in the \module{sound.effects} package, it can use \code{from -sound.effects import echo}. +\module{sound} package in the example), you can use absolute +imports to refer to submodules of siblings packages. +For example, if the module \module{sound.filters.vocoder} needs to +use the \module{echo} module in the \module{sound.effects} package, +it can use \code{from sound.effects import echo}. Starting with Python 2.5, in addition to the implicit relative imports -described above, you can write explicit relative imports with the +described above, you can also write explicit relative imports with the \code{from module import name} form of import statement. These explicit relative imports use leading dots to indicate the current and parent packages involved in the relative import. From the \module{surround} |