How to use the plyfile._PlyHeaderParser function in plyfile

To help you get started, we’ve selected a few plyfile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dranjan / python-plyfile / plyfile.py View on Github external
def _parse_header(stream):
        '''
        Parse a PLY header from a readable file-like stream.

        '''
        parser = _PlyHeaderParser()
        while parser.consume(stream.readline()):
            pass

        return PlyData(
            [PlyElement(*e) for e in parser.elements],
            parser.format == 'ascii',
            _byte_order_map[parser.format],
            parser.comments,
            parser.obj_info
        )