def track_from_file(file_object, filetype, timeout=DEFAULT_ASYNC_TIMEOUT, force_upload=False):
 if (not force_upload):
  try:
   md5 = hashlib.md5(file_object.read()).hexdigest()
   return track_from_md5(md5)
  except util.EchoNestAPIError:
   pass
 file_object.seek(0)
 return _track_from_data(file_object.read(), filetype, timeout)

def track_from_file ( file_object , filetype , timeout = DEFAULT_ASYNC_TIMEOUT , force_upload = False ) : if ( not force_upload ) : try : md5 = hashlib . md5 ( file_object . read ( ) ) . hexdigest ( ) return track_from_md5 ( md5 ) except util . EchoNestAPIError : pass file_object . seek ( 0 ) return _track_from_data ( file_object . read ( ) , filetype , timeout )
create a track object from a file-like object .