def __init__(self, f, sub=slice(None)):
        """
           Argument:
            | ``f``  --  a filename or a file-like object

           Optional argument:
            | ``sub``  --  a slice indicating which frames to read/skip

        """
        if isinstance(f, basestring):
            self._auto_close = True
            self._f = open(f)
        else:
            self._auto_close = False
            self._f = f
        self._sub = sub
        self._counter = 0
def __init__ ( self , f , sub = slice ( None ) ) : if isinstance ( f , basestring ) : self . _auto_close = True self . _f = open ( f ) else : self . _auto_close = False self . _f = f self . _sub = sub self . _counter = 0
Argument:
            | ``f``  --  a filename or a file-like object

           Optional argument:
            | ``sub``  --  a slice indicating which frames to read/skip