<s> __version__ = "<STR_LIT>" <EOL> from sys import version_info <EOL> def detect ( aBuf ) : <EOL> if ( ( version_info < ( <NUM_LIT:3> , <NUM_LIT:0> ) and isinstance ( aBuf , unicode ) ) or <EOL> ( version_info >= ( <NUM_LIT:3> , <NUM_LIT:0> ) and not isinstance ( aBuf , bytes ) ) ) : <EOL> raise ValueError ( '<STR_LIT>' ) <EOL> from . import universaldetector <EOL> u = universaldetector . UniversalDetector ( ) <EOL> u . reset ( ) <EOL> u . feed ( aBuf ) <EOL> u . close ( ) <EOL> return u . result <EOL> def _description_of ( path ) : <EOL> """<STR_LIT>""" <EOL> from charade . universaldetector import UniversalDetector <EOL> u = UniversalDetector ( ) <EOL> for line in open ( path , '<STR_LIT:rb>' ) : <EOL> u . feed ( line ) <EOL> u . close ( ) <EOL> result = u . result <EOL> if result [ '<STR_LIT>' ] : <EOL> return '<STR_LIT>' % ( path , <EOL> result [ '<STR_LIT>' ] , <EOL> result [ '<STR_LIT>' ] ) <EOL> else : <EOL> return '<STR_LIT>' % path <EOL> def charade_cli ( ) : <EOL> """<STR_LIT>""" <EOL> from sys import argv <EOL> for path in argv [ <NUM_LIT:1> : ] : <EOL> print ( _description_of ( path ) ) </s>
