def from64(number):
 if (not ((type(number) is types.LongType) or (type(number) is types.IntType))):
  raise TypeError('You must pass a long or an int')
 if (48 <= number <= 57):
  return (number - 48)
 if (65 <= number <= 90):
  return (number - 55)
 if (97 <= number <= 122):
  return (number - 61)
 if (number == 45):
  return 62
 if (number == 95):
  return 63
 raise ValueError(('Invalid Base64 value: %i' % number))

def from64 ( number ) : if ( not ( ( type ( number ) is types . LongType ) or ( type ( number ) is types . IntType ) ) ) : raise TypeError ( 'You must pass a long or an int' ) if ( 48 <= number <= 57 ) : return ( number - 48 ) if ( 65 <= number <= 90 ) : return ( number - 55 ) if ( 97 <= number <= 122 ) : return ( number - 61 ) if ( number == 45 ) : return 62 if ( number == 95 ) : return 63 raise ValueError ( ( 'Invalid Base64 value: %i' % number ) )
converts an ordinal character value in the range of 0-9 .