Back to index

moin  1.9.0~rc2
Public Member Functions
MoinMoin.support.werkzeug.contrib.iterio.IterIO Class Reference
Inheritance diagram for MoinMoin.support.werkzeug.contrib.iterio.IterIO:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __new__
def __iter__
def tell
def isatty
def seek
def truncate
def write
def writelines
def read
def readlines
def readline
def flush
def next

Detailed Description

Instances of this object implement an interface compatible with the
standard Python :class:`file` object.  Streams are either read-only or
write-only depending on how the object is created.

Definition at line 48 of file iterio.py.


Member Function Documentation

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO.

Definition at line 61 of file iterio.py.

00061 
00062     def __iter__(self):
00063         return self

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO, and MoinMoin.support.werkzeug.contrib.iterio.IterI.

Definition at line 54 of file iterio.py.

00054 
00055     def __new__(cls, obj):
00056         try:
00057             iterator = iter(obj)
00058         except TypeError:
00059             return IterI(obj)
00060         return IterO(iterator)

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterI.

Definition at line 109 of file iterio.py.

00109 
00110     def flush(self):
00111         if self.closed:
00112             raise ValueError('I/O operation on closed file')
00113         raise IOError(9, 'Bad file descriptor')

Here is the caller graph for this function:

Definition at line 69 of file iterio.py.

00069 
00070     def isatty(self):
00071         if self.closed:
00072             raise ValueError('I/O operation on closed file')
00073         return False

Definition at line 114 of file iterio.py.

00114 
00115     def next(self):
00116         if self.closed:
00117             raise StopIteration()
00118         line = self.readline()
00119         if not line:
00120             raise StopIteration()
00121         return line
00122 

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO.

Definition at line 94 of file iterio.py.

00094 
00095     def read(self, n=-1):
00096         if self.closed:
00097             raise ValueError('I/O operation on closed file')
00098         raise IOError(9, 'Bad file descriptor')

Here is the caller graph for this function:

def MoinMoin.support.werkzeug.contrib.iterio.IterIO.readline (   self,
  length = None 
)

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO.

Definition at line 104 of file iterio.py.

00104 
00105     def readline(self, length=None):
00106         if self.closed:
00107             raise ValueError('I/O operation on closed file')
00108         raise IOError(9, 'Bad file descriptor')

Here is the caller graph for this function:

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO.

Definition at line 99 of file iterio.py.

00099 
00100     def readlines(self, sizehint=0):
00101         if self.closed:
00102             raise ValueError('I/O operation on closed file')
00103         raise IOError(9, 'Bad file descriptor')

def MoinMoin.support.werkzeug.contrib.iterio.IterIO.seek (   self,
  pos,
  mode = 0 
)

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterO.

Definition at line 74 of file iterio.py.

00074 
00075     def seek(self, pos, mode=0):
00076         if self.closed:
00077             raise ValueError('I/O operation on closed file')
00078         raise IOError(9, 'Bad file descriptor')

Definition at line 64 of file iterio.py.

00064 
00065     def tell(self):
00066         if self.closed:
00067             raise ValueError('I/O operation on closed file')
00068         return self.pos

Definition at line 79 of file iterio.py.

00079 
00080     def truncate(self, size=None):
00081         if self.closed:
00082             raise ValueError('I/O operation on closed file')
00083         raise IOError(9, 'Bad file descriptor')

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterI.

Definition at line 84 of file iterio.py.

00084 
00085     def write(self, s):
00086         if self.closed:
00087             raise ValueError('I/O operation on closed file')
00088         raise IOError(9, 'Bad file descriptor')

Here is the caller graph for this function:

Reimplemented in MoinMoin.support.werkzeug.contrib.iterio.IterI.

Definition at line 89 of file iterio.py.

00089 
00090     def writelines(self, list):
00091         if self.closed:
00092             raise ValueError('I/O operation on closed file')
00093         raise IOError(9, 'Bad file descriptor')


The documentation for this class was generated from the following file: