Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
e67fdaa7
Commit
e67fdaa7
authored
Apr 08, 2004
by
Paul Winkler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
d4596b0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
lib/python/ZPublisher/Iterators.py
lib/python/ZPublisher/Iterators.py
+14
-0
No files found.
lib/python/ZPublisher/Iterators.py
View file @
e67fdaa7
from
Interface
import
Interface
class
IStreamIterator
(
Interface
):
"""
An iterator that can be published.
IStreamIterators must not read from the object database.
After the application finishes interpreting a request and
returns an iterator to be processed asynchronously, it closes
the ZODB connection. If the iterator then tries to load some
ZODB object, ZODB would do one of two things. If the connection
is still closed, ZODB would raise an error. If the connection
happens to be re-opened by another thread, ZODB might allow it,
but it has a chance of going insane if it happens to be loading
or storing something in the other thread at the same time. """
def
next
(
self
):
"""
Return a sequence of bytes out of the bytestream, or raise
StopIeration if we've reached the end of the bytestream.
"""
class
filestream_iterator
(
file
):
"""
a file subclass which implements an iterator that returns a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment