 from . _pcl import * <EOL> import sys <EOL> def load ( path , format = None ) : <EOL> """<STR_LIT>""" <EOL> format = _infer_format ( path , format ) <EOL> p = PointCloud ( ) <EOL> try : <EOL> loader = getattr ( p , "<STR_LIT>" % format ) <EOL> except AttributeError : <EOL> raise ValueError ( "<STR_LIT>" % format ) <EOL> if loader ( _encode ( path ) ) : <EOL> raise IOError ( "<STR_LIT>" <EOL> % ( path , format ) ) <EOL> return p <EOL> def save ( cloud , path , format = None , binary = False ) : <EOL> """<STR_LIT>""" <EOL> format = _infer_format ( path , format ) <EOL> try : <EOL> dumper = getattr ( cloud , "<STR_LIT>" % format ) <EOL> except AttributeError : <EOL> raise ValueError ( "<STR_LIT>" % format ) <EOL> if dumper ( _encode ( path ) , binary ) : <EOL> raise IOError ( "<STR_LIT>" <EOL> % ( path , format ) ) <EOL> def _encode ( path ) : <EOL> if isinstance ( path , bytes ) : <EOL> return path <EOL> else : <EOL> return path . encode ( sys . getfilesystemencoding ( ) ) <EOL> def _infer_format ( path , format ) : <EOL> if format is not None : <EOL> return format . lower ( ) <EOL> for candidate in [ "<STR_LIT>" , "<STR_LIT>" ] : <EOL> if path . endswith ( "<STR_LIT:.>" + candidate ) : <EOL> return candidate 
 raise ValueError ( "<STR_LIT>" % path ) </s>

 from . _pcl import * <EOL> import sys <EOL> def load ( path , format = None ) : <EOL> """<STR_LIT>""" <EOL> format = _infer_format ( path , format ) <EOL> p = PointCloud ( ) <EOL> try : <EOL> loader = getattr ( p , "<STR_LIT>" % format ) <EOL> except AttributeError : <EOL> raise ValueError ( "<STR_LIT>" % format ) <EOL> if loader ( _encode ( path ) ) : <EOL> raise IOError ( "<STR_LIT>" <EOL> % ( path , format ) ) <EOL> return p <EOL> def save ( cloud , path , format = None , binary = False ) : <EOL> """<STR_LIT>""" <EOL> format = _infer_format ( path , format ) <EOL> try : <EOL> dumper = getattr ( cloud , "<STR_LIT>" % format ) <EOL> except AttributeError : <EOL> raise ValueError ( "<STR_LIT>" % format ) <EOL> if dumper ( _encode ( path ) , binary ) : <EOL> raise IOError ( "<STR_LIT>" <EOL> % ( path , format ) ) <EOL> def _encode ( path ) : <EOL> if isinstance ( path , bytes ) : <EOL> return path <EOL> else : <EOL> return path . encode ( sys . getfilesystemencoding ( ) ) <EOL> def _infer_format ( path , format ) : <EOL> if format is not None : <EOL> return format . lower ( ) <EOL> for candidate in [ "<STR_LIT>" , "<STR_LIT>" ] : <EOL> if path . endswith ( "<STR_LIT:.>" + candidate ) : <EOL> return candidate <EOL> raise ValueError ( "<STR_LIT>" % path ) </s>
