projects/python-gzipstream/html/abc.ABCMeta-class.html | 437 +++++ projects/python-gzipstream/html/api-objects.txt | 66 projects/python-gzipstream/html/class-tree.html | 162 ++ projects/python-gzipstream/html/crarr.png |binary projects/python-gzipstream/html/epydoc.css | 322 ++++ projects/python-gzipstream/html/epydoc.js | 293 +++ projects/python-gzipstream/html/frames.html | 17 projects/python-gzipstream/html/gzipstream-module.html | 250 +++ projects/python-gzipstream/html/gzipstream-pysrc.html | 768 ++++++++++ projects/python-gzipstream/html/gzipstream.GzipStream-class.html | 676 ++++++++ projects/python-gzipstream/html/gzipstream.GzipStreamXL-class.html | 484 ++++++ projects/python-gzipstream/html/gzipstream._StreamBuf-class.html | 729 +++++++++ projects/python-gzipstream/html/help.html | 268 +++ projects/python-gzipstream/html/identifier-index.html | 352 ++++ projects/python-gzipstream/html/index.html | 17 projects/python-gzipstream/html/module-tree.html | 105 + projects/python-gzipstream/html/redirect.html | 38 projects/python-gzipstream/html/toc-everything.html | 48 projects/python-gzipstream/html/toc-gzipstream-module.html | 47 projects/python-gzipstream/html/toc.html | 33 projects/python-gzipstream/python-gzipstream.spec | 9 projects/python-gzipstream/setup.py | 2 rel-eng/packages/python-gzipstream | 2 23 files changed, 5121 insertions(+), 4 deletions(-)
New commits: commit 58a0780f87c99be06260fe3ab6f1f11b7e3f1019 Author: Miroslav Suchý msuchy@redhat.com Date: Mon Oct 31 00:59:26 2011 +0100
Automatic commit of package [python-gzipstream] release [1.6.2-1].
diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec index 3e32ce0..c347525 100644 --- a/projects/python-gzipstream/python-gzipstream.spec +++ b/projects/python-gzipstream/python-gzipstream.spec @@ -4,7 +4,7 @@
Summary: Streaming zlib (gzip) support for python Name: python-gzipstream -Version: 1.6.1 +Version: 1.6.2 Release: 1%{?dist} URL: https://fedorahosted.org/spacewalk/wiki/Projects/python-gzipstream Source0: https://fedorahosted.org/releases/s/p/spacewalk/python-gzipstream-%%7Bversio... @@ -41,6 +41,10 @@ rm -rf $RPM_BUILD_ROOT %doc LICENSE
%changelog +* Mon Oct 31 2011 Miroslav Suchý 1.6.2-1 +- point to python-gzipstream specific URL +- add documentation + * Fri Jul 22 2011 Jan Pazdziora 1.6.1-1 - We only support version 14 and newer of Fedora, removing conditions for old versions. diff --git a/projects/python-gzipstream/setup.py b/projects/python-gzipstream/setup.py index bd84b6d..afbfd6a 100644 --- a/projects/python-gzipstream/setup.py +++ b/projects/python-gzipstream/setup.py @@ -6,7 +6,7 @@ from distutils.core import setup
setup(name = "gzipstream", - version = "1.6.1", + version = "1.6.2", description = "Streaming zlib (gzip) support for python", long_description = """\ A streaming gzip handler. diff --git a/rel-eng/packages/python-gzipstream b/rel-eng/packages/python-gzipstream index 4e52ccc..20ba39f 100644 --- a/rel-eng/packages/python-gzipstream +++ b/rel-eng/packages/python-gzipstream @@ -1 +1 @@ -1.6.1-1 projects/python-gzipstream/ +1.6.2-1 projects/python-gzipstream/
commit 154e0300e2d55575e419b27ef3e637ea9bfcdf59 Author: Miroslav Suchý msuchy@redhat.com Date: Mon Oct 31 00:58:57 2011 +0100
point to python-gzipstream specific URL
diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec index 132e959..3e32ce0 100644 --- a/projects/python-gzipstream/python-gzipstream.spec +++ b/projects/python-gzipstream/python-gzipstream.spec @@ -6,7 +6,7 @@ Summary: Streaming zlib (gzip) support for python Name: python-gzipstream Version: 1.6.1 Release: 1%{?dist} -URL: https://fedorahosted.org/spacewalk +URL: https://fedorahosted.org/spacewalk/wiki/Projects/python-gzipstream Source0: https://fedorahosted.org/releases/s/p/spacewalk/python-gzipstream-%%7Bversio... License: Python and GPLv2 Group: Development/Libraries
commit 0dad8668fd1e770edf9664c3b5a9c081dc44e890 Author: Miroslav Suchý msuchy@redhat.com Date: Mon Oct 31 00:58:16 2011 +0100
add documentation
diff --git a/projects/python-gzipstream/html/abc.ABCMeta-class.html b/projects/python-gzipstream/html/abc.ABCMeta-class.html new file mode 100644 index 0000000..e292269 --- /dev/null +++ b/projects/python-gzipstream/html/abc.ABCMeta-class.html @@ -0,0 +1,437 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>abc.ABCMeta</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + abc :: + ABCMeta :: + Class ABCMeta + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="abc.ABCMeta-class.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<!-- ==================== TYPE DESCRIPTION ==================== --> +<h1 class="epydoc">Type ABCMeta</h1><p class="nomargin-top"></p> +<pre class="base-tree"> +object --+ + | + type --+ + | + <strong class="uidshort">ABCMeta</strong> +</pre> + +<hr /> +<p>Metaclass for defining Abstract Base Classes (ABCs).</p> + <p>Use this metaclass to create an ABC. An ABC can be subclassed + directly, and then acts as a mix-in class. You can also register + unrelated concrete classes (even built-in classes) and unrelated ABCs as + 'virtual subclasses' -- these and their descendants will be considered + subclasses of the registering ABC by the built-in issubclass() function, + but the registering ABC won't show up in their MRO (Method Resolution + Order) nor will method implementations defined by the registering ABC be + callable (not even via super()).</p> + +<!-- ==================== INSTANCE METHODS ==================== --> +<a name="section-InstanceMethods"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Instance Methods</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-InstanceMethods" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type">check if an object is an instance</span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="abc.ABCMeta-class.html#__instancecheck__" class="summary-sig-name">__instancecheck__</a>(<span class="summary-sig-arg">cls</span>, + <span class="summary-sig-arg">instance</span>)</span><br /> + Override for isinstance(instance, cls).</td> + <td align="right" valign="top"> + + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type">check if a class is a subclass</span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="abc.ABCMeta-class.html#__subclasscheck__" class="summary-sig-name">__subclasscheck__</a>(<span class="summary-sig-arg">cls</span>, + <span class="summary-sig-arg">subclass</span>)</span><br /> + Override for issubclass(subclass, cls).</td> + <td align="right" valign="top"> + + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="_dump_registry"></a><span class="summary-sig-name">_dump_registry</span>(<span class="summary-sig-arg">cls</span>, + <span class="summary-sig-arg">file</span>=<span class="summary-sig-default">None</span>)</span><br /> + Debug helper to print the ABC registry.</td> + <td align="right" valign="top"> + + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="register"></a><span class="summary-sig-name">register</span>(<span class="summary-sig-arg">cls</span>, + <span class="summary-sig-arg">subclass</span>)</span><br /> + Register a virtual subclass of an ABC.</td> + <td align="right" valign="top"> + + + </td> + </tr> + </table> + + </td> + </tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>: + <code>__call__</code>, + <code>__delattr__</code>, + <code>__eq__</code>, + <code>__ge__</code>, + <code>__getattribute__</code>, + <code>__gt__</code>, + <code>__hash__</code>, + <code>__init__</code>, + <code>__le__</code>, + <code>__lt__</code>, + <code>__ne__</code>, + <code>__repr__</code>, + <code>__setattr__</code>, + <code>__subclasses__</code>, + <code>mro</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__format__</code>, + <code>__reduce__</code>, + <code>__reduce_ex__</code>, + <code>__sizeof__</code>, + <code>__str__</code>, + <code>__subclasshook__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== STATIC METHODS ==================== --> +<a name="section-StaticMethods"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Static Methods</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-StaticMethods" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type">a new object with type S, a subtype of T</span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="abc.ABCMeta-class.html#__new__" class="summary-sig-name">__new__</a>(<span class="summary-sig-arg">mcls</span>, + <span class="summary-sig-arg">name</span>, + <span class="summary-sig-arg">bases</span>, + <span class="summary-sig-arg">namespace</span>)</span></td> + <td align="right" valign="top"> + + + </td> + </tr> + </table> + + </td> + </tr> +</table> +<!-- ==================== CLASS VARIABLES ==================== --> +<a name="section-ClassVariables"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Class Variables</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-ClassVariables" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_abc_invalidation_counter"></a><span class="summary-name">_abc_invalidation_counter</span> = <code title="18">18</code> + </td> + </tr> +</table> +<!-- ==================== PROPERTIES ==================== --> +<a name="section-Properties"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Properties</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Properties" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>type</code></b>: + <code>__abstractmethods__</code>, + <code>__base__</code>, + <code>__bases__</code>, + <code>__basicsize__</code>, + <code>__dictoffset__</code>, + <code>__flags__</code>, + <code>__itemsize__</code>, + <code>__mro__</code>, + <code>__name__</code>, + <code>__weakrefoffset__</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__class__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== METHOD DETAILS ==================== --> +<a name="section-MethodDetails"></a> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Method Details</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-MethodDetails" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +</table> +<a name="__instancecheck__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__instancecheck__</span>(<span class="sig-arg">cls</span>, + <span class="sig-arg">instance</span>)</span> + </h3> + </td><td align="right" valign="top" + > + </td> + </tr></table> + + <p>Override for isinstance(instance, cls).</p> + <dl class="fields"> + <dt>Returns: check if an object is an instance</dt> + <dt>Overrides: + type.__instancecheck__ + </dt> + </dl> +</td></tr></table> +</div> +<a name="__new__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__new__</span>(<span class="sig-arg">mcls</span>, + <span class="sig-arg">name</span>, + <span class="sig-arg">bases</span>, + <span class="sig-arg">namespace</span>)</span> + <br /><em class="fname">Static Method</em> + </h3> + </td><td align="right" valign="top" + > + </td> + </tr></table> + + + <dl class="fields"> + <dt>Returns: a new object with type S, a subtype of T</dt> + <dt>Overrides: + object.__new__ + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="__subclasscheck__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__subclasscheck__</span>(<span class="sig-arg">cls</span>, + <span class="sig-arg">subclass</span>)</span> + </h3> + </td><td align="right" valign="top" + > + </td> + </tr></table> + + <p>Override for issubclass(subclass, cls).</p> + <dl class="fields"> + <dt>Returns: check if a class is a subclass</dt> + <dt>Overrides: + type.__subclasscheck__ + </dt> + </dl> +</td></tr></table> +</div> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/api-objects.txt b/projects/python-gzipstream/html/api-objects.txt new file mode 100644 index 0000000..299f70a --- /dev/null +++ b/projects/python-gzipstream/html/api-objects.txt @@ -0,0 +1,66 @@ +gzipstream gzipstream-module.html +gzipstream._DEBUG_YN gzipstream-module.html#_DEBUG_YN +gzipstream.__package__ gzipstream-module.html#__package__ +gzipstream._SYS_VERSION gzipstream-module.html#_SYS_VERSION +gzipstream.__getSysVersion gzipstream-module.html#__getSysVersion +abc.ABCMeta abc.ABCMeta-class.html +abc.ABCMeta.__new__ abc.ABCMeta-class.html#__new__ +abc.ABCMeta._abc_invalidation_counter abc.ABCMeta-class.html#_abc_invalidation_counter +abc.ABCMeta.__instancecheck__ abc.ABCMeta-class.html#__instancecheck__ +abc.ABCMeta.__subclasscheck__ abc.ABCMeta-class.html#__subclasscheck__ +abc.ABCMeta.register abc.ABCMeta-class.html#register +abc.ABCMeta._dump_registry abc.ABCMeta-class.html#_dump_registry +gzipstream.GzipStream gzipstream.GzipStream-class.html +io.IOBase.__metaclass__ abc.ABCMeta-class.html +gzipstream.GzipStream._read32XL gzipstream.GzipStream-class.html#_read32XL +gzipstream.GzipStream.close gzipstream.GzipStream-class.html#close +gzipstream.GzipStream.seek gzipstream.GzipStream-class.html#seek +gzipstream.GzipStream.__init__ gzipstream.GzipStream-class.html#__init__ +gzipstream.GzipStream._read_eof gzipstream.GzipStream-class.html#_read_eof +gzipstream.GzipStream._initModeLogic gzipstream.GzipStream-class.html#_initModeLogic +gzipstream.GzipStream.VERSION gzipstream.GzipStream-class.html#VERSION +gzipstream.GzipStream._read gzipstream.GzipStream-class.html#_read +gzipstream.GzipStream.__repr__ gzipstream.GzipStream-class.html#__repr__ +gzipstream.GzipStreamXL gzipstream.GzipStreamXL-class.html +io.IOBase.__metaclass__ abc.ABCMeta-class.html +gzipstream.GzipStream._read32XL gzipstream.GzipStream-class.html#_read32XL +gzipstream.GzipStreamXL._init_write gzipstream.GzipStreamXL-class.html#_init_write +gzipstream.GzipStream.close gzipstream.GzipStream-class.html#close +gzipstream.GzipStreamXL._init_read gzipstream.GzipStreamXL-class.html#_init_read +gzipstream.GzipStream.seek gzipstream.GzipStream-class.html#seek +gzipstream.GzipStreamXL.__init__ gzipstream.GzipStreamXL-class.html#__init__ +gzipstream.GzipStream._read_eof gzipstream.GzipStream-class.html#_read_eof +gzipstream.GzipStream._initModeLogic gzipstream.GzipStream-class.html#_initModeLogic +gzipstream.GzipStream.VERSION gzipstream.GzipStream-class.html#VERSION +gzipstream.GzipStream._read gzipstream.GzipStream-class.html#_read +gzipstream.GzipStream.__repr__ gzipstream.GzipStream-class.html#__repr__ +gzipstream._StreamBuf gzipstream._StreamBuf-class.html +gzipstream._StreamBuf.readlines gzipstream._StreamBuf-class.html#readlines +gzipstream._StreamBuf.__MAX_BUFIO_SIZE gzipstream._StreamBuf-class.html#__MAX_BUFIO_SIZE +gzipstream._StreamBuf._refactorBufIO gzipstream._StreamBuf-class.html#_refactorBufIO +gzipstream._StreamBuf.flush gzipstream._StreamBuf-class.html#flush +gzipstream._StreamBuf._StreamBuf__INT_CHECK_SIZE gzipstream._StreamBuf-class.html#_StreamBuf__INT_CHECK_SIZE +gzipstream._StreamBuf.close gzipstream._StreamBuf-class.html#close +gzipstream._StreamBuf.seek gzipstream._StreamBuf-class.html#seek +gzipstream._StreamBuf.__debugThread gzipstream._StreamBuf-class.html#__debugThread +gzipstream._StreamBuf.__init__ gzipstream._StreamBuf-class.html#__init__ +gzipstream._StreamBuf._StreamBuf__MIN_READ_SIZE gzipstream._StreamBuf-class.html#_StreamBuf__MIN_READ_SIZE +gzipstream._StreamBuf.write gzipstream._StreamBuf-class.html#write +gzipstream._StreamBuf.__del__ gzipstream._StreamBuf-class.html#__del__ +gzipstream._StreamBuf._StreamBuf__debugThread gzipstream._StreamBuf-class.html#_StreamBuf__debugThread +gzipstream._StreamBuf.tell gzipstream._StreamBuf-class.html#tell +gzipstream._StreamBuf.isatty gzipstream._StreamBuf-class.html#isatty +gzipstream._StreamBuf.read gzipstream._StreamBuf-class.html#read +gzipstream._StreamBuf.VERSION gzipstream._StreamBuf-class.html#VERSION +gzipstream._StreamBuf.readline gzipstream._StreamBuf-class.html#readline +gzipstream._StreamBuf._StreamBuf__ABS_MAX_BUFIO_SIZE gzipstream._StreamBuf-class.html#_StreamBuf__ABS_MAX_BUFIO_SIZE +gzipstream._StreamBuf.writelines gzipstream._StreamBuf-class.html#writelines +gzipstream._StreamBuf._StreamBuf__MAX_BUFIO_SIZE gzipstream._StreamBuf-class.html#_StreamBuf__MAX_BUFIO_SIZE +gzipstream._StreamBuf._StreamBuf__checkInt gzipstream._StreamBuf-class.html#_StreamBuf__checkInt +gzipstream._StreamBuf.__MIN_READ_SIZE gzipstream._StreamBuf-class.html#__MIN_READ_SIZE +gzipstream._StreamBuf._read gzipstream._StreamBuf-class.html#_read +gzipstream._StreamBuf.__checkInt gzipstream._StreamBuf-class.html#__checkInt +gzipstream._StreamBuf._dumpValues gzipstream._StreamBuf-class.html#_dumpValues +gzipstream._StreamBuf.__repr__ gzipstream._StreamBuf-class.html#__repr__ +gzipstream._StreamBuf.__INT_CHECK_SIZE gzipstream._StreamBuf-class.html#__INT_CHECK_SIZE +gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE gzipstream._StreamBuf-class.html#__ABS_MAX_BUFIO_SIZE diff --git a/projects/python-gzipstream/html/class-tree.html b/projects/python-gzipstream/html/class-tree.html new file mode 100644 index 0000000..65d136c --- /dev/null +++ b/projects/python-gzipstream/html/class-tree.html @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Class Hierarchy</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Trees </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="class-tree.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<center><b> + [ <a href="module-tree.html">Module Hierarchy</a> + | <a href="class-tree.html">Class Hierarchy</a> ] +</b></center><br /> +<h1 class="epydoc">Class Hierarchy</h1> +<ul class="nomargin-top"> + <li> <strong class="uidlink"><a href="gzipstream._StreamBuf-class.html" onclick="show_private();">gzipstream._StreamBuf</a></strong>: + <em class="summary">Stream buffer for file-like objects.</em> + </li> + <li> <strong class="uidlink">object</strong>: + <em class="summary">The most base type</em> + <ul> + <li> <strong class="uidlink">_io._IOBase</strong>: + <em class="summary">The abstract base class for all I/O classes, acting on streams of +bytes.</em> + <ul> + <li> <strong class="uidlink">io.IOBase</strong> + <ul> + <li> <strong class="uidlink">io.BufferedIOBase</strong> + <ul> + <li> <strong class="uidlink">gzip.GzipFile</strong>: + <em class="summary">The GzipFile class simulates most of the methods of a file object + with the exception of the readinto() and truncate() methods.</em> + <ul> + <li> <strong class="uidlink"><a href="gzipstream.GzipStream-class.html">gzipstream.GzipStream</a></strong>: + <em class="summary">Handle streaming gzipped data</em> + </li> + </ul> + </li> + </ul> + </li> + </ul> + </li> + <li> <strong class="uidlink">_io._BufferedIOBase</strong>: + <em class="summary">Base class for buffered IO objects.</em> + <ul> + <li> <strong class="uidlink">io.BufferedIOBase</strong> + <ul> + <li> <strong class="uidlink">gzip.GzipFile</strong>: + <em class="summary">The GzipFile class simulates most of the methods of a file object + with the exception of the readinto() and truncate() methods.</em> + <ul> + <li> <strong class="uidlink"><a href="gzipstream.GzipStream-class.html">gzipstream.GzipStream</a></strong>: + <em class="summary">Handle streaming gzipped data</em> + </li> + </ul> + </li> + </ul> + </li> + </ul> + </li> + </ul> + </li> + <li> <strong class="uidlink">type</strong>: + <em class="summary">type(object) -> the object's type type(name, bases, dict) -> + a new type</em> + <ul> + <li> <strong class="uidlink"><a href="abc.ABCMeta-class.html">abc.ABCMeta</a></strong>: + <em class="summary">Metaclass for defining Abstract Base Classes (ABCs).</em> + </li> + </ul> + </li> + </ul> + </li> +</ul> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Trees </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/crarr.png b/projects/python-gzipstream/html/crarr.png new file mode 100644 index 0000000..26b43c5 Binary files /dev/null and b/projects/python-gzipstream/html/crarr.png differ diff --git a/projects/python-gzipstream/html/epydoc.css b/projects/python-gzipstream/html/epydoc.css new file mode 100644 index 0000000..86d4170 --- /dev/null +++ b/projects/python-gzipstream/html/epydoc.css @@ -0,0 +1,322 @@ + + +/* Epydoc CSS Stylesheet + * + * This stylesheet can be used to customize the appearance of epydoc's + * HTML output. + * + */ + +/* Default Colors & Styles + * - Set the default foreground & background color with 'body'; and + * link colors with 'a:link' and 'a:visited'. + * - Use bold for decision list terms. + * - The heading styles defined here are used for headings *within* + * docstring descriptions. All headings used by epydoc itself use + * either class='epydoc' or class='toc' (CSS styles for both + * defined below). + */ +body { background: #ffffff; color: #000000; } +p { margin-top: 0.5em; margin-bottom: 0.5em; } +a:link { color: #0000ff; } +a:visited { color: #204080; } +dt { font-weight: bold; } +h1 { font-size: +140%; font-style: italic; + font-weight: bold; } +h2 { font-size: +125%; font-style: italic; + font-weight: bold; } +h3 { font-size: +110%; font-style: italic; + font-weight: normal; } +code { font-size: 100%; } +/* N.B.: class, not pseudoclass */ +a.link { font-family: monospace; } + +/* Page Header & Footer + * - The standard page header consists of a navigation bar (with + * pointers to standard pages such as 'home' and 'trees'); a + * breadcrumbs list, which can be used to navigate to containing + * classes or modules; options links, to show/hide private + * variables and to show/hide frames; and a page title (using + * <h1>). The page title may be followed by a link to the + * corresponding source code (using 'span.codelink'). + * - The footer consists of a navigation bar, a timestamp, and a + * pointer to epydoc's homepage. + */ +h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } +h2.epydoc { font-size: +130%; font-weight: bold; } +h3.epydoc { font-size: +115%; font-weight: bold; + margin-top: 0.2em; } +td h3.epydoc { font-size: +115%; font-weight: bold; + margin-bottom: 0; } +table.navbar { background: #a0c0ff; color: #000000; + border: 2px groove #c0d0d0; } +table.navbar table { color: #000000; } +th.navbar-select { background: #70b0ff; + color: #000000; } +table.navbar a { text-decoration: none; } +table.navbar a:link { color: #0000ff; } +table.navbar a:visited { color: #204080; } +span.breadcrumbs { font-size: 85%; font-weight: bold; } +span.options { font-size: 70%; } +span.codelink { font-size: 85%; } +td.footer { font-size: 85%; } + +/* Table Headers + * - Each summary table and details section begins with a 'header' + * row. This row contains a section title (marked by + * 'span.table-header') as well as a show/hide private link + * (marked by 'span.options', defined above). + * - Summary tables that contain user-defined groups mark those + * groups using 'group header' rows. + */ +td.table-header { background: #70b0ff; color: #000000; + border: 1px solid #608090; } +td.table-header table { color: #000000; } +td.table-header table a:link { color: #0000ff; } +td.table-header table a:visited { color: #204080; } +span.table-header { font-size: 120%; font-weight: bold; } +th.group-header { background: #c0e0f8; color: #000000; + text-align: left; font-style: italic; + font-size: 115%; + border: 1px solid #608090; } + +/* Summary Tables (functions, variables, etc) + * - Each object is described by a single row of the table with + * two cells. The left cell gives the object's type, and is + * marked with 'code.summary-type'. The right cell gives the + * object's name and a summary description. + * - CSS styles for the table's header and group headers are + * defined above, under 'Table Headers' + */ +table.summary { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; + margin-bottom: 0.5em; } +td.summary { border: 1px solid #608090; } +code.summary-type { font-size: 85%; } +table.summary a:link { color: #0000ff; } +table.summary a:visited { color: #204080; } + + +/* Details Tables (functions, variables, etc) + * - Each object is described in its own div. + * - A single-row summary table w/ table-header is used as + * a header for each details section (CSS style for table-header + * is defined above, under 'Table Headers'). + */ +table.details { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; + margin: .2em 0 0 0; } +table.details table { color: #000000; } +table.details a:link { color: #0000ff; } +table.details a:visited { color: #204080; } + +/* Fields */ +dl.fields { margin-left: 2em; margin-top: 1em; + margin-bottom: 1em; } +dl.fields dd ul { margin-left: 0em; padding-left: 0em; } +dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } +div.fields { margin-left: 2em; } +div.fields p { margin-bottom: 0.5em; } + +/* Index tables (identifier index, term index, etc) + * - link-index is used for indices containing lists of links + * (namely, the identifier index & term index). + * - index-where is used in link indices for the text indicating + * the container/source for each link. + * - metadata-index is used for indices containing metadata + * extracted from fields (namely, the bug index & todo index). + */ +table.link-index { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; } +td.link-index { border-width: 0px; } +table.link-index a:link { color: #0000ff; } +table.link-index a:visited { color: #204080; } +span.index-where { font-size: 70%; } +table.metadata-index { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; + margin: .2em 0 0 0; } +td.metadata-index { border-width: 1px; border-style: solid; } +table.metadata-index a:link { color: #0000ff; } +table.metadata-index a:visited { color: #204080; } + +/* Function signatures + * - sig* is used for the signature in the details section. + * - .summary-sig* is used for the signature in the summary + * table, and when listing property accessor functions. + * */ +.sig-name { color: #006080; } +.sig-arg { color: #008060; } +.sig-default { color: #602000; } +.summary-sig { font-family: monospace; } +.summary-sig-name { color: #006080; font-weight: bold; } +table.summary a.summary-sig-name:link + { color: #006080; font-weight: bold; } +table.summary a.summary-sig-name:visited + { color: #006080; font-weight: bold; } +.summary-sig-arg { color: #006040; } +.summary-sig-default { color: #501800; } + +/* Subclass list + */ +ul.subclass-list { display: inline; } +ul.subclass-list li { display: inline; } + +/* To render variables, classes etc. like functions */ +table.summary .summary-name { color: #006080; font-weight: bold; + font-family: monospace; } +table.summary + a.summary-name:link { color: #006080; font-weight: bold; + font-family: monospace; } +table.summary + a.summary-name:visited { color: #006080; font-weight: bold; + font-family: monospace; } + +/* Variable values + * - In the 'variable details' sections, each varaible's value is + * listed in a 'pre.variable' box. The width of this box is + * restricted to 80 chars; if the value's repr is longer than + * this it will be wrapped, using a backslash marked with + * class 'variable-linewrap'. If the value's repr is longer + * than 3 lines, the rest will be ellided; and an ellipsis + * marker ('...' marked with 'variable-ellipsis') will be used. + * - If the value is a string, its quote marks will be marked + * with 'variable-quote'. + * - If the variable is a regexp, it is syntax-highlighted using + * the re* CSS classes. + */ +pre.variable { padding: .5em; margin: 0; + background: #dce4ec; color: #000000; + border: 1px solid #708890; } +.variable-linewrap { color: #604000; font-weight: bold; } +.variable-ellipsis { color: #604000; font-weight: bold; } +.variable-quote { color: #604000; font-weight: bold; } +.variable-group { color: #008000; font-weight: bold; } +.variable-op { color: #604000; font-weight: bold; } +.variable-string { color: #006030; } +.variable-unknown { color: #a00000; font-weight: bold; } +.re { color: #000000; } +.re-char { color: #006030; } +.re-op { color: #600000; } +.re-group { color: #003060; } +.re-ref { color: #404040; } + +/* Base tree + * - Used by class pages to display the base class hierarchy. + */ +pre.base-tree { font-size: 80%; margin: 0; } + +/* Frames-based table of contents headers + * - Consists of two frames: one for selecting modules; and + * the other listing the contents of the selected module. + * - h1.toc is used for each frame's heading + * - h2.toc is used for subheadings within each frame. + */ +h1.toc { text-align: center; font-size: 105%; + margin: 0; font-weight: bold; + padding: 0; } +h2.toc { font-size: 100%; font-weight: bold; + margin: 0.5em 0 0 -0.3em; } + +/* Syntax Highlighting for Source Code + * - doctest examples are displayed in a 'pre.py-doctest' block. + * If the example is in a details table entry, then it will use + * the colors specified by the 'table pre.py-doctest' line. + * - Source code listings are displayed in a 'pre.py-src' block. + * Each line is marked with 'span.py-line' (used to draw a line + * down the left margin, separating the code from the line + * numbers). Line numbers are displayed with 'span.py-lineno'. + * The expand/collapse block toggle button is displayed with + * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not + * modify the font size of the text.) + * - If a source code page is opened with an anchor, then the + * corresponding code block will be highlighted. The code + * block's header is highlighted with 'py-highlight-hdr'; and + * the code block's body is highlighted with 'py-highlight'. + * - The remaining py-* classes are used to perform syntax + * highlighting (py-string for string literals, py-name for names, + * etc.) + */ +pre.py-doctest { padding: .5em; margin: 1em; + background: #e8f0f8; color: #000000; + border: 1px solid #708890; } +table pre.py-doctest { background: #dce4ec; + color: #000000; } +pre.py-src { border: 2px solid #000000; + background: #f0f0f0; color: #000000; } +.py-line { border-left: 2px solid #000000; + margin-left: .2em; padding-left: .4em; } +.py-lineno { font-style: italic; font-size: 90%; + padding-left: .5em; } +a.py-toggle { text-decoration: none; } +div.py-highlight-hdr { border-top: 2px solid #000000; + border-bottom: 2px solid #000000; + background: #d8e8e8; } +div.py-highlight { border-bottom: 2px solid #000000; + background: #d0e0e0; } +.py-prompt { color: #005050; font-weight: bold;} +.py-more { color: #005050; font-weight: bold;} +.py-string { color: #006030; } +.py-comment { color: #003060; } +.py-keyword { color: #600000; } +.py-output { color: #404040; } +.py-name { color: #000050; } +.py-name:link { color: #000050 !important; } +.py-name:visited { color: #000050 !important; } +.py-number { color: #005000; } +.py-defname { color: #000060; font-weight: bold; } +.py-def-name { color: #000060; font-weight: bold; } +.py-base-class { color: #000060; } +.py-param { color: #000060; } +.py-docstring { color: #006030; } +.py-decorator { color: #804020; } +/* Use this if you don't want links to names underlined: */ +/*a.py-name { text-decoration: none; }*/ + +/* Graphs & Diagrams + * - These CSS styles are used for graphs & diagrams generated using + * Graphviz dot. 'img.graph-without-title' is used for bare + * diagrams (to remove the border created by making the image + * clickable). + */ +img.graph-without-title { border: none; } +img.graph-with-title { border: 1px solid #000000; } +span.graph-title { font-weight: bold; } +span.graph-caption { } + +/* General-purpose classes + * - 'p.indent-wrapped-lines' defines a paragraph whose first line + * is not indented, but whose subsequent lines are. + * - The 'nomargin-top' class is used to remove the top margin (e.g. + * from lists). The 'nomargin' class is used to remove both the + * top and bottom margin (but not the left or right margin -- + * for lists, that would cause the bullets to disappear.) + */ +p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; + margin: 0; } +.nomargin-top { margin-top: 0; } +.nomargin { margin-top: 0; margin-bottom: 0; } + +/* HTML Log */ +div.log-block { padding: 0; margin: .5em 0 .5em 0; + background: #e8f0f8; color: #000000; + border: 1px solid #000000; } +div.log-error { padding: .1em .3em .1em .3em; margin: 4px; + background: #ffb0b0; color: #000000; + border: 1px solid #000000; } +div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; + background: #ffffb0; color: #000000; + border: 1px solid #000000; } +div.log-info { padding: .1em .3em .1em .3em; margin: 4px; + background: #b0ffb0; color: #000000; + border: 1px solid #000000; } +h2.log-hdr { background: #70b0ff; color: #000000; + margin: 0; padding: 0em 0.5em 0em 0.5em; + border-bottom: 1px solid #000000; font-size: 110%; } +p.log { font-weight: bold; margin: .5em 0 .5em 0; } +tr.opt-changed { color: #000000; font-weight: bold; } +tr.opt-default { color: #606060; } +pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/projects/python-gzipstream/html/epydoc.js b/projects/python-gzipstream/html/epydoc.js new file mode 100644 index 0000000..e787dbc --- /dev/null +++ b/projects/python-gzipstream/html/epydoc.js @@ -0,0 +1,293 @@ +function toggle_private() { + // Search for any private/public links on this page. Store + // their old text in "cmd," so we will know what action to + // take; and change their text to the opposite action. + var cmd = "?"; + var elts = document.getElementsByTagName("a"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "privatelink") { + cmd = elts[i].innerHTML; + elts[i].innerHTML = ((cmd && cmd.substr(0,4)=="show")? + "hide private":"show private"); + } + } + // Update all DIVs containing private objects. + var elts = document.getElementsByTagName("div"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "private") { + elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block"); + } + else if (elts[i].className == "public") { + elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"block":"none"); + } + } + // Update all table rows containing private objects. Note, we + // use "" instead of "block" becaue IE & firefox disagree on what + // this should be (block vs table-row), and "" just gives the + // default for both browsers. + var elts = document.getElementsByTagName("tr"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "private") { + elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":""); + } + } + // Update all list items containing private objects. + var elts = document.getElementsByTagName("li"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "private") { + elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")? + "none":""); + } + } + // Update all list items containing private objects. + var elts = document.getElementsByTagName("ul"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "private") { + elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":"block"); + } + } + // Set a cookie to remember the current option. + document.cookie = "EpydocPrivate="+cmd; + } +function show_private() { + var elts = document.getElementsByTagName("a"); + for(var i=0; i<elts.length; i++) { + if (elts[i].className == "privatelink") { + cmd = elts[i].innerHTML; + if (cmd && cmd.substr(0,4)=="show") + toggle_private(); + } + } + } +function getCookie(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else + { begin += 2; } + var end = document.cookie.indexOf(";", begin); + if (end == -1) + { end = dc.length; } + return unescape(dc.substring(begin + prefix.length, end)); + } +function setFrame(url1, url2) { + parent.frames[1].location.href = url1; + parent.frames[2].location.href = url2; + } +function checkCookie() { + var cmd=getCookie("EpydocPrivate"); + if (cmd && cmd.substr(0,4)!="show" && location.href.indexOf("#_") < 0) + toggle_private(); + } +function toggleCallGraph(id) { + var elt = document.getElementById(id); + if (elt.style.display == "none") + elt.style.display = "block"; + else + elt.style.display = "none"; + } +function expand(id) { + var elt = document.getElementById(id+"-expanded"); + if (elt) elt.style.display = "block"; + var elt = document.getElementById(id+"-expanded-linenums"); + if (elt) elt.style.display = "block"; + var elt = document.getElementById(id+"-collapsed"); + if (elt) { elt.innerHTML = ""; elt.style.display = "none"; } + var elt = document.getElementById(id+"-collapsed-linenums"); + if (elt) { elt.innerHTML = ""; elt.style.display = "none"; } + var elt = document.getElementById(id+"-toggle"); + if (elt) { elt.innerHTML = "-"; } +} + +function collapse(id) { + var elt = document.getElementById(id+"-expanded"); + if (elt) elt.style.display = "none"; + var elt = document.getElementById(id+"-expanded-linenums"); + if (elt) elt.style.display = "none"; + var elt = document.getElementById(id+"-collapsed-linenums"); + if (elt) { elt.innerHTML = "<br />"; elt.style.display="block"; } + var elt = document.getElementById(id+"-toggle"); + if (elt) { elt.innerHTML = "+"; } + var elt = document.getElementById(id+"-collapsed"); + if (elt) { + elt.style.display = "block"; + + var indent = elt.getAttribute("indent"); + var pad = elt.getAttribute("pad"); + var s = "<tt class='py-lineno'>"; + for (var i=0; i<pad.length; i++) { s += " " } + s += "</tt>"; + s += " <tt class='py-line'>"; + for (var i=0; i<indent.length; i++) { s += " " } + s += "<a href='#' onclick='expand(\"" + id; + s += "\");return false'>...</a></tt><br />"; + elt.innerHTML = s; + } +} + +function toggle(id) { + elt = document.getElementById(id+"-toggle"); + if (elt.innerHTML == "-") + collapse(id); + else + expand(id); + return false; +} + +function highlight(id) { + var elt = document.getElementById(id+"-def"); + if (elt) elt.className = "py-highlight-hdr"; + var elt = document.getElementById(id+"-expanded"); + if (elt) elt.className = "py-highlight"; + var elt = document.getElementById(id+"-collapsed"); + if (elt) elt.className = "py-highlight"; +} + +function num_lines(s) { + var n = 1; + var pos = s.indexOf("\n"); + while ( pos > 0) { + n += 1; + pos = s.indexOf("\n", pos+1); + } + return n; +} + +// Collapse all blocks that mave more than `min_lines` lines. +function collapse_all(min_lines) { + var elts = document.getElementsByTagName("div"); + for (var i=0; i<elts.length; i++) { + var elt = elts[i]; + var split = elt.id.indexOf("-"); + if (split > 0) + if (elt.id.substring(split, elt.id.length) == "-expanded") + if (num_lines(elt.innerHTML) > min_lines) + collapse(elt.id.substring(0, split)); + } +} + +function expandto(href) { + var start = href.indexOf("#")+1; + if (start != 0 && start != href.length) { + if (href.substring(start, href.length) != "-") { + collapse_all(4); + pos = href.indexOf(".", start); + while (pos != -1) { + var id = href.substring(start, pos); + expand(id); + pos = href.indexOf(".", pos+1); + } + var id = href.substring(start, href.length); + expand(id); + highlight(id); + } + } +} + +function kill_doclink(id) { + var parent = document.getElementById(id); + parent.removeChild(parent.childNodes.item(0)); +} +function auto_kill_doclink(ev) { + if (!ev) var ev = window.event; + if (!this.contains(ev.toElement)) { + var parent = document.getElementById(this.parentID); + parent.removeChild(parent.childNodes.item(0)); + } +} + +function doclink(id, name, targets_id) { + var elt = document.getElementById(id); + + // If we already opened the box, then destroy it. + // (This case should never occur, but leave it in just in case.) + if (elt.childNodes.length > 1) { + elt.removeChild(elt.childNodes.item(0)); + } + else { + // The outer box: relative + inline positioning. + var box1 = document.createElement("div"); + box1.style.position = "relative"; + box1.style.display = "inline"; + box1.style.top = 0; + box1.style.left = 0; + + // A shadow for fun + var shadow = document.createElement("div"); + shadow.style.position = "absolute"; + shadow.style.left = "-1.3em"; + shadow.style.top = "-1.3em"; + shadow.style.background = "#404040"; + + // The inner box: absolute positioning. + var box2 = document.createElement("div"); + box2.style.position = "relative"; + box2.style.border = "1px solid #a0a0a0"; + box2.style.left = "-.2em"; + box2.style.top = "-.2em"; + box2.style.background = "white"; + box2.style.padding = ".3em .4em .3em .4em"; + box2.style.fontStyle = "normal"; + box2.onmouseout=auto_kill_doclink; + box2.parentID = id; + + // Get the targets + var targets_elt = document.getElementById(targets_id); + var targets = targets_elt.getAttribute("targets"); + var links = ""; + target_list = targets.split(","); + for (var i=0; i<target_list.length; i++) { + var target = target_list[i].split("="); + links += "<li><a href='" + target[1] + + "' style='text-decoration:none'>" + + target[0] + "</a></li>"; + } + + // Put it all together. + elt.insertBefore(box1, elt.childNodes.item(0)); + //box1.appendChild(box2); + box1.appendChild(shadow); + shadow.appendChild(box2); + box2.innerHTML = + "Which <b>"+name+"</b> do you want to see documentation for?" + + "<ul style='margin-bottom: 0;'>" + + links + + "<li><a href='#' style='text-decoration:none' " + + "onclick='kill_doclink(""+id+"");return false;'>"+ + "<i>None of the above</i></a></li></ul>"; + } + return false; +} + +function get_anchor() { + var href = location.href; + var start = href.indexOf("#")+1; + if ((start != 0) && (start != href.length)) + return href.substring(start, href.length); + } +function redirect_url(dottedName) { + // Scan through each element of the "pages" list, and check + // if "name" matches with any of them. + for (var i=0; i<pages.length; i++) { + + // Each page has the form "<pagename>-m" or "<pagename>-c"; + // extract the <pagename> portion & compare it to dottedName. + var pagename = pages[i].substring(0, pages[i].length-2); + if (pagename == dottedName.substring(0,pagename.length)) { + + // We've found a page that matches `dottedName`; + // construct its URL, using leftover `dottedName` + // content to form an anchor. + var pagetype = pages[i].charAt(pages[i].length-1); + var url = pagename + ((pagetype=="m")?"-module.html": + "-class.html"); + if (dottedName.length > pagename.length) + url += "#" + dottedName.substring(pagename.length+1, + dottedName.length); + return url; + } + } + } diff --git a/projects/python-gzipstream/html/frames.html b/projects/python-gzipstream/html/frames.html new file mode 100644 index 0000000..7043a77 --- /dev/null +++ b/projects/python-gzipstream/html/frames.html @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" + "DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title> API Documentation </title> +</head> +<frameset cols="20%,80%"> + <frameset rows="30%,70%"> + <frame src="toc.html" name="moduleListFrame" + id="moduleListFrame" /> + <frame src="toc-everything.html" name="moduleFrame" + id="moduleFrame" /> + </frameset> + <frame src="gzipstream-module.html" name="mainFrame" id="mainFrame" /> +</frameset> +</html> diff --git a/projects/python-gzipstream/html/gzipstream-module.html b/projects/python-gzipstream/html/gzipstream-module.html new file mode 100644 index 0000000..7520e0c --- /dev/null +++ b/projects/python-gzipstream/html/gzipstream-module.html @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Home </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + Module gzipstream + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="gzipstream-module.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<!-- ==================== MODULE DESCRIPTION ==================== --> +<h1 class="epydoc">Module gzipstream</h1><p class="nomargin-top"><span class="codelink"><a href="gzipstream-pysrc.html">source code</a></span></p> +<pre class="literalblock"> +GzipStream & GzipStreamXL Classes + +GzipStream (Python v1.5.2 - v2.2.*): + A streaming gzip handler. + gzipstream.GzipStream extends the functionality of the gzip.GzipFile class + to allow the processing of streaming data. + This is done by buffering the stream as it passes through (a seekable + object is needed). + +GzipStreamXL (Python v1.5.2/v2.1.* --- ie. not v2.2.*): + A streaming gzip handler for very large files. + +_StreamBuf: + Allow seeks on socket-like objects -- support GzipStream class. + Enables non-seekable file-like objects some flexibility as regards to + seeking. It does this via a buffer, a StringIO object. Note, because + it is assumed that a socket stream is being manipulated, once the buffer + "window" has passed over a data segment, seeking prior to that is not + allowed. + +XXX: Eventually, I wish to merge this with the gzip.GzipFile somehow and + submit to the python folks. + +Author: Todd Warner <taw@redhat.com> +Copyright (c) 2002-2010, Red Hat, Inc. +Released under Python license and GPLv2 license + +</pre> + +<!-- ==================== CLASSES ==================== --> +<a name="section-Classes"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Classes</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Classes" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a href="gzipstream.GzipStream-class.html" class="summary-name">GzipStream</a><br /> + Handle streaming gzipped data + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a href="gzipstream.GzipStreamXL-class.html" class="summary-name">GzipStreamXL</a><br /> + Handle streaming gzipped data -- large data version. + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a href="gzipstream._StreamBuf-class.html" class="summary-name" onclick="show_private();">_StreamBuf</a><br /> + Stream buffer for file-like objects. + </td> + </tr> +</table> +<!-- ==================== FUNCTIONS ==================== --> +<a name="section-Functions"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Functions</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Functions" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="__getSysVersion"></a><span class="summary-sig-name">__getSysVersion</span>()</span><br /> + Return 1 for Python versions 1.5.* and 2.1.* Return 2 for Python + versions 2.2+.*</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#__getSysVersion">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +</table> +<!-- ==================== VARIABLES ==================== --> +<a name="section-Variables"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Variables</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Variables" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_DEBUG_YN"></a><span class="summary-name">_DEBUG_YN</span> = <code title="0">0</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_SYS_VERSION"></a><span class="summary-name">_SYS_VERSION</span> = <code title="2">2</code> + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code> + </td> + </tr> +</table> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Home </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/gzipstream-pysrc.html b/projects/python-gzipstream/html/gzipstream-pysrc.html new file mode 100644 index 0000000..fb97bb6 --- /dev/null +++ b/projects/python-gzipstream/html/gzipstream-pysrc.html @@ -0,0 +1,768 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Home </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + Module gzipstream + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="gzipstream-pysrc.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<h1 class="epydoc">Source Code for <a href="gzipstream-module.html">Module gzipstream</a></h1> +<pre class="py-src"> +<a name="L1"></a><tt class="py-lineno"> 1</tt> <tt class="py-line"><tt class="py-docstring">"""GzipStream & GzipStreamXL Classes</tt> </tt> +<a name="L2"></a><tt class="py-lineno"> 2</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L3"></a><tt class="py-lineno"> 3</tt> <tt class="py-line"><tt class="py-docstring">GzipStream (Python v1.5.2 - v2.2.*):</tt> </tt> +<a name="L4"></a><tt class="py-lineno"> 4</tt> <tt class="py-line"><tt class="py-docstring"> A streaming gzip handler.</tt> </tt> +<a name="L5"></a><tt class="py-lineno"> 5</tt> <tt class="py-line"><tt class="py-docstring"> gzipstream.GzipStream extends the functionality of the gzip.GzipFile class</tt> </tt> +<a name="L6"></a><tt class="py-lineno"> 6</tt> <tt class="py-line"><tt class="py-docstring"> to allow the processing of streaming data.</tt> </tt> +<a name="L7"></a><tt class="py-lineno"> 7</tt> <tt class="py-line"><tt class="py-docstring"> This is done by buffering the stream as it passes through (a seekable</tt> </tt> +<a name="L8"></a><tt class="py-lineno"> 8</tt> <tt class="py-line"><tt class="py-docstring"> object is needed).</tt> </tt> +<a name="L9"></a><tt class="py-lineno"> 9</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L10"></a><tt class="py-lineno"> 10</tt> <tt class="py-line"><tt class="py-docstring">GzipStreamXL (Python v1.5.2/v2.1.* --- ie. not v2.2.*):</tt> </tt> +<a name="L11"></a><tt class="py-lineno"> 11</tt> <tt class="py-line"><tt class="py-docstring"> A streaming gzip handler for very large files.</tt> </tt> +<a name="L12"></a><tt class="py-lineno"> 12</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L13"></a><tt class="py-lineno"> 13</tt> <tt class="py-line"><tt class="py-docstring">_StreamBuf:</tt> </tt> +<a name="L14"></a><tt class="py-lineno"> 14</tt> <tt class="py-line"><tt class="py-docstring"> Allow seeks on socket-like objects -- support GzipStream class.</tt> </tt> +<a name="L15"></a><tt class="py-lineno"> 15</tt> <tt class="py-line"><tt class="py-docstring"> Enables non-seekable file-like objects some flexibility as regards to</tt> </tt> +<a name="L16"></a><tt class="py-lineno"> 16</tt> <tt class="py-line"><tt class="py-docstring"> seeking. It does this via a buffer, a StringIO object. Note, because</tt> </tt> +<a name="L17"></a><tt class="py-lineno"> 17</tt> <tt class="py-line"><tt class="py-docstring"> it is assumed that a socket stream is being manipulated, once the buffer</tt> </tt> +<a name="L18"></a><tt class="py-lineno"> 18</tt> <tt class="py-line"><tt class="py-docstring"> "window" has passed over a data segment, seeking prior to that is not</tt> </tt> +<a name="L19"></a><tt class="py-lineno"> 19</tt> <tt class="py-line"><tt class="py-docstring"> allowed.</tt> </tt> +<a name="L20"></a><tt class="py-lineno"> 20</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L21"></a><tt class="py-lineno"> 21</tt> <tt class="py-line"><tt class="py-docstring">XXX: Eventually, I wish to merge this with the gzip.GzipFile somehow and</tt> </tt> +<a name="L22"></a><tt class="py-lineno"> 22</tt> <tt class="py-line"><tt class="py-docstring"> submit to the python folks.</tt> </tt> +<a name="L23"></a><tt class="py-lineno"> 23</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L24"></a><tt class="py-lineno"> 24</tt> <tt class="py-line"><tt class="py-docstring">Author: Todd Warner <taw@redhat.com></tt> </tt> +<a name="L25"></a><tt class="py-lineno"> 25</tt> <tt class="py-line"><tt class="py-docstring">Copyright (c) 2002-2010, Red Hat, Inc.</tt> </tt> +<a name="L26"></a><tt class="py-lineno"> 26</tt> <tt class="py-line"><tt class="py-docstring">Released under Python license and GPLv2 license</tt> </tt> +<a name="L27"></a><tt class="py-lineno"> 27</tt> <tt class="py-line"><tt class="py-docstring">"""</tt> </tt> +<a name="L28"></a><tt class="py-lineno"> 28</tt> <tt class="py-line"><tt class="py-comment"># $Id: gzipstream.py,v 1.53 2004/07/08 17:49:26 taw Exp $</tt> </tt> +<a name="L29"></a><tt class="py-lineno"> 29</tt> <tt class="py-line"> </tt> +<a name="L30"></a><tt class="py-lineno"> 30</tt> <tt class="py-line"><tt class="py-comment">#WARNING: gzipstream will wrap a file-object. The responsibility of properly</tt> </tt> +<a name="L31"></a><tt class="py-lineno"> 31</tt> <tt class="py-line"><tt class="py-comment">#WARNING: destroying/closing that file-object resides outside of these</tt> </tt> +<a name="L32"></a><tt class="py-lineno"> 32</tt> <tt class="py-line"><tt class="py-comment">#WARNING: classes.</tt> </tt> +<a name="L33"></a><tt class="py-lineno"> 33</tt> <tt class="py-line"><tt class="py-comment">#WARNING:</tt> </tt> +<a name="L34"></a><tt class="py-lineno"> 34</tt> <tt class="py-line"><tt class="py-comment">#WARNING: Also, due to issues with python 1.5.2/2.1.* garbage collection issues,</tt> </tt> +<a name="L35"></a><tt class="py-lineno"> 35</tt> <tt class="py-line"><tt class="py-comment">#WARNING: responsibility of properly handling flushing IO and other expected</tt> </tt> +<a name="L36"></a><tt class="py-lineno"> 36</tt> <tt class="py-line"><tt class="py-comment">#WARNING: behavior of a properly collected object *also* resides with the</tt> </tt> +<a name="L37"></a><tt class="py-lineno"> 37</tt> <tt class="py-line"><tt class="py-comment">#WARNING: instantiating entity. I.e., you need to explicitely close your</tt> </tt> +<a name="L38"></a><tt class="py-lineno"> 38</tt> <tt class="py-line"><tt class="py-comment">#WARNING: GzipStream object!!!</tt> </tt> +<a name="L39"></a><tt class="py-lineno"> 39</tt> <tt class="py-line"> </tt> +<a name="L40"></a><tt class="py-lineno"> 40</tt> <tt class="py-line"> </tt> +<a name="L41"></a><tt class="py-lineno"> 41</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt> +<a name="L42"></a><tt class="py-lineno"> 42</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">gzip</tt> </tt> +<a name="L43"></a><tt class="py-lineno"> 43</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">gzip</tt> <tt class="py-keyword">import</tt> <tt class="py-name">zlib</tt> </tt> +<a name="L44"></a><tt class="py-lineno"> 44</tt> <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">types</tt> <tt class="py-keyword">import</tt> <tt class="py-name">IntType</tt><tt class="py-op">,</tt> <tt class="py-name">LongType</tt> </tt> +<a name="L45"></a><tt class="py-lineno"> 45</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">struct</tt> </tt> +<a name="L46"></a><tt class="py-lineno"> 46</tt> <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">string</tt> </tt> +<a name="L47"></a><tt class="py-lineno"> 47</tt> <tt class="py-line"><tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L48"></a><tt class="py-lineno"> 48</tt> <tt class="py-line"> <tt class="py-comment"># Is this *still* needed? cStringIO supposedly works on all platforms</tt> </tt> +<a name="L49"></a><tt class="py-lineno"> 49</tt> <tt class="py-line"> <tt class="py-keyword">from</tt> <tt class="py-name">cStringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt> +<a name="L50"></a><tt class="py-lineno"> 50</tt> <tt class="py-line"><tt class="py-keyword">except</tt> <tt class="py-name">ImportError</tt><tt class="py-op">:</tt> </tt> +<a name="L51"></a><tt class="py-lineno"> 51</tt> <tt class="py-line"> <tt class="py-keyword">from</tt> <tt class="py-name">StringIO</tt> <tt class="py-keyword">import</tt> <tt class="py-name">StringIO</tt> </tt> +<a name="L52"></a><tt class="py-lineno"> 52</tt> <tt class="py-line"> </tt> +<a name="L53"></a><tt class="py-lineno"> 53</tt> <tt class="py-line"> </tt> +<a name="L54"></a><tt class="py-lineno"> 54</tt> <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable gzipstream._DEBUG_YN=gzipstream-module.html#_DEBUG_YN"><a title="gzipstream._DEBUG_YN" class="py-name" href="#" onclick="return doclink('link-0', '_DEBUG_YN', 'link-0');">_DEBUG_YN</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L55"></a><tt class="py-lineno"> 55</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-1" class="py-name"><a title="gzipstream._DEBUG_YN" class="py-name" href="#" onclick="return doclink('link-1', '_DEBUG_YN', 'link-0');">_DEBUG_YN</a></tt><tt class="py-op">:</tt> </tt> +<a name="L56"></a><tt class="py-lineno"> 56</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">time</tt> </tt> +<a name="L57"></a><tt class="py-lineno"> 57</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L58"></a><tt class="py-lineno"> 58</tt> <tt class="py-line"> <tt class="py-keyword">import</tt> <tt class="py-name">thread</tt> </tt> +<a name="L59"></a><tt class="py-lineno"> 59</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt> +<a name="L60"></a><tt class="py-lineno"> 60</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L61"></a><tt class="py-lineno"> 61</tt> <tt class="py-line"> </tt> +<a name="L62"></a><tt class="py-lineno"> 62</tt> <tt class="py-line"> </tt> +<a name="__getSysVersion"></a><div id="__getSysVersion-def"><a name="L63"></a><tt class="py-lineno"> 63</tt> <a class="py-toggle" href="#" id="__getSysVersion-toggle" onclick="return toggle('__getSysVersion');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream-module.html#__getSysVersion">__getSysVersion</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="__getSysVersion-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="__getSysVersion-expanded"><a name="L64"></a><tt class="py-lineno"> 64</tt> <tt class="py-line"> <tt class="py-docstring">"""Return 1 for Python versions 1.5.* and 2.1.*</tt> </tt> +<a name="L65"></a><tt class="py-lineno"> 65</tt> <tt class="py-line"><tt class="py-docstring"> Return 2 for Python versions 2.2+.*</tt> </tt> +<a name="L66"></a><tt class="py-lineno"> 66</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L67"></a><tt class="py-lineno"> 67</tt> <tt class="py-line"> <tt class="py-name">minor</tt> <tt class="py-op">=</tt> <tt class="py-name">int</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">split</tt><tt class="py-op">(</tt><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">version</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt><tt class="py-op">,</tt> <tt class="py-string">'.'</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt><tt class="py-op">)</tt> </tt> +<a name="L68"></a><tt class="py-lineno"> 68</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">minor</tt> <tt class="py-op"><</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt> +<a name="L69"></a><tt class="py-lineno"> 69</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-number">1</tt> </tt> +<a name="L70"></a><tt class="py-lineno"> 70</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-number">2</tt> </tt> +</div><a name="L71"></a><tt class="py-lineno"> 71</tt> <tt class="py-line"><tt id="link-2" class="py-name" targets="Variable gzipstream._SYS_VERSION=gzipstream-module.html#_SYS_VERSION"><a title="gzipstream._SYS_VERSION" class="py-name" href="#" onclick="return doclink('link-2', '_SYS_VERSION', 'link-2');">_SYS_VERSION</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name" targets="Function gzipstream.__getSysVersion()=gzipstream-module.html#__getSysVersion"><a title="gzipstream.__getSysVersion" class="py-name" href="#" onclick="return doclink('link-3', '__getSysVersion', 'link-3');">__getSysVersion</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L72"></a><tt class="py-lineno"> 72</tt> <tt class="py-line"> </tt> +<a name="L73"></a><tt class="py-lineno"> 73</tt> <tt class="py-line"> </tt> +<a name="GzipStream"></a><div id="GzipStream-def"><a name="L74"></a><tt class="py-lineno"> 74</tt> <a class="py-toggle" href="#" id="GzipStream-toggle" onclick="return toggle('GzipStream');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html">GzipStream</a><tt class="py-op">(</tt><tt class="py-base-class">gzip</tt><tt class="py-op">.</tt><tt class="py-base-class">GzipFile</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="GzipStream-expanded"><a name="L75"></a><tt class="py-lineno"> 75</tt> <tt class="py-line"> <tt class="py-docstring">"""Handle streaming gzipped data</tt> </tt> +<a name="L76"></a><tt class="py-lineno"> 76</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L77"></a><tt class="py-lineno"> 77</tt> <tt class="py-line"><tt class="py-docstring"> GzipStream extends the functionality of the gzip.GzipFile class.</tt> </tt> +<a name="L78"></a><tt class="py-lineno"> 78</tt> <tt class="py-line"><tt class="py-docstring"> gzip.GzipFile generally needs a seekable object. This doesn't allow for</tt> </tt> +<a name="L79"></a><tt class="py-lineno"> 79</tt> <tt class="py-line"><tt class="py-docstring"> streaming gzipped data to be processed easily (e.g. can't seek a socket).</tt> </tt> +<a name="L80"></a><tt class="py-lineno"> 80</tt> <tt class="py-line"><tt class="py-docstring"> Using the _StreamBuf class enables streaming gzipped data to be processed</tt> </tt> +<a name="L81"></a><tt class="py-lineno"> 81</tt> <tt class="py-line"><tt class="py-docstring"> by buffering that data at it passes through.</tt> </tt> +<a name="L82"></a><tt class="py-lineno"> 82</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L83"></a><tt class="py-lineno"> 83</tt> <tt class="py-line"><tt class="py-docstring"> For Python versions 1.5.2 & 2.1.*:</tt> </tt> +<a name="L84"></a><tt class="py-lineno"> 84</tt> <tt class="py-line"><tt class="py-docstring"> Normal data version.</tt> </tt> +<a name="L85"></a><tt class="py-lineno"> 85</tt> <tt class="py-line"><tt class="py-docstring"> Normally sized data stream version == faster.</tt> </tt> +<a name="L86"></a><tt class="py-lineno"> 86</tt> <tt class="py-line"><tt class="py-docstring"> For very large data streams (2.5GB-ish), use GzipStreamXL.</tt> </tt> +<a name="L87"></a><tt class="py-lineno"> 87</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L88"></a><tt class="py-lineno"> 88</tt> <tt class="py-line"> <tt id="link-4" class="py-name" targets="Variable gzipstream.GzipStream.VERSION=gzipstream.GzipStream-class.html#VERSION,Variable gzipstream._StreamBuf.VERSION=gzipstream._StreamBuf-class.html#VERSION"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-4', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="gzipstream._SYS_VERSION" class="py-name" href="#" onclick="return doclink('link-5', '_SYS_VERSION', 'link-2');">_SYS_VERSION</a></tt> <tt class="py-comment"># so garbage collector doesn't nuke it too early with</tt> </tt> +<a name="L89"></a><tt class="py-lineno"> 89</tt> <tt class="py-line"> <tt class="py-comment"># older (v1.5.2-v2.1.*) python.</tt> </tt> +<a name="L90"></a><tt class="py-lineno"> 90</tt> <tt class="py-line"> </tt> +<a name="GzipStream.__init__"></a><div id="GzipStream.__init__-def"><a name="L91"></a><tt class="py-lineno"> 91</tt> <a class="py-toggle" href="#" id="GzipStream.__init__-toggle" onclick="return toggle('GzipStream.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">compresslevel</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream.__init__-expanded"><a name="L92"></a><tt class="py-lineno"> 92</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">stream</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt> +<a name="L93"></a><tt class="py-lineno"> 93</tt> <tt class="py-line"> <tt class="py-name">stream</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stdout</tt> </tt> +<a name="L94"></a><tt class="py-lineno"> 94</tt> <tt class="py-line"> </tt> +<a name="L95"></a><tt class="py-lineno"> 95</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method gzipstream.GzipStream._initModeLogic()=gzipstream.GzipStream-class.html#_initModeLogic"><a title="gzipstream.GzipStream._initModeLogic" class="py-name" href="#" onclick="return doclink('link-6', '_initModeLogic', 'link-6');">_initModeLogic</a></tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt> +<a name="L96"></a><tt class="py-lineno"> 96</tt> <tt class="py-line"> </tt> +<a name="L97"></a><tt class="py-lineno"> 97</tt> <tt class="py-line"> <tt class="py-comment"># self.stream becomes a _StreamBuf object</tt> </tt> +<a name="L98"></a><tt class="py-lineno"> 98</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt id="link-7" class="py-name" targets="Class gzipstream._StreamBuf=gzipstream._StreamBuf-class.html"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-7', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L99"></a><tt class="py-lineno"> 99</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-8', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">)</tt> </tt> +<a name="L100"></a><tt class="py-lineno">100</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L101"></a><tt class="py-lineno">101</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-op">=</tt> <tt class="py-name">stream</tt> </tt> +<a name="L102"></a><tt class="py-lineno">102</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt> <tt class="py-comment"># hang onto for destructive reasons</tt> </tt> +<a name="L103"></a><tt class="py-lineno">103</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name" targets="Method gzipstream.GzipStream.__init__()=gzipstream.GzipStream-class.html#__init__,Method gzipstream.GzipStreamXL.__init__()=gzipstream.GzipStreamXL-class.html#__init__,Method gzipstream._StreamBuf.__init__()=gzipstream._StreamBuf-class.html#__init__"><a title="gzipstream.GzipStream.__init__ +gzipstream.GzipStreamXL.__init__ +gzipstream._StreamBuf.__init__" class="py-name" href="#" onclick="return doclink('link-9', '__init__', 'link-9');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">''</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">compresslevel</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">)</tt> </tt> +</div><a name="L104"></a><tt class="py-lineno">104</tt> <tt class="py-line"> </tt> +<a name="GzipStream._initModeLogic"></a><div id="GzipStream._initModeLogic-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="GzipStream._initModeLogic-toggle" onclick="return toggle('GzipStream._initModeLogic');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#_initModeLogic">_initModeLogic</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream._initModeLogic-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream._initModeLogic-expanded"><a name="L106"></a><tt class="py-lineno">106</tt> <tt class="py-line"> <tt class="py-docstring">"attempt to determine the mode"</tt> </tt> +<a name="L107"></a><tt class="py-lineno">107</tt> <tt class="py-line"> <tt class="py-name">_mode</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt> +<a name="L108"></a><tt class="py-lineno">108</tt> <tt class="py-line"> <tt class="py-name">_modes</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L109"></a><tt class="py-lineno">109</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-string">'mode'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L110"></a><tt class="py-lineno">110</tt> <tt class="py-line"> <tt class="py-name">_mode</tt> <tt class="py-op">=</tt> <tt class="py-name">stream</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt> +<a name="L111"></a><tt class="py-lineno">111</tt> <tt class="py-line"> <tt class="py-name">_modes</tt> <tt class="py-op">=</tt> <tt class="py-name">_mode</tt> </tt> +<a name="L112"></a><tt class="py-lineno">112</tt> <tt class="py-line"> <tt class="py-comment"># Attributes lie, by the way, so sometimes we have to punt.</tt> </tt> +<a name="L113"></a><tt class="py-lineno">113</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">_mode</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-string">'read'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L114"></a><tt class="py-lineno">114</tt> <tt class="py-line"> <tt class="py-name">_modes</tt> <tt class="py-op">=</tt> <tt class="py-name">_modes</tt> <tt class="py-op">+</tt> <tt class="py-string">'r'</tt> </tt> +<a name="L115"></a><tt class="py-lineno">115</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">_mode</tt> <tt class="py-keyword">and</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-string">'write'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L116"></a><tt class="py-lineno">116</tt> <tt class="py-line"> <tt class="py-name">_modes</tt> <tt class="py-op">=</tt> <tt class="py-name">_modes</tt> <tt class="py-op">+</tt> <tt class="py-string">'w'</tt> </tt> +<a name="L117"></a><tt class="py-lineno">117</tt> <tt class="py-line"> <tt class="py-comment"># NOTE: Async objects needs a mode set or defaults to 'rb'</tt> </tt> +<a name="L118"></a><tt class="py-lineno">118</tt> <tt class="py-line"> </tt> +<a name="L119"></a><tt class="py-lineno">119</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">_mode</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">mode</tt><tt class="py-op">:</tt> </tt> +<a name="L120"></a><tt class="py-lineno">120</tt> <tt class="py-line"> <tt class="py-comment"># punt</tt> </tt> +<a name="L121"></a><tt class="py-lineno">121</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-string">'r'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_modes</tt><tt class="py-op">:</tt> </tt> +<a name="L122"></a><tt class="py-lineno">122</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">_mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'rb'</tt> </tt> +<a name="L123"></a><tt class="py-lineno">123</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-string">'w'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_modes</tt><tt class="py-op">:</tt> </tt> +<a name="L124"></a><tt class="py-lineno">124</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">_mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'wb'</tt> </tt> +<a name="L125"></a><tt class="py-lineno">125</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">mode</tt><tt class="py-op">:</tt> </tt> +<a name="L126"></a><tt class="py-lineno">126</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">_mode</tt> </tt> +<a name="L127"></a><tt class="py-lineno">127</tt> <tt class="py-line"> </tt> +<a name="L128"></a><tt class="py-lineno">128</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">mode</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">_modes</tt><tt class="py-op">:</tt> </tt> +<a name="L129"></a><tt class="py-lineno">129</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">'Mode %s not supported'</tt> <tt class="py-op">%</tt> <tt class="py-name">mode</tt> </tt> +<a name="L130"></a><tt class="py-lineno">130</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">mode</tt> </tt> +</div><a name="L131"></a><tt class="py-lineno">131</tt> <tt class="py-line"> </tt> +<a name="GzipStream._read"></a><div id="GzipStream._read-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="GzipStream._read-toggle" onclick="return toggle('GzipStream._read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#_read">_read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">=</tt><tt class="py-number">1024</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream._read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream._read-expanded"><a name="L133"></a><tt class="py-lineno">133</tt> <tt class="py-line"> <tt class="py-comment"># overloaded --- one line changed.</tt> </tt> +<a name="L134"></a><tt class="py-lineno">134</tt> <tt class="py-line"> <tt class="py-comment"># Instead of seek(0,2) to see if we are at the end of the</tt> </tt> +<a name="L135"></a><tt class="py-lineno">135</tt> <tt class="py-line"> <tt class="py-comment"># file, just do a seek(pos+1) if the same then we are at the</tt> </tt> +<a name="L136"></a><tt class="py-lineno">136</tt> <tt class="py-line"> <tt class="py-comment"># end of the file.</tt> </tt> +<a name="L137"></a><tt class="py-lineno">137</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt> +<a name="L138"></a><tt class="py-lineno">138</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">EOFError</tt><tt class="py-op">,</tt> <tt class="py-string">"Reached EOF"</tt> </tt> +<a name="L139"></a><tt class="py-lineno">139</tt> <tt class="py-line"> </tt> +<a name="L140"></a><tt class="py-lineno">140</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_new_member</tt><tt class="py-op">:</tt> </tt> +<a name="L141"></a><tt class="py-lineno">141</tt> <tt class="py-line"> <tt class="py-comment"># If the _new_member flag is set, we have to</tt> </tt> +<a name="L142"></a><tt class="py-lineno">142</tt> <tt class="py-line"> <tt class="py-comment">#</tt> </tt> +<a name="L143"></a><tt class="py-lineno">143</tt> <tt class="py-line"> <tt class="py-comment"># First, check if we're at the end of the file;</tt> </tt> +<a name="L144"></a><tt class="py-lineno">144</tt> <tt class="py-line"> <tt class="py-comment"># if so, it's time to stop; no more members to read.</tt> </tt> +<a name="L145"></a><tt class="py-lineno">145</tt> <tt class="py-line"> <tt class="py-name">pos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Method gzipstream._StreamBuf.tell()=gzipstream._StreamBuf-class.html#tell"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-10', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-comment"># Save current position</tt> </tt> +<a name="L146"></a><tt class="py-lineno">146</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method gzipstream.GzipStream.seek()=gzipstream.GzipStream-class.html#seek,Method gzipstream._StreamBuf.seek()=gzipstream._StreamBuf-class.html#seek"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-11', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt class="py-name">pos</tt><tt class="py-op">+</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> <tt class="py-comment"># Seek further... if at end, won't</tt> </tt> +<a name="L147"></a><tt class="py-lineno">147</tt> <tt class="py-line"> <tt class="py-comment"># seek any further.</tt> </tt> +<a name="L148"></a><tt class="py-lineno">148</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">pos</tt> <tt class="py-op">==</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-12', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L149"></a><tt class="py-lineno">149</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method gzipstream.GzipStream.close()=gzipstream.GzipStream-class.html#close,Method gzipstream._StreamBuf.close()=gzipstream._StreamBuf-class.html#close"><a title="gzipstream.GzipStream.close +gzipstream._StreamBuf.close" class="py-name" href="#" onclick="return doclink('link-13', 'close', 'link-13');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L150"></a><tt class="py-lineno">150</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt> +<a name="L151"></a><tt class="py-lineno">151</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">EOFError</tt><tt class="py-op">,</tt> <tt class="py-string">"Reached EOF"</tt> </tt> +<a name="L152"></a><tt class="py-lineno">152</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L153"></a><tt class="py-lineno">153</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-14', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt> <tt class="py-name">pos</tt> <tt class="py-op">)</tt> <tt class="py-comment"># Return to original position</tt> </tt> +<a name="L154"></a><tt class="py-lineno">154</tt> <tt class="py-line"> </tt> +<a name="L155"></a><tt class="py-lineno">155</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method gzipstream.GzipStreamXL._init_read()=gzipstream.GzipStreamXL-class.html#_init_read"><a title="gzipstream.GzipStreamXL._init_read" class="py-name" href="#" onclick="return doclink('link-15', '_init_read', 'link-15');">_init_read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L156"></a><tt class="py-lineno">156</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_read_gzip_header</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L157"></a><tt class="py-lineno">157</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt> <tt class="py-op">=</tt> <tt class="py-name">zlib</tt><tt class="py-op">.</tt><tt class="py-name">decompressobj</tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-name">zlib</tt><tt class="py-op">.</tt><tt class="py-name">MAX_WBITS</tt><tt class="py-op">)</tt> </tt> +<a name="L158"></a><tt class="py-lineno">158</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_new_member</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L159"></a><tt class="py-lineno">159</tt> <tt class="py-line"> </tt> +<a name="L160"></a><tt class="py-lineno">160</tt> <tt class="py-line"> <tt class="py-comment"># Read a chunk of data from the file</tt> </tt> +<a name="L161"></a><tt class="py-lineno">161</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method gzipstream._StreamBuf.read()=gzipstream._StreamBuf-class.html#read"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-16', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt> +<a name="L162"></a><tt class="py-lineno">162</tt> <tt class="py-line"> </tt> +<a name="L163"></a><tt class="py-lineno">163</tt> <tt class="py-line"> <tt class="py-comment"># If the EOF has been reached, flush the decompression object</tt> </tt> +<a name="L164"></a><tt class="py-lineno">164</tt> <tt class="py-line"> <tt class="py-comment"># and mark this object as finished.</tt> </tt> +<a name="L165"></a><tt class="py-lineno">165</tt> <tt class="py-line"> </tt> +<a name="L166"></a><tt class="py-lineno">166</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">buf</tt> <tt class="py-op">==</tt> <tt class="py-string">""</tt><tt class="py-op">:</tt> </tt> +<a name="L167"></a><tt class="py-lineno">167</tt> <tt class="py-line"> <tt class="py-name">uncompress</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method gzipstream._StreamBuf.flush()=gzipstream._StreamBuf-class.html#flush"><a title="gzipstream._StreamBuf.flush" class="py-name" href="#" onclick="return doclink('link-17', 'flush', 'link-17');">flush</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L168"></a><tt class="py-lineno">168</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name" targets="Method gzipstream.GzipStream._read_eof()=gzipstream.GzipStream-class.html#_read_eof"><a title="gzipstream.GzipStream._read_eof" class="py-name" href="#" onclick="return doclink('link-18', '_read_eof', 'link-18');">_read_eof</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L169"></a><tt class="py-lineno">169</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="gzipstream.GzipStream.close +gzipstream._StreamBuf.close" class="py-name" href="#" onclick="return doclink('link-19', 'close', 'link-13');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L170"></a><tt class="py-lineno">170</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt> +<a name="L171"></a><tt class="py-lineno">171</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_read_data</tt><tt class="py-op">(</tt> <tt class="py-name">uncompress</tt> <tt class="py-op">)</tt> </tt> +<a name="L172"></a><tt class="py-lineno">172</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">EOFError</tt><tt class="py-op">,</tt> <tt class="py-string">'Reached EOF'</tt> </tt> +<a name="L173"></a><tt class="py-lineno">173</tt> <tt class="py-line"> </tt> +<a name="L174"></a><tt class="py-lineno">174</tt> <tt class="py-line"> <tt class="py-name">uncompress</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L175"></a><tt class="py-lineno">175</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_add_read_data</tt><tt class="py-op">(</tt> <tt class="py-name">uncompress</tt> <tt class="py-op">)</tt> </tt> +<a name="L176"></a><tt class="py-lineno">176</tt> <tt class="py-line"> </tt> +<a name="L177"></a><tt class="py-lineno">177</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">.</tt><tt class="py-name">unused_data</tt> <tt class="py-op">!=</tt> <tt class="py-string">""</tt><tt class="py-op">:</tt> </tt> +<a name="L178"></a><tt class="py-lineno">178</tt> <tt class="py-line"> <tt class="py-comment"># Ending case: we've come to the end of a member in the file,</tt> </tt> +<a name="L179"></a><tt class="py-lineno">179</tt> <tt class="py-line"> <tt class="py-comment"># so seek back to the start of the unused data, finish up</tt> </tt> +<a name="L180"></a><tt class="py-lineno">180</tt> <tt class="py-line"> <tt class="py-comment"># this member, and read a new gzip header.</tt> </tt> +<a name="L181"></a><tt class="py-lineno">181</tt> <tt class="py-line"> <tt class="py-comment"># (The number of bytes to seek back is the length of the unused</tt> </tt> +<a name="L182"></a><tt class="py-lineno">182</tt> <tt class="py-line"> <tt class="py-comment"># data, minus 8 because _read_eof() will rewind a further 8 bytes)</tt> </tt> +<a name="L183"></a><tt class="py-lineno">183</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-20', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt> <tt class="py-op">-</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">decompress</tt><tt class="py-op">.</tt><tt class="py-name">unused_data</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-number">8</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt> +<a name="L184"></a><tt class="py-lineno">184</tt> <tt class="py-line"> </tt> +<a name="L185"></a><tt class="py-lineno">185</tt> <tt class="py-line"> <tt class="py-comment"># Check the CRC and file size, and set the flag so we read</tt> </tt> +<a name="L186"></a><tt class="py-lineno">186</tt> <tt class="py-line"> <tt class="py-comment"># a new member on the next call</tt> </tt> +<a name="L187"></a><tt class="py-lineno">187</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="gzipstream.GzipStream._read_eof" class="py-name" href="#" onclick="return doclink('link-21', '_read_eof', 'link-18');">_read_eof</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L188"></a><tt class="py-lineno">188</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_new_member</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +</div><a name="L189"></a><tt class="py-lineno">189</tt> <tt class="py-line"> </tt> +<a name="GzipStream.seek"></a><div id="GzipStream.seek-def"><a name="L190"></a><tt class="py-lineno">190</tt> <a class="py-toggle" href="#" id="GzipStream.seek-toggle" onclick="return toggle('GzipStream.seek');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#seek">seek</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">offset</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream.seek-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream.seek-expanded"><a name="L191"></a><tt class="py-lineno">191</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-string">'Random access not allowed in gzip streams'</tt> </tt> +</div><a name="L192"></a><tt class="py-lineno">192</tt> <tt class="py-line"> </tt> +<a name="GzipStream.__repr__"></a><div id="GzipStream.__repr__-def"><a name="L193"></a><tt class="py-lineno">193</tt> <a class="py-toggle" href="#" id="GzipStream.__repr__-toggle" onclick="return toggle('GzipStream.__repr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream.__repr__-expanded"><a name="L194"></a><tt class="py-lineno">194</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L195"></a><tt class="py-lineno">195</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L196"></a><tt class="py-lineno">196</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">"<closed gzipstream.GzipStream instance, mode '%s' at %s>"</tt> <tt class="py-op">%</tt> \ </tt> +<a name="L197"></a><tt class="py-lineno">197</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L198"></a><tt class="py-lineno">198</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L199"></a><tt class="py-lineno">199</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">"<open gzipstream.GzipStream instance, mode '%s' at %s>"</tt> <tt class="py-op">%</tt> \ </tt> +<a name="L200"></a><tt class="py-lineno">200</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L201"></a><tt class="py-lineno">201</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt> +</div><a name="L202"></a><tt class="py-lineno">202</tt> <tt class="py-line"> </tt> +<a name="L203"></a><tt class="py-lineno">203</tt> <tt class="py-line"> <tt class="py-comment">### These methods are generally only important for Python v2.2.* ###</tt> </tt> +<a name="GzipStream._read_eof"></a><div id="GzipStream._read_eof-def"><a name="L204"></a><tt class="py-lineno">204</tt> <a class="py-toggle" href="#" id="GzipStream._read_eof-toggle" onclick="return toggle('GzipStream._read_eof');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#_read_eof">_read_eof</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream._read_eof-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream._read_eof-expanded"><a name="L205"></a><tt class="py-lineno">205</tt> <tt class="py-line"> <tt class="py-comment"># overloaded to accommodate LongType</tt> </tt> +<a name="L206"></a><tt class="py-lineno">206</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">LongType</tt><tt class="py-op">:</tt> </tt> +<a name="L207"></a><tt class="py-lineno">207</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">read32</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method gzipstream.GzipStream._read32XL()=gzipstream.GzipStream-class.html#_read32XL"><a title="gzipstream.GzipStream._read32XL" class="py-name" href="#" onclick="return doclink('link-22', '_read32XL', 'link-22');">_read32XL</a></tt> </tt> +<a name="L208"></a><tt class="py-lineno">208</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="gzipstream.GzipStream._read_eof" class="py-name" href="#" onclick="return doclink('link-23', '_read_eof', 'link-18');">_read_eof</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt> +</div><a name="L209"></a><tt class="py-lineno">209</tt> <tt class="py-line"> </tt> +<a name="GzipStream.close"></a><div id="GzipStream.close-def"><a name="L210"></a><tt class="py-lineno">210</tt> <a class="py-toggle" href="#" id="GzipStream.close-toggle" onclick="return toggle('GzipStream.close');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream.close-expanded"><a name="L211"></a><tt class="py-lineno">211</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L212"></a><tt class="py-lineno">212</tt> <tt class="py-line"> <tt class="py-comment"># remove this block for python v2.2.*</tt> </tt> +<a name="L213"></a><tt class="py-lineno">213</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L214"></a><tt class="py-lineno">214</tt> <tt class="py-line"> <tt class="py-comment"># overloaded to accommodate LongType</tt> </tt> +<a name="L215"></a><tt class="py-lineno">215</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-string">'size'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L216"></a><tt class="py-lineno">216</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">LongType</tt><tt class="py-op">:</tt> </tt> +<a name="L217"></a><tt class="py-lineno">217</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32u</tt> </tt> +<a name="L218"></a><tt class="py-lineno">218</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L219"></a><tt class="py-lineno">219</tt> <tt class="py-line"> <tt class="py-comment"># write32u is the "safest" route if punting.</tt> </tt> +<a name="L220"></a><tt class="py-lineno">220</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32u</tt> </tt> +<a name="L221"></a><tt class="py-lineno">221</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_gzip</tt><tt class="py-op">.</tt><tt class="py-name">GzipFile</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="gzipstream.GzipStream.close +gzipstream._StreamBuf.close" class="py-name" href="#" onclick="return doclink('link-24', 'close', 'link-13');">close</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt> +<a name="L222"></a><tt class="py-lineno">222</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">:</tt> </tt> +<a name="L223"></a><tt class="py-lineno">223</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">stream</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="gzipstream.GzipStream.close +gzipstream._StreamBuf.close" class="py-name" href="#" onclick="return doclink('link-25', 'close', 'link-13');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +</div><a name="L224"></a><tt class="py-lineno">224</tt> <tt class="py-line"> </tt> +<a name="GzipStream._read32XL"></a><div id="GzipStream._read32XL-def"><a name="L225"></a><tt class="py-lineno">225</tt> <a class="py-toggle" href="#" id="GzipStream._read32XL-toggle" onclick="return toggle('GzipStream._read32XL');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStream-class.html#_read32XL">_read32XL</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">input</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStream._read32XL-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStream._read32XL-expanded"><a name="L226"></a><tt class="py-lineno">226</tt> <tt class="py-line"> <tt class="py-docstring">"""Allow for very large files/streams to be processed.</tt> </tt> +<a name="L227"></a><tt class="py-lineno">227</tt> <tt class="py-line"><tt class="py-docstring"> Slows things down, but...</tt> </tt> +<a name="L228"></a><tt class="py-lineno">228</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L229"></a><tt class="py-lineno">229</tt> <tt class="py-line"><tt class="py-docstring"> Used by Python v2.2.*.</tt> </tt> +<a name="L230"></a><tt class="py-lineno">230</tt> <tt class="py-line"><tt class="py-docstring"> Also used by Python v1.5.2/v2.1.* in inheriting class GzipStreamXL.</tt> </tt> +<a name="L231"></a><tt class="py-lineno">231</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L232"></a><tt class="py-lineno">232</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">struct</tt><tt class="py-op">.</tt><tt class="py-name">unpack</tt><tt class="py-op">(</tt><tt class="py-string">"<L"</tt><tt class="py-op">,</tt> <tt class="py-name">input</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-26', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt> +</div></div><a name="L233"></a><tt class="py-lineno">233</tt> <tt class="py-line"> </tt> +<a name="L234"></a><tt class="py-lineno">234</tt> <tt class="py-line"> </tt> +<a name="L235"></a><tt class="py-lineno">235</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt> +<a name="L236"></a><tt class="py-lineno">236</tt> <tt class="py-line"><tt class="py-comment"># Python v1.5.2/v2.1.* version only class</tt> </tt> +<a name="L237"></a><tt class="py-lineno">237</tt> <tt class="py-line"><tt class="py-comment">#</tt> </tt> +<a name="L238"></a><tt class="py-lineno">238</tt> <tt class="py-line"><tt class="py-keyword">if</tt> <tt id="link-27" class="py-name"><a title="gzipstream._SYS_VERSION" class="py-name" href="#" onclick="return doclink('link-27', '_SYS_VERSION', 'link-2');">_SYS_VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="GzipStreamXL"></a><div id="GzipStreamXL-def"><a name="L239"></a><tt class="py-lineno">239</tt> <a class="py-toggle" href="#" id="GzipStreamXL-toggle" onclick="return toggle('GzipStreamXL');">-</a><tt class="py-line"> <tt class="py-keyword">class</tt> <a class="py-def-name" href="gzipstream.GzipStreamXL-class.html">GzipStreamXL</a><tt class="py-op">(</tt><tt class="py-base-class">GzipStream</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStreamXL-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="GzipStreamXL-expanded"><a name="L240"></a><tt class="py-lineno">240</tt> <tt class="py-line"> <tt class="py-docstring">"""Handle streaming gzipped data -- large data version.</tt> </tt> +<a name="L241"></a><tt class="py-lineno">241</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L242"></a><tt class="py-lineno">242</tt> <tt class="py-line"><tt class="py-docstring"> Very large sized data stream version -- slooower.</tt> </tt> +<a name="L243"></a><tt class="py-lineno">243</tt> <tt class="py-line"><tt class="py-docstring"> For normally sized data streams (< 2.5GB-ish), use GzipStream.</tt> </tt> +<a name="L244"></a><tt class="py-lineno">244</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="GzipStreamXL.__init__"></a><div id="GzipStreamXL.__init__-def"><a name="L245"></a><tt class="py-lineno">245</tt> <a class="py-toggle" href="#" id="GzipStreamXL.__init__-toggle" onclick="return toggle('GzipStreamXL.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStreamXL-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">compresslevel</tt><tt class="py-op">=</tt><tt class="py-number">9</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStreamXL.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++++++++++"></div><div id="GzipStreamXL.__init__-expanded"><a name="L246"></a><tt class="py-lineno">246</tt> <tt class="py-line"> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">read32</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="gzipstream.GzipStream._read32XL" class="py-name" href="#" onclick="return doclink('link-28', '_read32XL', 'link-22');">_read32XL</a></tt> </tt> +<a name="L247"></a><tt class="py-lineno">247</tt> <tt class="py-line"> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32</tt> <tt class="py-op">=</tt> <tt class="py-name">gzip</tt><tt class="py-op">.</tt><tt class="py-name">write32u</tt> </tt> +<a name="L248"></a><tt class="py-lineno">248</tt> <tt class="py-line"> <tt id="link-29" class="py-name" targets="Class gzipstream.GzipStream=gzipstream.GzipStream-class.html"><a title="gzipstream.GzipStream" class="py-name" href="#" onclick="return doclink('link-29', 'GzipStream', 'link-29');">GzipStream</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="gzipstream.GzipStream.__init__ +gzipstream.GzipStreamXL.__init__ +gzipstream._StreamBuf.__init__" class="py-name" href="#" onclick="return doclink('link-30', '__init__', 'link-9');">__init__</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">stream</tt><tt class="py-op">,</tt> <tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">compresslevel</tt><tt class="py-op">)</tt> </tt> +</div><a name="L249"></a><tt class="py-lineno">249</tt> <tt class="py-line"> </tt> +<a name="L250"></a><tt class="py-lineno">250</tt> <tt class="py-line"> </tt> +<a name="GzipStreamXL._init_write"></a><div id="GzipStreamXL._init_write-def"><a name="L251"></a><tt class="py-lineno">251</tt> <a class="py-toggle" href="#" id="GzipStreamXL._init_write-toggle" onclick="return toggle('GzipStreamXL._init_write');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStreamXL-class.html#_init_write">_init_write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStreamXL._init_write-collapsed" style="display:none;" pad="+++" indent="++++++++++++++++"></div><div id="GzipStreamXL._init_write-expanded"><a name="L252"></a><tt class="py-lineno">252</tt> <tt class="py-line"> <tt class="py-docstring">"""Make size long in order to support very large files.</tt> </tt> +<a name="L253"></a><tt class="py-lineno">253</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L254"></a><tt class="py-lineno">254</tt> <tt class="py-line"> <tt id="link-31" class="py-name"><a title="gzipstream.GzipStream" class="py-name" href="#" onclick="return doclink('link-31', 'GzipStream', 'link-29');">GzipStream</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Method gzipstream.GzipStreamXL._init_write()=gzipstream.GzipStreamXL-class.html#_init_write"><a title="gzipstream.GzipStreamXL._init_write" class="py-name" href="#" onclick="return doclink('link-32', '_init_write', 'link-32');">_init_write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt> +<a name="L255"></a><tt class="py-lineno">255</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0L</tt> </tt> +</div><a name="L256"></a><tt class="py-lineno">256</tt> <tt class="py-line"> </tt> +<a name="L257"></a><tt class="py-lineno">257</tt> <tt class="py-line"> </tt> +<a name="GzipStreamXL._init_read"></a><div id="GzipStreamXL._init_read-def"><a name="L258"></a><tt class="py-lineno">258</tt> <a class="py-toggle" href="#" id="GzipStreamXL._init_read-toggle" onclick="return toggle('GzipStreamXL._init_read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream.GzipStreamXL-class.html#_init_read">_init_read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="GzipStreamXL._init_read-collapsed" style="display:none;" pad="+++" indent="++++++++++++++++"></div><div id="GzipStreamXL._init_read-expanded"><a name="L259"></a><tt class="py-lineno">259</tt> <tt class="py-line"> <tt class="py-docstring">"""Make size a long in order to support very large files.</tt> </tt> +<a name="L260"></a><tt class="py-lineno">260</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L261"></a><tt class="py-lineno">261</tt> <tt class="py-line"> <tt id="link-33" class="py-name"><a title="gzipstream.GzipStream" class="py-name" href="#" onclick="return doclink('link-33', 'GzipStream', 'link-29');">GzipStream</a></tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="gzipstream.GzipStreamXL._init_read" class="py-name" href="#" onclick="return doclink('link-34', '_init_read', 'link-15');">_init_read</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt> +<a name="L262"></a><tt class="py-lineno">262</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-number">0L</tt> </tt> +</div></div><a name="L263"></a><tt class="py-lineno">263</tt> <tt class="py-line"> </tt> +<a name="L264"></a><tt class="py-lineno">264</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf"></a><div id="_StreamBuf-def"><a name="L265"></a><tt class="py-lineno">265</tt> <a class="py-toggle" href="#" id="_StreamBuf-toggle" onclick="return toggle('_StreamBuf');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html">_StreamBuf</a><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_StreamBuf-expanded"><a name="L266"></a><tt class="py-lineno">266</tt> <tt class="py-line"> <tt class="py-docstring">"""Stream buffer for file-like objects.</tt> </tt> +<a name="L267"></a><tt class="py-lineno">267</tt> <tt class="py-line"><tt class="py-docstring"></tt> </tt> +<a name="L268"></a><tt class="py-lineno">268</tt> <tt class="py-line"><tt class="py-docstring"> Allow seeks on socket-like objects.</tt> </tt> +<a name="L269"></a><tt class="py-lineno">269</tt> <tt class="py-line"><tt class="py-docstring"> Enables non-seekable file-like objects some flexibility as regards to</tt> </tt> +<a name="L270"></a><tt class="py-lineno">270</tt> <tt class="py-line"><tt class="py-docstring"> seeking. It does this via a buffer, a StringIO object. Note, because</tt> </tt> +<a name="L271"></a><tt class="py-lineno">271</tt> <tt class="py-line"><tt class="py-docstring"> it is assumed that a socket stream is being manipulated, once the buffer</tt> </tt> +<a name="L272"></a><tt class="py-lineno">272</tt> <tt class="py-line"><tt class="py-docstring"> "window" has passed over a data segment, seeking prior to that is not</tt> </tt> +<a name="L273"></a><tt class="py-lineno">273</tt> <tt class="py-line"><tt class="py-docstring"> allowed.</tt> </tt> +<a name="L274"></a><tt class="py-lineno">274</tt> <tt class="py-line"><tt class="py-docstring"> XXX: probably reinventing the wheel.</tt> </tt> +<a name="L275"></a><tt class="py-lineno">275</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L276"></a><tt class="py-lineno">276</tt> <tt class="py-line"> <tt id="link-35" class="py-name" targets="Variable gzipstream._StreamBuf.__MIN_READ_SIZE=gzipstream._StreamBuf-class.html#__MIN_READ_SIZE"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-35', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-number">1024</tt> <tt class="py-op">*</tt> <tt class="py-number">2</tt> <tt class="py-comment"># Default = 2K</tt> </tt> +<a name="L277"></a><tt class="py-lineno">277</tt> <tt class="py-line"> <tt id="link-36" class="py-name" targets="Variable gzipstream._StreamBuf.__MAX_BUFIO_SIZE=gzipstream._StreamBuf-class.html#__MAX_BUFIO_SIZE"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-36', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt> <tt class="py-op">=</tt> <tt id="link-37" class="py-name"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-37', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt> <tt class="py-op">*</tt> <tt class="py-number">10</tt> <tt class="py-comment"># Default = 20K</tt> </tt> +<a name="L278"></a><tt class="py-lineno">278</tt> <tt class="py-line"> <tt id="link-38" class="py-name" targets="Variable gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE=gzipstream._StreamBuf-class.html#__ABS_MAX_BUFIO_SIZE"><a title="gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-38', '__ABS_MAX_BUFIO_SIZE', 'link-38');">__ABS_MAX_BUFIO_SIZE</a></tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-39', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt> <tt class="py-op">*</tt> <tt class="py-number">2</tt> <tt class="py-comment"># Default = 40K</tt> </tt> +<a name="L279"></a><tt class="py-lineno">279</tt> <tt class="py-line"> </tt> +<a name="L280"></a><tt class="py-lineno">280</tt> <tt class="py-line"> <tt class="py-comment">### Python versions 1.5.2 & 2.1.* only:</tt> </tt> +<a name="L281"></a><tt class="py-lineno">281</tt> <tt class="py-line"> <tt id="link-40" class="py-name" targets="Variable gzipstream._StreamBuf.__INT_CHECK_SIZE=gzipstream._StreamBuf-class.html#__INT_CHECK_SIZE"><a title="gzipstream._StreamBuf.__INT_CHECK_SIZE" class="py-name" href="#" onclick="return doclink('link-40', '__INT_CHECK_SIZE', 'link-40');">__INT_CHECK_SIZE</a></tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">maxint</tt> <tt class="py-op">-</tt> <tt id="link-41" class="py-name"><a title="gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-41', '__ABS_MAX_BUFIO_SIZE', 'link-38');">__ABS_MAX_BUFIO_SIZE</a></tt> <tt class="py-op">-</tt><tt class="py-number">2</tt> </tt> +<a name="L282"></a><tt class="py-lineno">282</tt> <tt class="py-line"> </tt> +<a name="L283"></a><tt class="py-lineno">283</tt> <tt class="py-line"> <tt id="link-42" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-42', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="gzipstream._SYS_VERSION" class="py-name" href="#" onclick="return doclink('link-43', '_SYS_VERSION', 'link-2');">_SYS_VERSION</a></tt> <tt class="py-comment"># so garbage collector doesn't nuke it too early with</tt> </tt> +<a name="L284"></a><tt class="py-lineno">284</tt> <tt class="py-line"> <tt class="py-comment"># older (v1.5.2-v2.1.*) python.</tt> </tt> +<a name="L285"></a><tt class="py-lineno">285</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.__init__"></a><div id="_StreamBuf.__init__-def"><a name="L286"></a><tt class="py-lineno">286</tt> <a class="py-toggle" href="#" id="_StreamBuf.__init__-toggle" onclick="return toggle('_StreamBuf.__init__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">stream</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">mode</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.__init__-expanded"><a name="L287"></a><tt class="py-lineno">287</tt> <tt class="py-line"> <tt class="py-docstring">"""Constructor.</tt> </tt> +<a name="L288"></a><tt class="py-lineno">288</tt> <tt class="py-line"><tt class="py-docstring"> stream: an open file-like object.</tt> </tt> +<a name="L289"></a><tt class="py-lineno">289</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L290"></a><tt class="py-lineno">290</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt> <tt class="py-op">=</tt> <tt class="py-name">stream</tt> </tt> +<a name="L291"></a><tt class="py-lineno">291</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L292"></a><tt class="py-lineno">292</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L293"></a><tt class="py-lineno">293</tt> <tt class="py-line"> </tt> +<a name="L294"></a><tt class="py-lineno">294</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt> +<a name="L295"></a><tt class="py-lineno">295</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L296"></a><tt class="py-lineno">296</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-string">'wb'</tt> </tt> +<a name="L297"></a><tt class="py-lineno">297</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L298"></a><tt class="py-lineno">298</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L299"></a><tt class="py-lineno">299</tt> <tt class="py-line"> </tt> +<a name="L300"></a><tt class="py-lineno">300</tt> <tt class="py-line"> <tt class="py-comment"># If mode not declared, try to figure it out.</tt> </tt> +<a name="L301"></a><tt class="py-lineno">301</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">mode</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt> +<a name="L302"></a><tt class="py-lineno">302</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L303"></a><tt class="py-lineno">303</tt> <tt class="py-line"> <tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> </tt> +<a name="L304"></a><tt class="py-lineno">304</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt> +<a name="L305"></a><tt class="py-lineno">305</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L306"></a><tt class="py-lineno">306</tt> <tt class="py-line"> </tt> +<a name="L307"></a><tt class="py-lineno">307</tt> <tt class="py-line"> <tt class="py-comment"># Can only read or write, not both and really the 'b' is meaningless.</tt> </tt> +<a name="L308"></a><tt class="py-lineno">308</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">mode</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-string">""</tt><tt class="py-op">)</tt> \ </tt> +<a name="L309"></a><tt class="py-lineno">309</tt> <tt class="py-line"> <tt class="py-keyword">and</tt> <tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-string">'rw'</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">)</tt> <tt class="py-op">></tt> <tt class="py-number">1</tt> <tt class="py-keyword">and</tt> <tt class="py-name">mode</tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">]</tt> <tt class="py-op">!=</tt> <tt class="py-string">'b'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L310"></a><tt class="py-lineno">310</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument: mode=%s"</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">mode</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L311"></a><tt class="py-lineno">311</tt> <tt class="py-line"> </tt> +<a name="L312"></a><tt class="py-lineno">312</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">mode</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> <tt class="py-op">==</tt> <tt class="py-string">'r'</tt><tt class="py-op">:</tt> </tt> +<a name="L313"></a><tt class="py-lineno">313</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L314"></a><tt class="py-lineno">314</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L315"></a><tt class="py-lineno">315</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L316"></a><tt class="py-lineno">316</tt> <tt class="py-line"> </tt> +<a name="L317"></a><tt class="py-lineno">317</tt> <tt class="py-line"> <tt class="py-comment"># Better be an open file-like object.</tt> </tt> +<a name="L318"></a><tt class="py-lineno">318</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L319"></a><tt class="py-lineno">319</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-44', 'read', 'link-16');">read</a></tt> <tt class="py-comment"># Throw AttributeError if not readable.</tt> </tt> +<a name="L320"></a><tt class="py-lineno">320</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L321"></a><tt class="py-lineno">321</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Method gzipstream._StreamBuf.write()=gzipstream._StreamBuf-class.html#write"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-45', 'write', 'link-45');">write</a></tt> <tt class="py-comment"># Throw AttributeError if not writable.</tt> </tt> +<a name="L322"></a><tt class="py-lineno">322</tt> <tt class="py-line"> </tt> +<a name="L323"></a><tt class="py-lineno">323</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L324"></a><tt class="py-lineno">324</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> <tt class="py-comment"># Assume at beginning of stream.</tt> </tt> +<a name="L325"></a><tt class="py-lineno">325</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L326"></a><tt class="py-lineno">326</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L327"></a><tt class="py-lineno">327</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt> <tt class="py-op">=</tt> <tt class="py-name">mode</tt> </tt> +<a name="L328"></a><tt class="py-lineno">328</tt> <tt class="py-line"> <tt class="py-comment"># Threaded debug loop:</tt> </tt> +<a name="L329"></a><tt class="py-lineno">329</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L330"></a><tt class="py-lineno">330</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-46" class="py-name"><a title="gzipstream._DEBUG_YN" class="py-name" href="#" onclick="return doclink('link-46', '_DEBUG_YN', 'link-0');">_DEBUG_YN</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">globals</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">has_key</tt><tt class="py-op">(</tt><tt class="py-string">'thread'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L331"></a><tt class="py-lineno">331</tt> <tt class="py-line"> <tt class="py-name">thread</tt><tt class="py-op">.</tt><tt class="py-name">start_new</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name" targets="Method gzipstream._StreamBuf.__debugThread()=gzipstream._StreamBuf-class.html#__debugThread"><a title="gzipstream._StreamBuf.__debugThread" class="py-name" href="#" onclick="return doclink('link-47', '__debugThread', 'link-47');">__debugThread</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L332"></a><tt class="py-lineno">332</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.__del__"></a><div id="_StreamBuf.__del__-def"><a name="L333"></a><tt class="py-lineno">333</tt> <a class="py-toggle" href="#" id="_StreamBuf.__del__-toggle" onclick="return toggle('_StreamBuf.__del__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#__del__">__del__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.__del__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.__del__-expanded"><a name="L334"></a><tt class="py-lineno">334</tt> <tt class="py-line"> <tt class="py-docstring">"Destructor"</tt> </tt> +<a name="L335"></a><tt class="py-lineno">335</tt> <tt class="py-line"> <tt class="py-comment"># Python v1.5.2/v2.1.* tries to run this but close doesn't always</tt> </tt> +<a name="L336"></a><tt class="py-lineno">336</tt> <tt class="py-line"> <tt class="py-comment"># still exist. For a pure Python v2.2.*, remove the try: except:.</tt> </tt> +<a name="L337"></a><tt class="py-lineno">337</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L338"></a><tt class="py-lineno">338</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="gzipstream.GzipStream.close +gzipstream._StreamBuf.close" class="py-name" href="#" onclick="return doclink('link-48', 'close', 'link-13');">close</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L339"></a><tt class="py-lineno">339</tt> <tt class="py-line"> <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt> +<a name="L340"></a><tt class="py-lineno">340</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +</div><a name="L341"></a><tt class="py-lineno">341</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.isatty"></a><div id="_StreamBuf.isatty-def"><a name="L342"></a><tt class="py-lineno">342</tt> <a class="py-toggle" href="#" id="_StreamBuf.isatty-toggle" onclick="return toggle('_StreamBuf.isatty');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#isatty">isatty</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.isatty-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.isatty-expanded"><a name="L343"></a><tt class="py-lineno">343</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L344"></a><tt class="py-lineno">344</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L345"></a><tt class="py-lineno">345</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-number">0</tt> </tt> +</div><a name="L346"></a><tt class="py-lineno">346</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf._read"></a><div id="_StreamBuf._read-def"><a name="L347"></a><tt class="py-lineno">347</tt> <a class="py-toggle" href="#" id="_StreamBuf._read-toggle" onclick="return toggle('_StreamBuf._read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#_read">_read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf._read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf._read-expanded"><a name="L348"></a><tt class="py-lineno">348</tt> <tt class="py-line"> <tt class="py-docstring">"""A buffered read --- refactored.</tt> </tt> +<a name="L349"></a><tt class="py-lineno">349</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L350"></a><tt class="py-lineno">350</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L351"></a><tt class="py-lineno">351</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L352"></a><tt class="py-lineno">352</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L353"></a><tt class="py-lineno">353</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't read from a write only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L354"></a><tt class="py-lineno">354</tt> <tt class="py-line"> <tt id="link-49" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-49', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-50', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L355"></a><tt class="py-lineno">355</tt> <tt class="py-line"> <tt class="py-name">bufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-51', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">size</tt><tt class="py-op">)</tt> </tt> +<a name="L356"></a><tt class="py-lineno">356</tt> <tt class="py-line"> <tt class="py-name">lbufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">bufIO</tt><tt class="py-op">)</tt> </tt> +<a name="L357"></a><tt class="py-lineno">357</tt> <tt class="py-line"> <tt class="py-name">bufFo</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L358"></a><tt class="py-lineno">358</tt> <tt class="py-line"> <tt class="py-name">lbufFo</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L359"></a><tt class="py-lineno">359</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">lbufIO</tt> <tt class="py-op"><</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt> +<a name="L360"></a><tt class="py-lineno">360</tt> <tt class="py-line"> <tt class="py-comment"># We read to end of buffer; read from file and tag onto buffer.</tt> </tt> +<a name="L361"></a><tt class="py-lineno">361</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-52', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt id="link-53" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-53', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-54', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt><tt class="py-op">)</tt> </tt> +<a name="L362"></a><tt class="py-lineno">362</tt> <tt class="py-line"> <tt class="py-name">bufFo</tt> <tt class="py-op">=</tt> <tt class="py-name">buf</tt> </tt> +<a name="L363"></a><tt class="py-lineno">363</tt> <tt class="py-line"> <tt class="py-name">lbufFo</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">bufFo</tt><tt class="py-op">)</tt> </tt> +<a name="L364"></a><tt class="py-lineno">364</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">buf</tt> <tt class="py-keyword">and</tt> <tt class="py-name">lbufFo</tt> <tt class="py-op">+</tt> <tt class="py-name">lbufIO</tt> <tt class="py-op"><</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt> +<a name="L365"></a><tt class="py-lineno">365</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-55', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt id="link-56" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-56', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-57', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt><tt class="py-op">)</tt> </tt> +<a name="L366"></a><tt class="py-lineno">366</tt> <tt class="py-line"> <tt class="py-name">bufFo</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">bufFo</tt><tt class="py-op">,</tt> <tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L367"></a><tt class="py-lineno">367</tt> <tt class="py-line"> <tt class="py-name">lbufFo</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">bufFo</tt><tt class="py-op">)</tt> </tt> +<a name="L368"></a><tt class="py-lineno">368</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-58', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">bufFo</tt><tt class="py-op">)</tt> </tt> +<a name="L369"></a><tt class="py-lineno">369</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L370"></a><tt class="py-lineno">370</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">+</tt> <tt class="py-name">lbufFo</tt> </tt> +<a name="L371"></a><tt class="py-lineno">371</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L372"></a><tt class="py-lineno">372</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">lbufIO</tt> <tt class="py-op">+</tt> <tt class="py-name">lbufFo</tt> <tt class="py-op"><</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> <tt class="py-comment"># covers case that size > filelength.</tt> </tt> +<a name="L373"></a><tt class="py-lineno">373</tt> <tt class="py-line"> <tt class="py-name">size</tt> <tt class="py-op">=</tt> <tt class="py-name">lbufIO</tt> <tt class="py-op">+</tt> <tt class="py-name">lbufFo</tt> </tt> +<a name="L374"></a><tt class="py-lineno">374</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-59', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt id="link-60" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-60', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">+</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt> +<a name="L375"></a><tt class="py-lineno">375</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-61" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-61', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-62', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L376"></a><tt class="py-lineno">376</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name" targets="Method gzipstream._StreamBuf.__checkInt()=gzipstream._StreamBuf-class.html#__checkInt"><a title="gzipstream._StreamBuf.__checkInt" class="py-name" href="#" onclick="return doclink('link-63', '__checkInt', 'link-63');">__checkInt</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt><tt class="py-op">)</tt> </tt> +<a name="L377"></a><tt class="py-lineno">377</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">+</tt> <tt class="py-name">size</tt> </tt> +<a name="L378"></a><tt class="py-lineno">378</tt> <tt class="py-line"> <tt class="py-name">bufFo</tt> <tt class="py-op">=</tt> <tt class="py-name">bufFo</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">size</tt><tt class="py-op">-</tt><tt class="py-name">lbufIO</tt><tt class="py-op">]</tt> </tt> +<a name="L379"></a><tt class="py-lineno">379</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method gzipstream._StreamBuf._refactorBufIO()=gzipstream._StreamBuf-class.html#_refactorBufIO"><a title="gzipstream._StreamBuf._refactorBufIO" class="py-name" href="#" onclick="return doclink('link-64', '_refactorBufIO', 'link-64');">_refactorBufIO</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L380"></a><tt class="py-lineno">380</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">bufIO</tt><tt class="py-op">,</tt> <tt class="py-name">bufFo</tt><tt class="py-op">)</tt> </tt> +</div><a name="L381"></a><tt class="py-lineno">381</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.read"></a><div id="_StreamBuf.read-def"><a name="L382"></a><tt class="py-lineno">382</tt> <a class="py-toggle" href="#" id="_StreamBuf.read-toggle" onclick="return toggle('_StreamBuf.read');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#read">read</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">size</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.read-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.read-expanded"><a name="L383"></a><tt class="py-lineno">383</tt> <tt class="py-line"> <tt class="py-docstring">"""A buffered read.</tt> </tt> +<a name="L384"></a><tt class="py-lineno">384</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L385"></a><tt class="py-lineno">385</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-keyword">and</tt> <tt class="py-name">size</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L386"></a><tt class="py-lineno">386</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument"</tt><tt class="py-op">)</tt> </tt> +<a name="L387"></a><tt class="py-lineno">387</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L388"></a><tt class="py-lineno">388</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't read from a write only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L389"></a><tt class="py-lineno">389</tt> <tt class="py-line"> <tt class="py-name">fetchSize</tt> <tt class="py-op">=</tt> <tt id="link-65" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-65', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-66" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-66', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt> </tt> +<a name="L390"></a><tt class="py-lineno">390</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt> +<a name="L391"></a><tt class="py-lineno">391</tt> <tt class="py-line"> <tt class="py-name">fetchSize</tt> <tt class="py-op">=</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt class="py-name">fetchSize</tt><tt class="py-op">,</tt> <tt class="py-name">size</tt><tt class="py-op">)</tt> </tt> +<a name="L392"></a><tt class="py-lineno">392</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-67" class="py-name" targets="Method gzipstream.GzipStream._read()=gzipstream.GzipStream-class.html#_read,Method gzipstream._StreamBuf._read()=gzipstream._StreamBuf-class.html#_read"><a title="gzipstream.GzipStream._read +gzipstream._StreamBuf._read" class="py-name" href="#" onclick="return doclink('link-67', '_read', 'link-67');">_read</a></tt><tt class="py-op">(</tt><tt class="py-name">fetchSize</tt><tt class="py-op">)</tt> </tt> +<a name="L393"></a><tt class="py-lineno">393</tt> <tt class="py-line"> <tt class="py-name">bufOut</tt> <tt class="py-op">=</tt> <tt class="py-name">buf</tt> </tt> +<a name="L394"></a><tt class="py-lineno">394</tt> <tt class="py-line"> <tt class="py-name">accumSize</tt> <tt class="py-op">=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L395"></a><tt class="py-lineno">395</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">buf</tt><tt class="py-op">:</tt> </tt> +<a name="L396"></a><tt class="py-lineno">396</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">size</tt> <tt class="py-keyword">and</tt> <tt class="py-name">accumSize</tt> <tt class="py-op">>=</tt> <tt class="py-name">size</tt><tt class="py-op">:</tt> </tt> +<a name="L397"></a><tt class="py-lineno">397</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt> +<a name="L398"></a><tt class="py-lineno">398</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name"><a title="gzipstream.GzipStream._read +gzipstream._StreamBuf._read" class="py-name" href="#" onclick="return doclink('link-68', '_read', 'link-67');">_read</a></tt><tt class="py-op">(</tt><tt class="py-name">fetchSize</tt><tt class="py-op">)</tt> </tt> +<a name="L399"></a><tt class="py-lineno">399</tt> <tt class="py-line"> <tt class="py-name">bufOut</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">bufOut</tt><tt class="py-op">,</tt> <tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L400"></a><tt class="py-lineno">400</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-69" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-69', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-70', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L401"></a><tt class="py-lineno">401</tt> <tt class="py-line"> <tt class="py-name">accumSize</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-71" class="py-name"><a title="gzipstream._StreamBuf.__checkInt" class="py-name" href="#" onclick="return doclink('link-71', '__checkInt', 'link-63');">__checkInt</a></tt><tt class="py-op">(</tt><tt class="py-name">accumSize</tt><tt class="py-op">)</tt> </tt> +<a name="L402"></a><tt class="py-lineno">402</tt> <tt class="py-line"> <tt class="py-name">accumSize</tt> <tt class="py-op">=</tt> <tt class="py-name">accumSize</tt> <tt class="py-op">+</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L403"></a><tt class="py-lineno">403</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">bufOut</tt> </tt> +</div><a name="L404"></a><tt class="py-lineno">404</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.readline"></a><div id="_StreamBuf.readline-def"><a name="L405"></a><tt class="py-lineno">405</tt> <a class="py-toggle" href="#" id="_StreamBuf.readline-toggle" onclick="return toggle('_StreamBuf.readline');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#readline">readline</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.readline-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.readline-expanded"><a name="L406"></a><tt class="py-lineno">406</tt> <tt class="py-line"> <tt class="py-docstring">"""Return one line of text: a string ending in a '\n' or EOF.</tt> </tt> +<a name="L407"></a><tt class="py-lineno">407</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L408"></a><tt class="py-lineno">408</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L409"></a><tt class="py-lineno">409</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L410"></a><tt class="py-lineno">410</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L411"></a><tt class="py-lineno">411</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't read from a write only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L412"></a><tt class="py-lineno">412</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L413"></a><tt class="py-lineno">413</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-72" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-72', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt id="link-73" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-73', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-74', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt><tt class="py-op">)</tt> </tt> +<a name="L414"></a><tt class="py-lineno">414</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">buf</tt><tt class="py-op">:</tt> </tt> +<a name="L415"></a><tt class="py-lineno">415</tt> <tt class="py-line"> <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">string</tt><tt class="py-op">.</tt><tt class="py-name">find</tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt> +<a name="L416"></a><tt class="py-lineno">416</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">>=</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L417"></a><tt class="py-lineno">417</tt> <tt class="py-line"> <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">i</tt> <tt class="py-op">+</tt> <tt class="py-number">1</tt> </tt> +<a name="L418"></a><tt class="py-lineno">418</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-75" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-75', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-op">(</tt><tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">buf</tt><tt class="py-op">)</tt><tt class="py-op">-</tt><tt class="py-name">i</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-number">1</tt><tt class="py-op">)</tt> </tt> +<a name="L419"></a><tt class="py-lineno">419</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">buf</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-name">i</tt><tt class="py-op">]</tt> </tt> +<a name="L420"></a><tt class="py-lineno">420</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L421"></a><tt class="py-lineno">421</tt> <tt class="py-line"> <tt class="py-keyword">break</tt> </tt> +<a name="L422"></a><tt class="py-lineno">422</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-string">'%s%s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">,</tt> <tt class="py-name">buf</tt><tt class="py-op">)</tt> </tt> +<a name="L423"></a><tt class="py-lineno">423</tt> <tt class="py-line"> <tt class="py-name">buf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-76', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt id="link-77" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-77', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="gzipstream._StreamBuf.__MIN_READ_SIZE" class="py-name" href="#" onclick="return doclink('link-78', '__MIN_READ_SIZE', 'link-35');">__MIN_READ_SIZE</a></tt><tt class="py-op">)</tt> </tt> +<a name="L424"></a><tt class="py-lineno">424</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">line</tt> </tt> +</div><a name="L425"></a><tt class="py-lineno">425</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.readlines"></a><div id="_StreamBuf.readlines-def"><a name="L426"></a><tt class="py-lineno">426</tt> <a class="py-toggle" href="#" id="_StreamBuf.readlines-toggle" onclick="return toggle('_StreamBuf.readlines');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#readlines">readlines</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.readlines-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.readlines-expanded"><a name="L427"></a><tt class="py-lineno">427</tt> <tt class="py-line"> <tt class="py-docstring">"""Read entire file into memory! And return a list of lines of text.</tt> </tt> +<a name="L428"></a><tt class="py-lineno">428</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L429"></a><tt class="py-lineno">429</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L430"></a><tt class="py-lineno">430</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L431"></a><tt class="py-lineno">431</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L432"></a><tt class="py-lineno">432</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't read from a write only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L433"></a><tt class="py-lineno">433</tt> <tt class="py-line"> <tt class="py-name">lines</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-op">]</tt> </tt> +<a name="L434"></a><tt class="py-lineno">434</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name" targets="Method gzipstream._StreamBuf.readline()=gzipstream._StreamBuf-class.html#readline"><a title="gzipstream._StreamBuf.readline" class="py-name" href="#" onclick="return doclink('link-79', 'readline', 'link-79');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L435"></a><tt class="py-lineno">435</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">line</tt><tt class="py-op">:</tt> </tt> +<a name="L436"></a><tt class="py-lineno">436</tt> <tt class="py-line"> <tt class="py-name">lines</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">line</tt><tt class="py-op">)</tt> </tt> +<a name="L437"></a><tt class="py-lineno">437</tt> <tt class="py-line"> <tt class="py-name">line</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="gzipstream._StreamBuf.readline" class="py-name" href="#" onclick="return doclink('link-80', 'readline', 'link-79');">readline</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L438"></a><tt class="py-lineno">438</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">lines</tt> </tt> +</div><a name="L439"></a><tt class="py-lineno">439</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf._refactorBufIO"></a><div id="_StreamBuf._refactorBufIO-def"><a name="L440"></a><tt class="py-lineno">440</tt> <a class="py-toggle" href="#" id="_StreamBuf._refactorBufIO-toggle" onclick="return toggle('_StreamBuf._refactorBufIO');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#_refactorBufIO">_refactorBufIO</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">writeFlushYN</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf._refactorBufIO-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf._refactorBufIO-expanded"><a name="L441"></a><tt class="py-lineno">441</tt> <tt class="py-line"> <tt class="py-docstring">"""Keep the buffer window within __{MAX,ABS_MAX}_BUF_SIZE before</tt> </tt> +<a name="L442"></a><tt class="py-lineno">442</tt> <tt class="py-line"><tt class="py-docstring"> the current self._bufIO.tell() position.</tt> </tt> +<a name="L443"></a><tt class="py-lineno">443</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L444"></a><tt class="py-lineno">444</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L445"></a><tt class="py-lineno">445</tt> <tt class="py-line"> <tt id="link-81" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-81', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-82', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L446"></a><tt class="py-lineno">446</tt> <tt class="py-line"> <tt class="py-name">tossed</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L447"></a><tt class="py-lineno">447</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">writeFlushYN</tt><tt class="py-op">:</tt> </tt> +<a name="L448"></a><tt class="py-lineno">448</tt> <tt class="py-line"> <tt class="py-name">tossed</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-83" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-83', 'tell', 'link-10');">tell</a></tt><tt class="py-op">]</tt> </tt> +<a name="L449"></a><tt class="py-lineno">449</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">tossed</tt><tt class="py-op">)</tt> </tt> +<a name="L450"></a><tt class="py-lineno">450</tt> <tt class="py-line"> <tt id="link-84" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-84', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">=</tt> <tt id="link-85" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-85', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">-</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">tossed</tt><tt class="py-op">)</tt> </tt> +<a name="L451"></a><tt class="py-lineno">451</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt id="link-86" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-86', 'tell', 'link-10');">tell</a></tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt> +<a name="L452"></a><tt class="py-lineno">452</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L453"></a><tt class="py-lineno">453</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-87', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +<a name="L454"></a><tt class="py-lineno">454</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-88', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt id="link-89" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-89', 'tell', 'link-10');">tell</a></tt><tt class="py-op">)</tt> </tt> +<a name="L455"></a><tt class="py-lineno">455</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt id="link-90" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-90', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">>=</tt> <tt id="link-91" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-91', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-92', '__ABS_MAX_BUFIO_SIZE', 'link-38');">__ABS_MAX_BUFIO_SIZE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L456"></a><tt class="py-lineno">456</tt> <tt class="py-line"> <tt class="py-name">tossed</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt id="link-93" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-93', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-94', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt><tt class="py-op">]</tt> </tt> +<a name="L457"></a><tt class="py-lineno">457</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">-</tt> <tt id="link-95" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-95', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-96', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt> </tt> +<a name="L458"></a><tt class="py-lineno">458</tt> <tt class="py-line"> <tt id="link-97" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-97', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">=</tt> <tt id="link-98" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-98', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">-</tt> <tt id="link-99" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-99', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-100', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt> </tt> +<a name="L459"></a><tt class="py-lineno">459</tt> <tt class="py-line"> <tt class="py-name">s</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">[</tt><tt id="link-101" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-101', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-102', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt> +<a name="L460"></a><tt class="py-lineno">460</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">StringIO</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L461"></a><tt class="py-lineno">461</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-103', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +<a name="L462"></a><tt class="py-lineno">462</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-104', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt id="link-105" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-105', 'tell', 'link-10');">tell</a></tt><tt class="py-op">)</tt> </tt> +<a name="L463"></a><tt class="py-lineno">463</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L464"></a><tt class="py-lineno">464</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">tossed</tt> </tt> +</div><a name="L465"></a><tt class="py-lineno">465</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf._dumpValues"></a><div id="_StreamBuf._dumpValues-def"><a name="L466"></a><tt class="py-lineno">466</tt> <a class="py-toggle" href="#" id="_StreamBuf._dumpValues-toggle" onclick="return toggle('_StreamBuf._dumpValues');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#_dumpValues">_dumpValues</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf._dumpValues-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf._dumpValues-expanded"><a name="L467"></a><tt class="py-lineno">467</tt> <tt class="py-line"> <tt class="py-docstring">"""Debug code.</tt> </tt> +<a name="L468"></a><tt class="py-lineno">468</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L469"></a><tt class="py-lineno">469</tt> <tt class="py-line"> <tt class="py-name">err</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-106', 'write', 'link-45');">write</a></tt> </tt> +<a name="L470"></a><tt class="py-lineno">470</tt> <tt class="py-line"> <tt class="py-name">err</tt><tt class="py-op">(</tt><tt class="py-string">'self._lenBufIO: %s/%s\n'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt><tt class="py-op">,</tt> </tt> +<a name="L471"></a><tt class="py-lineno">471</tt> <tt class="py-line"> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L472"></a><tt class="py-lineno">472</tt> <tt class="py-line"> <tt class="py-name">err</tt><tt class="py-op">(</tt><tt class="py-string">'self._currFoPos: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt><tt class="py-op">)</tt> </tt> +<a name="L473"></a><tt class="py-lineno">473</tt> <tt class="py-line"> <tt class="py-name">err</tt><tt class="py-op">(</tt><tt class="py-string">'self._readableYN: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">)</tt> </tt> +<a name="L474"></a><tt class="py-lineno">474</tt> <tt class="py-line"> <tt class="py-name">err</tt><tt class="py-op">(</tt><tt class="py-string">'self._writableYN: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">)</tt> </tt> +<a name="L475"></a><tt class="py-lineno">475</tt> <tt class="py-line"> <tt class="py-name">err</tt><tt class="py-op">(</tt><tt class="py-string">'self._closedYN: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">)</tt> </tt> +</div><a name="L476"></a><tt class="py-lineno">476</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.write"></a><div id="_StreamBuf.write-def"><a name="L477"></a><tt class="py-lineno">477</tt> <a class="py-toggle" href="#" id="_StreamBuf.write-toggle" onclick="return toggle('_StreamBuf.write');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#write">write</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">s</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.write-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.write-expanded"><a name="L478"></a><tt class="py-lineno">478</tt> <tt class="py-line"> <tt class="py-docstring">"""Write string to stream.</tt> </tt> +<a name="L479"></a><tt class="py-lineno">479</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L480"></a><tt class="py-lineno">480</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L481"></a><tt class="py-lineno">481</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L482"></a><tt class="py-lineno">482</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L483"></a><tt class="py-lineno">483</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't write to a read only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L484"></a><tt class="py-lineno">484</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-107', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +<a name="L485"></a><tt class="py-lineno">485</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-108" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-108', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-109', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L486"></a><tt class="py-lineno">486</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="gzipstream._StreamBuf.__checkInt" class="py-name" href="#" onclick="return doclink('link-110', '__checkInt', 'link-63');">__checkInt</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt><tt class="py-op">)</tt> </tt> +<a name="L487"></a><tt class="py-lineno">487</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">+</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +<a name="L488"></a><tt class="py-lineno">488</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +<a name="L489"></a><tt class="py-lineno">489</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">+</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +<a name="L490"></a><tt class="py-lineno">490</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt> +<a name="L491"></a><tt class="py-lineno">491</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-111" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-111', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name"><a title="gzipstream._StreamBuf._refactorBufIO" class="py-name" href="#" onclick="return doclink('link-112', '_refactorBufIO', 'link-64');">_refactorBufIO</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +</div><a name="L492"></a><tt class="py-lineno">492</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.writelines"></a><div id="_StreamBuf.writelines-def"><a name="L493"></a><tt class="py-lineno">493</tt> <a class="py-toggle" href="#" id="_StreamBuf.writelines-toggle" onclick="return toggle('_StreamBuf.writelines');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#writelines">writelines</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">l</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.writelines-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.writelines-expanded"><a name="L494"></a><tt class="py-lineno">494</tt> <tt class="py-line"> <tt class="py-docstring">"""Given list, concatenate and write.</tt> </tt> +<a name="L495"></a><tt class="py-lineno">495</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L496"></a><tt class="py-lineno">496</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L497"></a><tt class="py-lineno">497</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L498"></a><tt class="py-lineno">498</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L499"></a><tt class="py-lineno">499</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">9</tt><tt class="py-op">,</tt> <tt class="py-string">"Can't write to a read only object"</tt><tt class="py-op">)</tt> </tt> +<a name="L500"></a><tt class="py-lineno">500</tt> <tt class="py-line"> <tt class="py-keyword">for</tt> <tt class="py-name">s</tt> <tt class="py-keyword">in</tt> <tt class="py-name">l</tt><tt class="py-op">:</tt> </tt> +<a name="L501"></a><tt class="py-lineno">501</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-113', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">s</tt><tt class="py-op">)</tt> </tt> +</div><a name="L502"></a><tt class="py-lineno">502</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.seek"></a><div id="_StreamBuf.seek-def"><a name="L503"></a><tt class="py-lineno">503</tt> <a class="py-toggle" href="#" id="_StreamBuf.seek-toggle" onclick="return toggle('_StreamBuf.seek');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#seek">seek</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">offset</tt><tt class="py-op">,</tt> <tt class="py-param">where</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.seek-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.seek-expanded"><a name="L504"></a><tt class="py-lineno">504</tt> <tt class="py-line"> <tt class="py-docstring">"""A limited seek method. See class __doc__ for more details.</tt> </tt> +<a name="L505"></a><tt class="py-lineno">505</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L506"></a><tt class="py-lineno">506</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L507"></a><tt class="py-lineno">507</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L508"></a><tt class="py-lineno">508</tt> <tt class="py-line"> </tt> +<a name="L509"></a><tt class="py-lineno">509</tt> <tt class="py-line"> <tt id="link-114" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-114', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-115" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-115', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L510"></a><tt class="py-lineno">510</tt> <tt class="py-line"> <tt class="py-name">beginBuf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">-</tt> <tt id="link-116" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-116', 'tell', 'link-10');">tell</a></tt> </tt> +<a name="L511"></a><tt class="py-lineno">511</tt> <tt class="py-line"> <tt class="py-name">endBuf</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">+</tt> <tt class="py-name">beginBuf</tt> <tt class="py-op">-</tt> <tt class="py-number">1</tt> </tt> +<a name="L512"></a><tt class="py-lineno">512</tt> <tt class="py-line"> </tt> +<a name="L513"></a><tt class="py-lineno">513</tt> <tt class="py-line"> <tt class="py-comment"># Offset from beginning?</tt> </tt> +<a name="L514"></a><tt class="py-lineno">514</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">where</tt><tt class="py-op">:</tt> </tt> +<a name="L515"></a><tt class="py-lineno">515</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L516"></a><tt class="py-lineno">516</tt> <tt class="py-line"> <tt class="py-comment"># Offset from current position?</tt> </tt> +<a name="L517"></a><tt class="py-lineno">517</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">where</tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L518"></a><tt class="py-lineno">518</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-117" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-117', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-118" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-118', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L519"></a><tt class="py-lineno">519</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="gzipstream._StreamBuf.__checkInt" class="py-name" href="#" onclick="return doclink('link-119', '__checkInt', 'link-63');">__checkInt</a></tt><tt class="py-op">(</tt><tt class="py-name">offset</tt><tt class="py-op">)</tt> </tt> +<a name="L520"></a><tt class="py-lineno">520</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">+</tt> <tt class="py-name">offset</tt> </tt> +<a name="L521"></a><tt class="py-lineno">521</tt> <tt class="py-line"> <tt class="py-comment"># Offset from end?</tt> </tt> +<a name="L522"></a><tt class="py-lineno">522</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">where</tt> <tt class="py-op">==</tt> <tt class="py-number">2</tt><tt class="py-op">:</tt> </tt> +<a name="L523"></a><tt class="py-lineno">523</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L524"></a><tt class="py-lineno">524</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">offset</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt> <tt class="py-keyword">and</tt> <tt class="py-name">offset</tt> <tt class="py-op"><</tt> <tt id="link-120" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-120', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-121', '__ABS_MAX_BUFIO_SIZE', 'link-38');">__ABS_MAX_BUFIO_SIZE</a></tt><tt class="py-op">:</tt> </tt> +<a name="L525"></a><tt class="py-lineno">525</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument; can't determine %s "</tt> </tt> +<a name="L526"></a><tt class="py-lineno">526</tt> <tt class="py-line"> <tt class="py-string">"position due to unknown stream length"</tt> <tt class="py-op">%</tt> <tt class="py-name">offset</tt><tt class="py-op">)</tt> </tt> +<a name="L527"></a><tt class="py-lineno">527</tt> <tt class="py-line"> <tt class="py-comment"># Could be ugly if, for example, a socket stream "never ends" ;)</tt> </tt> +<a name="L528"></a><tt class="py-lineno">528</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-122', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt id="link-123" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-123', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-124', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L529"></a><tt class="py-lineno">529</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L530"></a><tt class="py-lineno">530</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">+</tt> <tt class="py-name">offset</tt> </tt> +<a name="L531"></a><tt class="py-lineno">531</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-125', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt class="py-name">offset</tt><tt class="py-op">,</tt> <tt class="py-number">2</tt><tt class="py-op">)</tt> </tt> +<a name="L532"></a><tt class="py-lineno">532</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L533"></a><tt class="py-lineno">533</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L534"></a><tt class="py-lineno">534</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">endBuf</tt> <tt class="py-op">+</tt> <tt class="py-name">offset</tt> </tt> +<a name="L535"></a><tt class="py-lineno">535</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L536"></a><tt class="py-lineno">536</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument"</tt><tt class="py-op">)</tt> </tt> +<a name="L537"></a><tt class="py-lineno">537</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt> <tt class="py-keyword">and</tt> <tt class="py-name">offset</tt> <tt class="py-op">></tt> <tt class="py-name">endBuf</tt><tt class="py-op">:</tt> </tt> +<a name="L538"></a><tt class="py-lineno">538</tt> <tt class="py-line"> <tt class="py-name">offset</tt> <tt class="py-op">=</tt> <tt class="py-name">endBuf</tt> </tt> +<a name="L539"></a><tt class="py-lineno">539</tt> <tt class="py-line"> <tt class="py-comment">#</tt> </tt> +<a name="L540"></a><tt class="py-lineno">540</tt> <tt class="py-line"> <tt class="py-comment"># Offset reflects "from beginning of file" now.</tt> </tt> +<a name="L541"></a><tt class="py-lineno">541</tt> <tt class="py-line"> <tt class="py-comment">#</tt> </tt> +<a name="L542"></a><tt class="py-lineno">542</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">offset</tt> <tt class="py-op"><</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt> +<a name="L543"></a><tt class="py-lineno">543</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument"</tt><tt class="py-op">)</tt> </tt> +<a name="L544"></a><tt class="py-lineno">544</tt> <tt class="py-line"> <tt class="py-name">delta</tt> <tt class="py-op">=</tt> <tt class="py-name">offset</tt> <tt class="py-op">-</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> </tt> +<a name="L545"></a><tt class="py-lineno">545</tt> <tt class="py-line"> <tt class="py-comment"># Before beginning of buffer -- can't do it sensibly -- data gone.</tt> </tt> +<a name="L546"></a><tt class="py-lineno">546</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">offset</tt> <tt class="py-op"><</tt> <tt class="py-name">beginBuf</tt><tt class="py-op">:</tt> </tt> +<a name="L547"></a><tt class="py-lineno">547</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">IOError</tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-number">22</tt><tt class="py-op">,</tt> <tt class="py-string">"Invalid argument; attempted seek before "</tt> </tt> +<a name="L548"></a><tt class="py-lineno">548</tt> <tt class="py-line"> <tt class="py-string">"beginning of buffer"</tt><tt class="py-op">)</tt> </tt> +<a name="L549"></a><tt class="py-lineno">549</tt> <tt class="py-line"> <tt class="py-comment"># After end of buffer.</tt> </tt> +<a name="L550"></a><tt class="py-lineno">550</tt> <tt class="py-line"> <tt class="py-keyword">elif</tt> <tt class="py-name">offset</tt> <tt class="py-op">></tt> <tt class="py-name">endBuf</tt><tt class="py-op">:</tt> </tt> +<a name="L551"></a><tt class="py-lineno">551</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L552"></a><tt class="py-lineno">552</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-name">delta</tt><tt class="py-op">:</tt> </tt> +<a name="L553"></a><tt class="py-lineno">553</tt> <tt class="py-line"> <tt class="py-name">x</tt> <tt class="py-op">=</tt> <tt class="py-name">min</tt><tt class="py-op">(</tt><tt id="link-126" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-126', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="gzipstream._StreamBuf.__MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-127', '__MAX_BUFIO_SIZE', 'link-36');">__MAX_BUFIO_SIZE</a></tt><tt class="py-op">,</tt> <tt class="py-name">delta</tt><tt class="py-op">)</tt> </tt> +<a name="L554"></a><tt class="py-lineno">554</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="gzipstream._StreamBuf.read" class="py-name" href="#" onclick="return doclink('link-128', 'read', 'link-16');">read</a></tt><tt class="py-op">(</tt><tt class="py-name">x</tt><tt class="py-op">)</tt> </tt> +<a name="L555"></a><tt class="py-lineno">555</tt> <tt class="py-line"> <tt class="py-name">delta</tt> <tt class="py-op">=</tt> <tt class="py-name">delta</tt> <tt class="py-op">-</tt> <tt class="py-name">x</tt> </tt> +<a name="L556"></a><tt class="py-lineno">556</tt> <tt class="py-line"> <tt class="py-comment"># Within the buffer.</tt> </tt> +<a name="L557"></a><tt class="py-lineno">557</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L558"></a><tt class="py-lineno">558</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name"><a title="gzipstream.GzipStream.seek +gzipstream._StreamBuf.seek" class="py-name" href="#" onclick="return doclink('link-129', 'seek', 'link-11');">seek</a></tt><tt class="py-op">(</tt><tt id="link-130" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-130', 'tell', 'link-10');">tell</a></tt> <tt class="py-op">+</tt> <tt class="py-name">delta</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt> +<a name="L559"></a><tt class="py-lineno">559</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-131" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-131', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-132', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L560"></a><tt class="py-lineno">560</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="gzipstream._StreamBuf.__checkInt" class="py-name" href="#" onclick="return doclink('link-133', '__checkInt', 'link-63');">__checkInt</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt><tt class="py-op">)</tt> </tt> +<a name="L561"></a><tt class="py-lineno">561</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> <tt class="py-op">+</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt id="link-134" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-134', 'tell', 'link-10');">tell</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">-</tt> <tt id="link-135" class="py-name"><a title="gzipstream._StreamBuf.tell" class="py-name" href="#" onclick="return doclink('link-135', 'tell', 'link-10');">tell</a></tt> </tt> +</div><a name="L562"></a><tt class="py-lineno">562</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.tell"></a><div id="_StreamBuf.tell-def"><a name="L563"></a><tt class="py-lineno">563</tt> <a class="py-toggle" href="#" id="_StreamBuf.tell-toggle" onclick="return toggle('_StreamBuf.tell');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#tell">tell</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.tell-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.tell-expanded"><a name="L564"></a><tt class="py-lineno">564</tt> <tt class="py-line"> <tt class="py-docstring">"""Return current position in the file-like object.</tt> </tt> +<a name="L565"></a><tt class="py-lineno">565</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L566"></a><tt class="py-lineno">566</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_currFoPos</tt> </tt> +</div><a name="L567"></a><tt class="py-lineno">567</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.close"></a><div id="_StreamBuf.close-def"><a name="L568"></a><tt class="py-lineno">568</tt> <a class="py-toggle" href="#" id="_StreamBuf.close-toggle" onclick="return toggle('_StreamBuf.close');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#close">close</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.close-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.close-expanded"><a name="L569"></a><tt class="py-lineno">569</tt> <tt class="py-line"> <tt class="py-docstring">"""Flush the buffer.</tt> </tt> +<a name="L570"></a><tt class="py-lineno">570</tt> <tt class="py-line"><tt class="py-docstring"> NOTE: fileobject is NOT closed, just flushed. Mapping as closely as</tt> </tt> +<a name="L571"></a><tt class="py-lineno">571</tt> <tt class="py-line"><tt class="py-docstring"> possible to GzipFile.</tt> </tt> +<a name="L572"></a><tt class="py-lineno">572</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L573"></a><tt class="py-lineno">573</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="gzipstream._StreamBuf.flush" class="py-name" href="#" onclick="return doclink('link-136', 'flush', 'link-17');">flush</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L574"></a><tt class="py-lineno">574</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt> </tt> +</div><a name="L575"></a><tt class="py-lineno">575</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.flush"></a><div id="_StreamBuf.flush-def"><a name="L576"></a><tt class="py-lineno">576</tt> <a class="py-toggle" href="#" id="_StreamBuf.flush-toggle" onclick="return toggle('_StreamBuf.flush');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#flush">flush</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.flush-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.flush-expanded"><a name="L577"></a><tt class="py-lineno">577</tt> <tt class="py-line"> <tt class="py-docstring">"""Flush the buffer.</tt> </tt> +<a name="L578"></a><tt class="py-lineno">578</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L579"></a><tt class="py-lineno">579</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L580"></a><tt class="py-lineno">580</tt> <tt class="py-line"> <tt class="py-keyword">raise</tt> <tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-string">"I/O operation on closed _StreamBuf object"</tt> </tt> +<a name="L581"></a><tt class="py-lineno">581</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_readableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L582"></a><tt class="py-lineno">582</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L583"></a><tt class="py-lineno">583</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_writableYN</tt><tt class="py-op">:</tt> </tt> +<a name="L584"></a><tt class="py-lineno">584</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-137" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-137', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="gzipstream._StreamBuf._refactorBufIO" class="py-name" href="#" onclick="return doclink('link-138', '_refactorBufIO', 'link-64');">_refactorBufIO</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L585"></a><tt class="py-lineno">585</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt id="link-139" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-139', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-140" class="py-name"><a title="gzipstream.GzipStream.VERSION +gzipstream._StreamBuf.VERSION" class="py-name" href="#" onclick="return doclink('link-140', 'VERSION', 'link-4');">VERSION</a></tt> <tt class="py-op">==</tt> <tt class="py-number">1</tt><tt class="py-op">:</tt> </tt> +<a name="L586"></a><tt class="py-lineno">586</tt> <tt class="py-line"> <tt class="py-comment"># may seem a bit redundant, but want to easily cut this</tt> </tt> +<a name="L587"></a><tt class="py-lineno">587</tt> <tt class="py-line"> <tt class="py-comment"># stuff out someday.</tt> </tt> +<a name="L588"></a><tt class="py-lineno">588</tt> <tt class="py-line"> <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt> +<a name="L589"></a><tt class="py-lineno">589</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="gzipstream._StreamBuf.flush" class="py-name" href="#" onclick="return doclink('link-141', 'flush', 'link-17');">flush</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +<a name="L590"></a><tt class="py-lineno">590</tt> <tt class="py-line"> <tt class="py-keyword">except</tt> <tt class="py-name">AttributeError</tt><tt class="py-op">:</tt> </tt> +<a name="L591"></a><tt class="py-lineno">591</tt> <tt class="py-line"> <tt class="py-keyword">pass</tt> </tt> +<a name="L592"></a><tt class="py-lineno">592</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> </tt> +<a name="L593"></a><tt class="py-lineno">593</tt> <tt class="py-line"> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">fo</tt><tt class="py-op">.</tt><tt id="link-142" class="py-name"><a title="gzipstream._StreamBuf.flush" class="py-name" href="#" onclick="return doclink('link-142', 'flush', 'link-17');">flush</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt> +</div><a name="L594"></a><tt class="py-lineno">594</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.__repr__"></a><div id="_StreamBuf.__repr__-def"><a name="L595"></a><tt class="py-lineno">595</tt> <a class="py-toggle" href="#" id="_StreamBuf.__repr__-toggle" onclick="return toggle('_StreamBuf.__repr__');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.__repr__-expanded"><a name="L596"></a><tt class="py-lineno">596</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt> +<a name="L597"></a><tt class="py-lineno">597</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt><tt class="py-op">:</tt> </tt> +<a name="L598"></a><tt class="py-lineno">598</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">"<closed gzipstream._StreamBuf instance, mode '%s' at %s>"</tt> <tt class="py-op">%</tt> \ </tt> +<a name="L599"></a><tt class="py-lineno">599</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L600"></a><tt class="py-lineno">600</tt> <tt class="py-line"> <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt> +<a name="L601"></a><tt class="py-lineno">601</tt> <tt class="py-line"> <tt class="py-name">ret</tt> <tt class="py-op">=</tt> <tt class="py-string">"<open gzipstream._StreamBuf instance, mode '%s' at %s>"</tt> <tt class="py-op">%</tt> \ </tt> +<a name="L602"></a><tt class="py-lineno">602</tt> <tt class="py-line"> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">mode</tt><tt class="py-op">,</tt> <tt class="py-name">id</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L603"></a><tt class="py-lineno">603</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">ret</tt> </tt> +</div><a name="L604"></a><tt class="py-lineno">604</tt> <tt class="py-line"> </tt> +<a name="L605"></a><tt class="py-lineno">605</tt> <tt class="py-line"> <tt class="py-comment"># __private__</tt> </tt> +<a name="L606"></a><tt class="py-lineno">606</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.__checkInt"></a><div id="_StreamBuf.__checkInt-def"><a name="L607"></a><tt class="py-lineno">607</tt> <a class="py-toggle" href="#" id="_StreamBuf.__checkInt-toggle" onclick="return toggle('_StreamBuf.__checkInt');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#__checkInt">__checkInt</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">i</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.__checkInt-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.__checkInt-expanded"><a name="L608"></a><tt class="py-lineno">608</tt> <tt class="py-line"> <tt class="py-docstring">"""Might be faster just to declare them longs.</tt> </tt> +<a name="L609"></a><tt class="py-lineno">609</tt> <tt class="py-line"><tt class="py-docstring"> Python versions 1.5.2 & 2.1.* ONLY!</tt> </tt> +<a name="L610"></a><tt class="py-lineno">610</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L611"></a><tt class="py-lineno">611</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">i</tt> <tt class="py-op">></tt> <tt id="link-143" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-143', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-144" class="py-name"><a title="gzipstream._StreamBuf.__INT_CHECK_SIZE" class="py-name" href="#" onclick="return doclink('link-144', '__INT_CHECK_SIZE', 'link-40');">__INT_CHECK_SIZE</a></tt> <tt class="py-keyword">and</tt> <tt class="py-name">type</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-name">IntType</tt><tt class="py-op">:</tt> </tt> +<a name="L612"></a><tt class="py-lineno">612</tt> <tt class="py-line"> <tt class="py-name">i</tt> <tt class="py-op">=</tt> <tt class="py-name">long</tt><tt class="py-op">(</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> </tt> +<a name="L613"></a><tt class="py-lineno">613</tt> <tt class="py-line"> <tt class="py-keyword">return</tt> <tt class="py-name">i</tt> </tt> +</div><a name="L614"></a><tt class="py-lineno">614</tt> <tt class="py-line"> </tt> +<a name="_StreamBuf.__debugThread"></a><div id="_StreamBuf.__debugThread-def"><a name="L615"></a><tt class="py-lineno">615</tt> <a class="py-toggle" href="#" id="_StreamBuf.__debugThread-toggle" onclick="return toggle('_StreamBuf.__debugThread');">-</a><tt class="py-line"> <tt class="py-keyword">def</tt> <a class="py-def-name" href="gzipstream._StreamBuf-class.html#__debugThread">__debugThread</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +</div><div id="_StreamBuf.__debugThread-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="_StreamBuf.__debugThread-expanded"><a name="L616"></a><tt class="py-lineno">616</tt> <tt class="py-line"> <tt class="py-docstring">"""XXX: Only used for debugging. Runs a thread that watches some</tt> </tt> +<a name="L617"></a><tt class="py-lineno">617</tt> <tt class="py-line"><tt class="py-docstring"> tell-tale warning flags that something bad is happening.</tt> </tt> +<a name="L618"></a><tt class="py-lineno">618</tt> <tt class="py-line"><tt class="py-docstring"> """</tt> </tt> +<a name="L619"></a><tt class="py-lineno">619</tt> <tt class="py-line"> <tt class="py-keyword">while</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_closedYN</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">__mutexOnYN</tt><tt class="py-op">:</tt> </tt> +<a name="L620"></a><tt class="py-lineno">620</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">!=</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt> +<a name="L621"></a><tt class="py-lineno">621</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-145" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-145', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'XXX: ERROR! _lenBufIO != len(...): %s != %s\n'</tt> </tt> +<a name="L622"></a><tt class="py-lineno">622</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt><tt class="py-op">,</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_bufIO</tt><tt class="py-op">.</tt><tt class="py-name">getvalue</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L623"></a><tt class="py-lineno">623</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-146" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-146', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'XXX: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L624"></a><tt class="py-lineno">624</tt> <tt class="py-line"> <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt> <tt class="py-op">></tt> <tt id="link-147" class="py-name"><a title="gzipstream._StreamBuf" class="py-name" href="#" onclick="return doclink('link-147', '_StreamBuf', 'link-7');">_StreamBuf</a></tt><tt class="py-op">.</tt><tt id="link-148" class="py-name"><a title="gzipstream._StreamBuf.__ABS_MAX_BUFIO_SIZE" class="py-name" href="#" onclick="return doclink('link-148', '__ABS_MAX_BUFIO_SIZE', 'link-38');">__ABS_MAX_BUFIO_SIZE</a></tt><tt class="py-op">*</tt><tt class="py-number">2</tt><tt class="py-op">:</tt> </tt> +<a name="L625"></a><tt class="py-lineno">625</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-149" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-149', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'XXX: ERROR! StringIO buffer WAY to big: %s\n'</tt> </tt> +<a name="L626"></a><tt class="py-lineno">626</tt> <tt class="py-line"> <tt class="py-op">%</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_lenBufIO</tt><tt class="py-op">)</tt> </tt> +<a name="L627"></a><tt class="py-lineno">627</tt> <tt class="py-line"> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">stderr</tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="gzipstream._StreamBuf.write" class="py-name" href="#" onclick="return doclink('link-150', 'write', 'link-45');">write</a></tt><tt class="py-op">(</tt><tt class="py-string">'XXX: %s\n'</tt> <tt class="py-op">%</tt> <tt class="py-name">repr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt> +<a name="L628"></a><tt class="py-lineno">628</tt> <tt class="py-line"> <tt class="py-name">time</tt><tt class="py-op">.</tt><tt class="py-name">sleep</tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt> +</div></div><a name="L629"></a><tt class="py-lineno">629</tt> <tt class="py-line"> </tt> +<a name="L630"></a><tt class="py-lineno">630</tt> <tt class="py-line"><tt class="py-comment">#-------------------------------------------------------------------------------</tt> </tt> +<a name="L631"></a><tt class="py-lineno">631</tt> <tt class="py-line"> </tt><script type="text/javascript"> +<!-- +expandto(location.href); +// --> +</script> +</pre> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Home </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/gzipstream.GzipStream-class.html b/projects/python-gzipstream/html/gzipstream.GzipStream-class.html new file mode 100644 index 0000000..0b745af --- /dev/null +++ b/projects/python-gzipstream/html/gzipstream.GzipStream-class.html @@ -0,0 +1,676 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream.GzipStream</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + <a href="gzipstream-module.html">Module gzipstream</a> :: + Class GzipStream + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="gzipstream.GzipStream-class.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<!-- ==================== CLASS DESCRIPTION ==================== --> +<h1 class="epydoc">Class GzipStream</h1><p class="nomargin-top"><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream">source code</a></span></p> +<pre class="base-tree"> + object --+ + | + _io._IOBase --+ + | +_io._BufferedIOBase --+ + | + object --+ | + | | + _io._IOBase --+ | + | | + io.IOBase --+ + | + io.BufferedIOBase --+ + | + gzip.GzipFile --+ + | + <strong class="uidshort">GzipStream</strong> +</pre> + +<hr /> +<p>Handle streaming gzipped data</p> + <p>GzipStream extends the functionality of the gzip.GzipFile class. + gzip.GzipFile generally needs a seekable object. This doesn't allow for + streaming gzipped data to be processed easily (e.g. can't seek a socket). + Using the _StreamBuf class enables streaming gzipped data to be processed + by buffering that data at it passes through.</p> + <p>For Python versions 1.5.2 & 2.1.*: Normal data version. Normally + sized data stream version == faster. For very large data streams + (2.5GB-ish), use GzipStreamXL.</p> + +<!-- ==================== NESTED CLASSES ==================== --> +<a name="section-NestedClasses"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Nested Classes</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-NestedClasses" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b>: + <code><a href="abc.ABCMeta-class.html">__metaclass__</a></code> + </p> + </td> + </tr> +</table> +<!-- ==================== INSTANCE METHODS ==================== --> +<a name="section-InstanceMethods"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Instance Methods</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-InstanceMethods" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">stream</span>=<span class="summary-sig-default">None</span>, + <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">None</span>, + <span class="summary-sig-arg">compresslevel</span>=<span class="summary-sig-default">9</span>)</span><br /> + Constructor for the GzipFile class.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.__init__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="_initModeLogic"></a><span class="summary-sig-name">_initModeLogic</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">stream</span>, + <span class="summary-sig-arg">mode</span>)</span><br /> + attempt to determine the mode</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._initModeLogic">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#_read" class="summary-sig-name" onclick="show_private();">_read</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">1024</span>)</span></td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#seek" class="summary-sig-name">seek</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">offset</span>)</span><br /> + Change stream position.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.seek">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#__repr__" class="summary-sig-name">__repr__</a>(<span class="summary-sig-arg">self</span>)</span><br /> + repr(x)</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.__repr__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#_read_eof" class="summary-sig-name" onclick="show_private();">_read_eof</a>(<span class="summary-sig-arg">self</span>)</span></td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read_eof">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>)</span><br /> + Flush and close the IO object.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.close">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStream-class.html#_read32XL" class="summary-sig-name" onclick="show_private();">_read32XL</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">input</span>)</span><br /> + Allow for very large files/streams to be processed.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read32XL">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>fileno</code>, + <code>flush</code>, + <code>read</code>, + <code>readable</code>, + <code>readline</code>, + <code>rewind</code>, + <code>seekable</code>, + <code>writable</code>, + <code>write</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b> (private): + <code>_add_read_data</code>, + <code>_check_closed</code>, + <code>_init_read</code>, + <code>_init_write</code>, + <code>_read_gzip_header</code>, + <code>_unread</code>, + <code>_write_gzip_header</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>_io._BufferedIOBase</code></b>: + <code>detach</code>, + <code>read1</code>, + <code>readinto</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>_io._IOBase</code></b>: + <code>__enter__</code>, + <code>__exit__</code>, + <code>__iter__</code>, + <code>__new__</code>, + <code>isatty</code>, + <code>next</code>, + <code>readlines</code>, + <code>tell</code>, + <code>truncate</code>, + <code>writelines</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>_io._IOBase</code></b> (private): + <code>_checkClosed</code>, + <code>_checkReadable</code>, + <code>_checkSeekable</code>, + <code>_checkWritable</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__delattr__</code>, + <code>__format__</code>, + <code>__getattribute__</code>, + <code>__hash__</code>, + <code>__reduce__</code>, + <code>__reduce_ex__</code>, + <code>__setattr__</code>, + <code>__sizeof__</code>, + <code>__str__</code>, + <code>__subclasshook__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== CLASS VARIABLES ==================== --> +<a name="section-ClassVariables"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Class Variables</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-ClassVariables" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="2">2</code> + </td> + </tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>max_read_chunk</code>, + <code>myfileobj</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b> (private): + <code>_abc_negative_cache</code>, + <code>_abc_negative_cache_version</code>, + <code>_abc_registry</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b>: + <code>__abstractmethods__</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b> (private): + <code>_abc_cache</code> + </p></div> + </td> + </tr> +</table> +<!-- ==================== PROPERTIES ==================== --> +<a name="section-Properties"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Properties</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Properties" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>closed</code>, + <code>filename</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__class__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== METHOD DETAILS ==================== --> +<a name="section-MethodDetails"></a> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Method Details</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-MethodDetails" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +</table> +<a name="__init__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">stream</span>=<span class="sig-default">None</span>, + <span class="sig-arg">mode</span>=<span class="sig-default">None</span>, + <span class="sig-arg">compresslevel</span>=<span class="sig-default">9</span>)</span> + <br /><em class="fname">(Constructor)</em> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.__init__">source code</a></span> + </td> + </tr></table> + + <p>Constructor for the GzipFile class.</p> + <p>At least one of fileobj and filename must be given a non-trivial + value.</p> + <p>The new class instance is based on fileobj, which can be a regular + file, a StringIO object, or any other object which simulates a file. It + defaults to None, in which case filename is opened to provide a file + object.</p> + <p>When fileobj is not None, the filename argument is only used to be + included in the gzip file header, which may includes the original + filename of the uncompressed file. It defaults to the filename of + fileobj, if discernible; otherwise, it defaults to the empty string, and + in this case the original filename is not included in the header.</p> + <p>The mode argument can be any of 'r', 'rb', 'a', 'ab', 'w', or 'wb', + depending on whether the file will be read or written. The default is + the mode of fileobj if discernible; otherwise, the default is 'rb'. Be + aware that only the 'rb', 'ab', and 'wb' values should be used for + cross-platform portability.</p> + <p>The compresslevel argument is an integer from 1 to 9 controlling the + level of compression; 1 is fastest and produces the least compression, + and 9 is slowest and produces the most compression. The default is + 9.</p> + <p>The mtime argument is an optional numeric timestamp to be written to + the stream when compressing. All gzip compressed streams are required to + contain a timestamp. If omitted or None, the current time is used. This + module ignores the timestamp when decompressing; however, some programs, + such as gunzip, make use of it. The format of the timestamp is the same + as that of the return value of time.time() and of the st_mtime member of + the object returned by os.stat().</p> + <dl class="fields"> + <dt>Overrides: + object.__init__ + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="_read"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_read</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">size</span>=<span class="sig-default">1024</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read">source code</a></span> + </td> + </tr></table> + + + <dl class="fields"> + <dt>Overrides: + gzip.GzipFile._read + </dt> + </dl> +</td></tr></table> +</div> +<a name="seek"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">seek</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">offset</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.seek">source code</a></span> + </td> + </tr></table> + + <p>Change stream position.</p> + <p>Change the stream position to byte offset offset. offset is + interpreted relative to the position indicated by whence. Values for + whence are:</p> + <p>* 0 -- start of stream (the default); offset should be zero or + positive * 1 -- current stream position; offset may be negative * 2 -- + end of stream; offset is usually negative</p> + <p>Return the new absolute position.</p> + <dl class="fields"> + <dt>Overrides: + _io._IOBase.seek + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="__repr__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__repr__</span>(<span class="sig-arg">self</span>)</span> + <br /><em class="fname">(Representation operator)</em> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.__repr__">source code</a></span> + </td> + </tr></table> + + <p>repr(x)</p> + <dl class="fields"> + <dt>Overrides: + object.__repr__ + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="_read_eof"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_read_eof</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read_eof">source code</a></span> + </td> + </tr></table> + + + <dl class="fields"> + <dt>Overrides: + gzip.GzipFile._read_eof + </dt> + </dl> +</td></tr></table> +</div> +<a name="close"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream.close">source code</a></span> + </td> + </tr></table> + + <p>Flush and close the IO object.</p> + <p>This method has no effect if the file is already closed.</p> + <dl class="fields"> + <dt>Overrides: + _io._IOBase.close + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="_read32XL"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_read32XL</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">input</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStream._read32XL">source code</a></span> + </td> + </tr></table> + + <pre class="literalblock"> +Allow for very large files/streams to be processed. + Slows things down, but... + +Used by Python v2.2.*. +Also used by Python v1.5.2/v2.1.* in inheriting class GzipStreamXL. + +</pre> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/gzipstream.GzipStreamXL-class.html b/projects/python-gzipstream/html/gzipstream.GzipStreamXL-class.html new file mode 100644 index 0000000..b4373f4 --- /dev/null +++ b/projects/python-gzipstream/html/gzipstream.GzipStreamXL-class.html @@ -0,0 +1,484 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream.GzipStreamXL</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + <a href="gzipstream-module.html">Module gzipstream</a> :: + Class GzipStreamXL + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="gzipstream.GzipStreamXL-class.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<!-- ==================== CLASS DESCRIPTION ==================== --> +<h1 class="epydoc">Class GzipStreamXL</h1><p class="nomargin-top"><span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL">source code</a></span></p> +<pre class="base-tree"> + object --+ + | + _io._IOBase --+ + | +_io._BufferedIOBase --+ + | + object --+ | + | | + _io._IOBase --+ | + | | + io.IOBase --+ + | + io.BufferedIOBase --+ + | + gzip.GzipFile --+ + | + <a href="gzipstream.GzipStream-class.html">GzipStream</a> --+ + | + <strong class="uidshort">GzipStreamXL</strong> +</pre> + +<hr /> +<p>Handle streaming gzipped data -- large data version.</p> + <p>Very large sized data stream version -- slooower. For normally sized + data streams (< 2.5GB-ish), use GzipStream.</p> + +<!-- ==================== NESTED CLASSES ==================== --> +<a name="section-NestedClasses"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Nested Classes</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-NestedClasses" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b>: + <code><a href="abc.ABCMeta-class.html">__metaclass__</a></code> + </p> + </td> + </tr> +</table> +<!-- ==================== INSTANCE METHODS ==================== --> +<a name="section-InstanceMethods"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Instance Methods</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-InstanceMethods" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStreamXL-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">stream</span>=<span class="summary-sig-default">None</span>, + <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">None</span>, + <span class="summary-sig-arg">compresslevel</span>=<span class="summary-sig-default">9</span>)</span><br /> + Constructor for the GzipFile class.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL.__init__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStreamXL-class.html#_init_write" class="summary-sig-name" onclick="show_private();">_init_write</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">filename</span>)</span><br /> + Make size long in order to support very large files.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL._init_write">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream.GzipStreamXL-class.html#_init_read" class="summary-sig-name" onclick="show_private();">_init_read</a>(<span class="summary-sig-arg">self</span>)</span><br /> + Make size a long in order to support very large files.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL._init_read">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code><a href="gzipstream.GzipStream-class.html">GzipStream</a></code></b>: + <code><a href="gzipstream.GzipStream-class.html#__repr__">__repr__</a></code>, + <code><a href="gzipstream.GzipStream-class.html#close">close</a></code>, + <code><a href="gzipstream.GzipStream-class.html#seek">seek</a></code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="gzipstream.GzipStream-class.html">GzipStream</a></code></b> (private): + <code><a href="gzipstream.GzipStream-class.html#_initModeLogic" onclick="show_private();">_initModeLogic</a></code>, + <code><a href="gzipstream.GzipStream-class.html#_read" onclick="show_private();">_read</a></code>, + <code><a href="gzipstream.GzipStream-class.html#_read32XL" onclick="show_private();">_read32XL</a></code>, + <code><a href="gzipstream.GzipStream-class.html#_read_eof" onclick="show_private();">_read_eof</a></code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>fileno</code>, + <code>flush</code>, + <code>read</code>, + <code>readable</code>, + <code>readline</code>, + <code>rewind</code>, + <code>seekable</code>, + <code>writable</code>, + <code>write</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b> (private): + <code>_add_read_data</code>, + <code>_check_closed</code>, + <code>_read_gzip_header</code>, + <code>_unread</code>, + <code>_write_gzip_header</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>_io._BufferedIOBase</code></b>: + <code>detach</code>, + <code>read1</code>, + <code>readinto</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>_io._IOBase</code></b>: + <code>__enter__</code>, + <code>__exit__</code>, + <code>__iter__</code>, + <code>__new__</code>, + <code>isatty</code>, + <code>next</code>, + <code>readlines</code>, + <code>tell</code>, + <code>truncate</code>, + <code>writelines</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>_io._IOBase</code></b> (private): + <code>_checkClosed</code>, + <code>_checkReadable</code>, + <code>_checkSeekable</code>, + <code>_checkWritable</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__delattr__</code>, + <code>__format__</code>, + <code>__getattribute__</code>, + <code>__hash__</code>, + <code>__reduce__</code>, + <code>__reduce_ex__</code>, + <code>__setattr__</code>, + <code>__sizeof__</code>, + <code>__str__</code>, + <code>__subclasshook__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== CLASS VARIABLES ==================== --> +<a name="section-ClassVariables"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Class Variables</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-ClassVariables" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code><a href="gzipstream.GzipStream-class.html">GzipStream</a></code></b>: + <code><a href="gzipstream.GzipStream-class.html#VERSION">VERSION</a></code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>max_read_chunk</code>, + <code>myfileobj</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b> (private): + <code>_abc_negative_cache</code>, + <code>_abc_negative_cache_version</code>, + <code>_abc_registry</code> + </p></div> + <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b>: + <code>__abstractmethods__</code> + </p> + <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code>io.IOBase</code></b> (private): + <code>_abc_cache</code> + </p></div> + </td> + </tr> +</table> +<!-- ==================== PROPERTIES ==================== --> +<a name="section-Properties"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Properties</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-Properties" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> + <tr> + <td colspan="2" class="summary"> + <p class="indent-wrapped-lines"><b>Inherited from <code>gzip.GzipFile</code></b>: + <code>closed</code>, + <code>filename</code> + </p> + <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>: + <code>__class__</code> + </p> + </td> + </tr> +</table> +<!-- ==================== METHOD DETAILS ==================== --> +<a name="section-MethodDetails"></a> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Method Details</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-MethodDetails" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +</table> +<a name="__init__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">stream</span>=<span class="sig-default">None</span>, + <span class="sig-arg">mode</span>=<span class="sig-default">None</span>, + <span class="sig-arg">compresslevel</span>=<span class="sig-default">9</span>)</span> + <br /><em class="fname">(Constructor)</em> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL.__init__">source code</a></span> + </td> + </tr></table> + + <p>Constructor for the GzipFile class.</p> + <p>At least one of fileobj and filename must be given a non-trivial + value.</p> + <p>The new class instance is based on fileobj, which can be a regular + file, a StringIO object, or any other object which simulates a file. It + defaults to None, in which case filename is opened to provide a file + object.</p> + <p>When fileobj is not None, the filename argument is only used to be + included in the gzip file header, which may includes the original + filename of the uncompressed file. It defaults to the filename of + fileobj, if discernible; otherwise, it defaults to the empty string, and + in this case the original filename is not included in the header.</p> + <p>The mode argument can be any of 'r', 'rb', 'a', 'ab', 'w', or 'wb', + depending on whether the file will be read or written. The default is + the mode of fileobj if discernible; otherwise, the default is 'rb'. Be + aware that only the 'rb', 'ab', and 'wb' values should be used for + cross-platform portability.</p> + <p>The compresslevel argument is an integer from 1 to 9 controlling the + level of compression; 1 is fastest and produces the least compression, + and 9 is slowest and produces the most compression. The default is + 9.</p> + <p>The mtime argument is an optional numeric timestamp to be written to + the stream when compressing. All gzip compressed streams are required to + contain a timestamp. If omitted or None, the current time is used. This + module ignores the timestamp when decompressing; however, some programs, + such as gunzip, make use of it. The format of the timestamp is the same + as that of the return value of time.time() and of the st_mtime member of + the object returned by os.stat().</p> + <dl class="fields"> + <dt>Overrides: + object.__init__ + <dd><em class="note">(inherited documentation)</em></dd> + </dt> + </dl> +</td></tr></table> +</div> +<a name="_init_write"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_init_write</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">filename</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL._init_write">source code</a></span> + </td> + </tr></table> + + <p>Make size long in order to support very large files.</p> + <dl class="fields"> + <dt>Overrides: + gzip.GzipFile._init_write + </dt> + </dl> +</td></tr></table> +</div> +<a name="_init_read"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_init_read</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#GzipStreamXL._init_read">source code</a></span> + </td> + </tr></table> + + <p>Make size a long in order to support very large files.</p> + <dl class="fields"> + <dt>Overrides: + gzip.GzipFile._init_read + </dt> + </dl> +</td></tr></table> +</div> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/gzipstream._StreamBuf-class.html b/projects/python-gzipstream/html/gzipstream._StreamBuf-class.html new file mode 100644 index 0000000..6a0bace --- /dev/null +++ b/projects/python-gzipstream/html/gzipstream._StreamBuf-class.html @@ -0,0 +1,729 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream._StreamBuf</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> + <span class="breadcrumbs"> + <a href="gzipstream-module.html">Module gzipstream</a> :: + Class _StreamBuf + </span> + </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="gzipstream._StreamBuf-class.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<!-- ==================== CLASS DESCRIPTION ==================== --> +<h1 class="epydoc">Class _StreamBuf</h1><p class="nomargin-top"><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf">source code</a></span></p> +<p>Stream buffer for file-like objects.</p> + <p>Allow seeks on socket-like objects. Enables non-seekable file-like + objects some flexibility as regards to seeking. It does this via a + buffer, a StringIO object. Note, because it is assumed that a socket + stream is being manipulated, once the buffer "window" has + passed over a data segment, seeking prior to that is not allowed. XXX: + probably reinventing the wheel.</p> + +<!-- ==================== INSTANCE METHODS ==================== --> +<a name="section-InstanceMethods"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Instance Methods</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-InstanceMethods" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">stream</span>=<span class="summary-sig-default">None</span>, + <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">None</span>)</span><br /> + Constructor.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__init__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="__del__"></a><span class="summary-sig-name">__del__</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Destructor</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__del__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="isatty"></a><span class="summary-sig-name">isatty</span>(<span class="summary-sig-arg">self</span>)</span></td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.isatty">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="_read"></a><span class="summary-sig-name">_read</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">size</span>)</span><br /> + A buffered read --- refactored.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._read">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="read"></a><span class="summary-sig-name">read</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">size</span>=<span class="summary-sig-default">None</span>)</span><br /> + A buffered read.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.read">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="readline"></a><span class="summary-sig-name">readline</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Return one line of text: a string ending in a ' ' or EOF.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.readline">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="readlines"></a><span class="summary-sig-name">readlines</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Read entire file into memory! And return a list of lines of text.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.readlines">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="_refactorBufIO"></a><span class="summary-sig-name">_refactorBufIO</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">writeFlushYN</span>=<span class="summary-sig-default">0</span>)</span><br /> + Keep the buffer window within __{MAX,ABS_MAX}_BUF_SIZE before the + current self._bufIO.tell() position.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._refactorBufIO">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="_dumpValues"></a><span class="summary-sig-name">_dumpValues</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Debug code.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._dumpValues">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="write"></a><span class="summary-sig-name">write</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">s</span>)</span><br /> + Write string to stream.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.write">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="writelines"></a><span class="summary-sig-name">writelines</span>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">l</span>)</span><br /> + Given list, concatenate and write.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.writelines">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#seek" class="summary-sig-name">seek</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">offset</span>, + <span class="summary-sig-arg">where</span>=<span class="summary-sig-default">0</span>)</span><br /> + A limited seek method.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.seek">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="tell"></a><span class="summary-sig-name">tell</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Return current position in the file-like object.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.tell">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#close" class="summary-sig-name">close</a>(<span class="summary-sig-arg">self</span>)</span><br /> + Flush the buffer.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.close">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="flush"></a><span class="summary-sig-name">flush</span>(<span class="summary-sig-arg">self</span>)</span><br /> + Flush the buffer.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.flush">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a name="__repr__"></a><span class="summary-sig-name">__repr__</span>(<span class="summary-sig-arg">self</span>)</span></td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__repr__">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#__checkInt" class="summary-sig-name" onclick="show_private();">__checkInt</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">i</span>)</span><br /> + Might be faster just to declare them longs.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__checkInt">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#__debugThread" class="summary-sig-name" onclick="show_private();">__debugThread</a>(<span class="summary-sig-arg">self</span>)</span><br /> + XXX: Only used for debugging.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__debugThread">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__checkInt" class="summary-sig-name" onclick="show_private();">_StreamBuf__checkInt</a>(<span class="summary-sig-arg">self</span>, + <span class="summary-sig-arg">i</span>)</span><br /> + Might be faster just to declare them longs.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._StreamBuf__checkInt">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td><span class="summary-sig"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__debugThread" class="summary-sig-name" onclick="show_private();">_StreamBuf__debugThread</a>(<span class="summary-sig-arg">self</span>)</span><br /> + XXX: Only used for debugging.</td> + <td align="right" valign="top"> + <span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._StreamBuf__debugThread">source code</a></span> + + </td> + </tr> + </table> + + </td> + </tr> +</table> +<!-- ==================== CLASS VARIABLES ==================== --> +<a name="section-ClassVariables"></a> +<table class="summary" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Class Variables</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-ClassVariables" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="__MIN_READ_SIZE"></a><span class="summary-name">__MIN_READ_SIZE</span> = <code title="1024* 2">1024* 2</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="__MAX_BUFIO_SIZE"></a><span class="summary-name">__MAX_BUFIO_SIZE</span> = <code title="__MIN_READ_SIZE* 10">__MIN_READ_SIZE* 10</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="__ABS_MAX_BUFIO_SIZE"></a><span class="summary-name">__ABS_MAX_BUFIO_SIZE</span> = <code title="__MAX_BUFIO_SIZE* 2">__MAX_BUFIO_SIZE* 2</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="__INT_CHECK_SIZE"></a><span class="summary-name">__INT_CHECK_SIZE</span> = <code title="sys.maxint-__ABS_MAX_BUFIO_SIZE-2">sys.maxint-__ABS_MAX_BUFIO_SIZE-2</code> + </td> + </tr> +<tr> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="VERSION"></a><span class="summary-name">VERSION</span> = <code title="2">2</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_StreamBuf__ABS_MAX_BUFIO_SIZE"></a><span class="summary-name">_StreamBuf__ABS_MAX_BUFIO_SIZE</span> = <code title="40960">40960</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_StreamBuf__INT_CHECK_SIZE"></a><span class="summary-name">_StreamBuf__INT_CHECK_SIZE</span> = <code title="9223372036854734845">9223372036854734845</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_StreamBuf__MAX_BUFIO_SIZE"></a><span class="summary-name">_StreamBuf__MAX_BUFIO_SIZE</span> = <code title="20480">20480</code> + </td> + </tr> +<tr class="private"> + <td width="15%" align="right" valign="top" class="summary"> + <span class="summary-type"> </span> + </td><td class="summary"> + <a name="_StreamBuf__MIN_READ_SIZE"></a><span class="summary-name">_StreamBuf__MIN_READ_SIZE</span> = <code title="2048">2048</code> + </td> + </tr> +</table> +<!-- ==================== METHOD DETAILS ==================== --> +<a name="section-MethodDetails"></a> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr bgcolor="#70b0f0" class="table-header"> + <td colspan="2" class="table-header"> + <table border="0" cellpadding="0" cellspacing="0" width="100%"> + <tr valign="top"> + <td align="left"><span class="table-header">Method Details</span></td> + <td align="right" valign="top" + ><span class="options">[<a href="#section-MethodDetails" + class="privatelink" onclick="toggle_private();" + >hide private</a>]</span></td> + </tr> + </table> + </td> +</tr> +</table> +<a name="__init__"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">stream</span>=<span class="sig-default">None</span>, + <span class="sig-arg">mode</span>=<span class="sig-default">None</span>)</span> + <br /><em class="fname">(Constructor)</em> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__init__">source code</a></span> + </td> + </tr></table> + + <p>Constructor. stream: an open file-like object.</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="seek"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">seek</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">offset</span>, + <span class="sig-arg">where</span>=<span class="sig-default">0</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.seek">source code</a></span> + </td> + </tr></table> + + <p>A limited seek method. See class __doc__ for more details.</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="close"></a> +<div> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">close</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.close">source code</a></span> + </td> + </tr></table> + + <pre class="literalblock"> +Flush the buffer. +NOTE: fileobject is NOT closed, just flushed. Mapping as closely as + possible to GzipFile. + +</pre> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="__checkInt"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__checkInt</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">i</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__checkInt">source code</a></span> + </td> + </tr></table> + + <p>Might be faster just to declare them longs. Python versions 1.5.2 + & 2.1.* ONLY!</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="__debugThread"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">__debugThread</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf.__debugThread">source code</a></span> + </td> + </tr></table> + + <p>XXX: Only used for debugging. Runs a thread that watches some + tell-tale warning flags that something bad is happening.</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="_StreamBuf__checkInt"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_StreamBuf__checkInt</span>(<span class="sig-arg">self</span>, + <span class="sig-arg">i</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._StreamBuf__checkInt">source code</a></span> + </td> + </tr></table> + + <p>Might be faster just to declare them longs. Python versions 1.5.2 + & 2.1.* ONLY!</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<a name="_StreamBuf__debugThread"></a> +<div class="private"> +<table class="details" border="1" cellpadding="3" + cellspacing="0" width="100%" bgcolor="white"> +<tr><td> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr valign="top"><td> + <h3 class="epydoc"><span class="sig"><span class="sig-name">_StreamBuf__debugThread</span>(<span class="sig-arg">self</span>)</span> + </h3> + </td><td align="right" valign="top" + ><span class="codelink"><a href="gzipstream-pysrc.html#_StreamBuf._StreamBuf__debugThread">source code</a></span> + </td> + </tr></table> + + <p>XXX: Only used for debugging. Runs a thread that watches some + tell-tale warning flags that something bad is happening.</p> + <dl class="fields"> + </dl> +</td></tr></table> +</div> +<br /> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/help.html b/projects/python-gzipstream/html/help.html new file mode 100644 index 0000000..a370784 --- /dev/null +++ b/projects/python-gzipstream/html/help.html @@ -0,0 +1,268 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Help</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Help </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="help.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> + +<h1 class="epydoc"> API Documentation </h1> + +<p> This document contains the API (Application Programming Interface) +documentation for this project. Documentation for the Python +objects defined by the project is divided into separate pages for each +package, module, and class. The API documentation also includes two +pages containing information about the project as a whole: a trees +page, and an index page. </p> + +<h2> Object Documentation </h2> + + <p>Each <strong>Package Documentation</strong> page contains: </p> + <ul> + <li> A description of the package. </li> + <li> A list of the modules and sub-packages contained by the + package. </li> + <li> A summary of the classes defined by the package. </li> + <li> A summary of the functions defined by the package. </li> + <li> A summary of the variables defined by the package. </li> + <li> A detailed description of each function defined by the + package. </li> + <li> A detailed description of each variable defined by the + package. </li> + </ul> + + <p>Each <strong>Module Documentation</strong> page contains:</p> + <ul> + <li> A description of the module. </li> + <li> A summary of the classes defined by the module. </li> + <li> A summary of the functions defined by the module. </li> + <li> A summary of the variables defined by the module. </li> + <li> A detailed description of each function defined by the + module. </li> + <li> A detailed description of each variable defined by the + module. </li> + </ul> + + <p>Each <strong>Class Documentation</strong> page contains: </p> + <ul> + <li> A class inheritance diagram. </li> + <li> A list of known subclasses. </li> + <li> A description of the class. </li> + <li> A summary of the methods defined by the class. </li> + <li> A summary of the instance variables defined by the class. </li> + <li> A summary of the class (static) variables defined by the + class. </li> + <li> A detailed description of each method defined by the + class. </li> + <li> A detailed description of each instance variable defined by the + class. </li> + <li> A detailed description of each class (static) variable defined + by the class. </li> + </ul> + +<h2> Project Documentation </h2> + + <p> The <strong>Trees</strong> page contains the module and class hierarchies: </p> + <ul> + <li> The <em>module hierarchy</em> lists every package and module, with + modules grouped into packages. At the top level, and within each + package, modules and sub-packages are listed alphabetically. </li> + <li> The <em>class hierarchy</em> lists every class, grouped by base + class. If a class has more than one base class, then it will be + listed under each base class. At the top level, and under each base + class, classes are listed alphabetically. </li> + </ul> + + <p> The <strong>Index</strong> page contains indices of terms and + identifiers: </p> + <ul> + <li> The <em>term index</em> lists every term indexed by any object's + documentation. For each term, the index provides links to each + place where the term is indexed. </li> + <li> The <em>identifier index</em> lists the (short) name of every package, + module, class, method, function, variable, and parameter. For each + identifier, the index provides a short description, and a link to + its documentation. </li> + </ul> + +<h2> The Table of Contents </h2> + +<p> The table of contents occupies the two frames on the left side of +the window. The upper-left frame displays the <em>project +contents</em>, and the lower-left frame displays the <em>module +contents</em>: </p> + +<table class="help summary" border="1" cellspacing="0" cellpadding="3"> + <tr style="height: 30%"> + <td align="center" style="font-size: small"> + Project<br />Contents<hr />...</td> + <td align="center" style="font-size: small" rowspan="2" width="70%"> + API<br />Documentation<br />Frame<br /><br /><br /> + </td> + </tr> + <tr> + <td align="center" style="font-size: small"> + Module<br />Contents<hr /> <br />...<br /> + </td> + </tr> +</table><br /> + +<p> The <strong>project contents frame</strong> contains a list of all packages +and modules that are defined by the project. Clicking on an entry +will display its contents in the module contents frame. Clicking on a +special entry, labeled "Everything," will display the contents of +the entire project. </p> + +<p> The <strong>module contents frame</strong> contains a list of every +submodule, class, type, exception, function, and variable defined by a +module or package. Clicking on an entry will display its +documentation in the API documentation frame. Clicking on the name of +the module, at the top of the frame, will display the documentation +for the module itself. </p> + +<p> The "<strong>frames</strong>" and "<strong>no frames</strong>" buttons below the top +navigation bar can be used to control whether the table of contents is +displayed or not. </p> + +<h2> The Navigation Bar </h2> + +<p> A navigation bar is located at the top and bottom of every page. +It indicates what type of page you are currently viewing, and allows +you to go to related pages. The following table describes the labels +on the navigation bar. Note that not some labels (such as +[Parent]) are not displayed on all pages. </p> + +<table class="summary" border="1" cellspacing="0" cellpadding="3" width="100%"> +<tr class="summary"> + <th>Label</th> + <th>Highlighted when...</th> + <th>Links to...</th> +</tr> + <tr><td valign="top"><strong>[Parent]</strong></td> + <td valign="top"><em>(never highlighted)</em></td> + <td valign="top"> the parent of the current package </td></tr> + <tr><td valign="top"><strong>[Package]</strong></td> + <td valign="top">viewing a package</td> + <td valign="top">the package containing the current object + </td></tr> + <tr><td valign="top"><strong>[Module]</strong></td> + <td valign="top">viewing a module</td> + <td valign="top">the module containing the current object + </td></tr> + <tr><td valign="top"><strong>[Class]</strong></td> + <td valign="top">viewing a class </td> + <td valign="top">the class containing the current object</td></tr> + <tr><td valign="top"><strong>[Trees]</strong></td> + <td valign="top">viewing the trees page</td> + <td valign="top"> the trees page </td></tr> + <tr><td valign="top"><strong>[Index]</strong></td> + <td valign="top">viewing the index page</td> + <td valign="top"> the index page </td></tr> + <tr><td valign="top"><strong>[Help]</strong></td> + <td valign="top">viewing the help page</td> + <td valign="top"> the help page </td></tr> +</table> + +<p> The "<strong>show private</strong>" and "<strong>hide private</strong>" buttons below +the top navigation bar can be used to control whether documentation +for private objects is displayed. Private objects are usually defined +as objects whose (short) names begin with a single underscore, but do +not end with an underscore. For example, "<code>_x</code>", +"<code>__pprint</code>", and "<code>epydoc.epytext._tokenize</code>" +are private objects; but "<code>re.sub</code>", +"<code>__init__</code>", and "<code>type_</code>" are not. However, +if a module defines the "<code>__all__</code>" variable, then its +contents are used to decide which objects are private. </p> + +<p> A timestamp below the bottom navigation bar indicates when each +page was last updated. </p> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Help </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/identifier-index.html b/projects/python-gzipstream/html/identifier-index.html new file mode 100644 index 0000000..9e2bea9 --- /dev/null +++ b/projects/python-gzipstream/html/identifier-index.html @@ -0,0 +1,352 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Identifier Index</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Indices </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="identifier-index.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<table border="0" width="100%"> +<tr valign="bottom"><td> +<h1 class="epydoc">Identifier Index</h1> +</td><td> +[ + <a href="#A">A</a> + B + <a href="#C">C</a> + D + E + <a href="#F">F</a> + <a href="#G">G</a> + H + <a href="#I">I</a> + J + K + L + M + N + O + P + Q + <a href="#R">R</a> + <a href="#S">S</a> + <a href="#T">T</a> + U + <a href="#V">V</a> + <a href="#W">W</a> + X + Y + Z + <a href="#_">_</a> +] +</td></table> +<table border="0" width="100%"> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="A">A</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="abc.ABCMeta-class.html">ABCMeta</a></td> +<td width="33%" class="link-index"> </td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="C">C</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#close">close()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#close">close()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="F">F</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#flush">flush()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="G">G</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream-module.html">gzipstream</a></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html">GzipStream</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStreamXL-class.html">GzipStreamXL</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="I">I</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#isatty">isatty()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="R">R</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#read">read()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#readline">readline()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#readlines">readlines()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="S">S</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#seek">seek()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#seek">seek()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="T">T</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#tell">tell()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="V">V</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#VERSION">VERSION</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#VERSION">VERSION</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="W">W</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#write">write()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#writelines">writelines()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"> </td> +</tr> +<tr><td class="link-index"> </td><td class="link-index"> </td><td class="link-index"> </td></tr> +</table> +</td></tr> +<tr valign="top"><td valign="top" width="1%"><h2 class="epydoc"><a name="_">_</a></h2></td> +<td valign="top"> +<table class="link-index" width="100%" border="1"> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__ABS_MAX_BUFIO_SIZE">__ABS_MAX_BUFIO_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream-module.html#__package__">__package__</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#_read32XL">_read32XL()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__checkInt">__checkInt()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#__repr__">__repr__()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#_read_eof">_read_eof()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__debugThread">__debugThread()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__repr__">__repr__()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_refactorBufIO">_refactorBufIO()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__del__">__del__()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="abc.ABCMeta-class.html#_abc_invalidation_counter">_abc_invalidation_counter</a><br /> +<span class="index-where">(in <a href="abc.ABCMeta-class.html">ABCMeta</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html">_StreamBuf</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream-module.html#__getSysVersion">__getSysVersion()</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream-module.html#_DEBUG_YN">_DEBUG_YN</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__ABS_MAX_BUFIO_SIZE">_StreamBuf__ABS_MAX_BUFIO_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#__init__">__init__()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_dumpValues">_dumpValues()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__checkInt">_StreamBuf__checkInt()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream.GzipStreamXL-class.html#__init__">__init__()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStreamXL-class.html">GzipStreamXL</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStreamXL-class.html#_init_read">_init_read()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStreamXL-class.html">GzipStreamXL</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__debugThread">_StreamBuf__debugThread()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__init__">__init__()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStreamXL-class.html#_init_write">_init_write()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStreamXL-class.html">GzipStreamXL</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__INT_CHECK_SIZE">_StreamBuf__INT_CHECK_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__INT_CHECK_SIZE">__INT_CHECK_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#_initModeLogic">_initModeLogic()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__MAX_BUFIO_SIZE">_StreamBuf__MAX_BUFIO_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__MAX_BUFIO_SIZE">__MAX_BUFIO_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream.GzipStream-class.html#_read">_read()</a><br /> +<span class="index-where">(in <a href="gzipstream.GzipStream-class.html">GzipStream</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_StreamBuf__MIN_READ_SIZE">_StreamBuf__MIN_READ_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +</tr> +<tr> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#__MIN_READ_SIZE">__MIN_READ_SIZE</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream._StreamBuf-class.html#_read">_read()</a><br /> +<span class="index-where">(in <a href="gzipstream._StreamBuf-class.html" onclick="show_private();">_StreamBuf</a>)</span></td> +<td width="33%" class="link-index"><a href="gzipstream-module.html#_SYS_VERSION">_SYS_VERSION</a><br /> +<span class="index-where">(in <a href="gzipstream-module.html">gzipstream</a>)</span></td> +</tr> +</table> +</td></tr> +</table> +<br /><br /><!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th> <a + href="module-tree.html">Trees</a> </th> + + <!-- Index link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Indices </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/index.html b/projects/python-gzipstream/html/index.html new file mode 100644 index 0000000..7043a77 --- /dev/null +++ b/projects/python-gzipstream/html/index.html @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" + "DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title> API Documentation </title> +</head> +<frameset cols="20%,80%"> + <frameset rows="30%,70%"> + <frame src="toc.html" name="moduleListFrame" + id="moduleListFrame" /> + <frame src="toc-everything.html" name="moduleFrame" + id="moduleFrame" /> + </frameset> + <frame src="gzipstream-module.html" name="mainFrame" id="mainFrame" /> +</frameset> +</html> diff --git a/projects/python-gzipstream/html/module-tree.html b/projects/python-gzipstream/html/module-tree.html new file mode 100644 index 0000000..2491466 --- /dev/null +++ b/projects/python-gzipstream/html/module-tree.html @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Module Hierarchy</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Trees </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table width="100%" cellpadding="0" cellspacing="0"> + <tr valign="top"> + <td width="100%"> </td> + <td> + <table cellpadding="0" cellspacing="0"> + <!-- hide/show private --> + <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span></td></tr> + <tr><td align="right"><span class="options" + >[<a href="frames.html" target="_top">frames</a + >] | <a href="module-tree.html" + target="_top">no frames</a>]</span></td></tr> + </table> + </td> + </tr> +</table> +<center><b> + [ <a href="module-tree.html">Module Hierarchy</a> + | <a href="class-tree.html">Class Hierarchy</a> ] +</b></center><br /> +<h1 class="epydoc">Module Hierarchy</h1> +<ul class="nomargin-top"> + <li> <strong class="uidlink"><a href="gzipstream-module.html">gzipstream</a></strong>: <em class="summary">GzipStream & GzipStreamXL Classes</em> </li> +</ul> +<!-- ==================== NAVIGATION BAR ==================== --> +<table class="navbar" border="0" width="100%" cellpadding="0" + bgcolor="#a0c0ff" cellspacing="0"> + <tr valign="middle"> + <!-- Home link --> + <th> <a + href="gzipstream-module.html">Home</a> </th> + + <!-- Tree link --> + <th bgcolor="#70b0f0" class="navbar-select" + > Trees </th> + + <!-- Index link --> + <th> <a + href="identifier-index.html">Indices</a> </th> + + <!-- Help link --> + <th> <a + href="help.html">Help</a> </th> + + <th class="navbar" width="100%"></th> + </tr> +</table> +<table border="0" cellpadding="0" cellspacing="0" width="100%%"> + <tr> + <td align="left" class="footer"> + Generated by Epydoc 3.0.1 on Mon Oct 31 00:54:47 2011 + </td> + <td align="right" class="footer"> + <a target="mainFrame" href="http://epydoc.sourceforge.net" + >http://epydoc.sourceforge.net</a> + </td> + </tr> +</table> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/redirect.html b/projects/python-gzipstream/html/redirect.html new file mode 100644 index 0000000..1d0ba67 --- /dev/null +++ b/projects/python-gzipstream/html/redirect.html @@ -0,0 +1,38 @@ +<html><head><title>Epydoc Redirect Page</title> +<meta http-equiv="cache-control" content="no-cache" /> +<meta http-equiv="expires" content="0" /> +<meta http-equiv="pragma" content="no-cache" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> +<body> +<script type="text/javascript"> +<!-- +var pages = ["gzipstream.GzipStreamXL-c", "gzipstream.GzipStream-c", "gzipstream._StreamBuf-c", "abc.ABCMeta-c", "gzipstream-m"]; +var dottedName = get_anchor(); +if (dottedName) { + var target = redirect_url(dottedName); + if (target) window.location.replace(target); +} +// --> +</script> + +<h3>Epydoc Auto-redirect page</h3> + +<p>When javascript is enabled, this page will redirect URLs of +the form <tt>redirect.html#<i>dotted.name</i></tt> to the +documentation for the object with the given fully-qualified +dotted name.</p> +<p><a id="message"> </a></p> + +<script type="text/javascript"> +<!-- +if (dottedName) { + var msg = document.getElementById("message"); + msg.innerHTML = "No documentation found for <tt>"+ + dottedName+"</tt>"; +} +// --> +</script> + +</body> +</html> diff --git a/projects/python-gzipstream/html/toc-everything.html b/projects/python-gzipstream/html/toc-everything.html new file mode 100644 index 0000000..332c901 --- /dev/null +++ b/projects/python-gzipstream/html/toc-everything.html @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Everything</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<h1 class="toc">Everything</h1> +<hr /> + <h2 class="toc">All Classes</h2> + <a target="mainFrame" href="abc.ABCMeta-class.html" + >abc.ABCMeta</a><br /> <a target="mainFrame" href="gzipstream.GzipStream-class.html" + >gzipstream.GzipStream</a><br /> <a target="mainFrame" href="gzipstream.GzipStreamXL-class.html" + >gzipstream.GzipStreamXL</a><br /> <div class="private"> + <a target="mainFrame" href="gzipstream._StreamBuf-class.html" + >gzipstream._StreamBuf</a><br /> </div> + <h2 class="toc">All Functions</h2> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#__getSysVersion" + >gzipstream.__getSysVersion</a><br /> </div> + <h2 class="toc">All Variables</h2> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#_DEBUG_YN" + >gzipstream._DEBUG_YN</a><br /> </div> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#_SYS_VERSION" + >gzipstream._SYS_VERSION</a><br /> </div> + <a target="mainFrame" href="gzipstream-module.html#__package__" + >gzipstream.__package__</a><br /><hr /> +<span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/toc-gzipstream-module.html b/projects/python-gzipstream/html/toc-gzipstream-module.html new file mode 100644 index 0000000..4374be6 --- /dev/null +++ b/projects/python-gzipstream/html/toc-gzipstream-module.html @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>gzipstream</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<h1 class="toc">Module gzipstream</h1> +<hr /> + <h2 class="toc">Classes</h2> + <a target="mainFrame" href="gzipstream.GzipStream-class.html" + >GzipStream</a><br /> <a target="mainFrame" href="gzipstream.GzipStreamXL-class.html" + >GzipStreamXL</a><br /> <div class="private"> + <a target="mainFrame" href="gzipstream._StreamBuf-class.html" + >_StreamBuf</a><br /> </div> + <h2 class="toc">Functions</h2> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#__getSysVersion" + >__getSysVersion</a><br /> </div> + <h2 class="toc">Variables</h2> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#_DEBUG_YN" + >_DEBUG_YN</a><br /> </div> + <div class="private"> + <a target="mainFrame" href="gzipstream-module.html#_SYS_VERSION" + >_SYS_VERSION</a><br /> </div> + <a target="mainFrame" href="gzipstream-module.html#__package__" + >__package__</a><br /><hr /> +<span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/html/toc.html b/projects/python-gzipstream/html/toc.html new file mode 100644 index 0000000..ddf25e1 --- /dev/null +++ b/projects/python-gzipstream/html/toc.html @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="ascii"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Table of Contents</title> + <link rel="stylesheet" href="epydoc.css" type="text/css" /> + <script type="text/javascript" src="epydoc.js"></script> +</head> + +<body bgcolor="white" text="black" link="blue" vlink="#204080" + alink="#204080"> +<h1 class="toc">Table of Contents</h1> +<hr /> + <a target="moduleFrame" href="toc-everything.html">Everything</a> + <br /> + <h2 class="toc">Modules</h2> + <a target="moduleFrame" href="toc-gzipstream-module.html" + onclick="setFrame('toc-gzipstream-module.html','gzipstream-module.html');" >gzipstream</a><br /><hr /> + <span class="options">[<a href="javascript:void(0);" class="privatelink" + onclick="toggle_private();">hide private</a>]</span> + +<script type="text/javascript"> + <!-- + // Private objects are initially displayed (because if + // javascript is turned off then we want them to be + // visible); but by default, we want to hide them. So hide + // them unless we have a cookie that says to show them. + checkCookie(); + // --> +</script> +</body> +</html> diff --git a/projects/python-gzipstream/python-gzipstream.spec b/projects/python-gzipstream/python-gzipstream.spec index 6167b4a..132e959 100644 --- a/projects/python-gzipstream/python-gzipstream.spec +++ b/projects/python-gzipstream/python-gzipstream.spec @@ -37,6 +37,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{python_sitelib}/* +%doc html %doc LICENSE
%changelog
spacewalk-commits@lists.fedorahosted.org