import struct


def fourcharcode(code):
    """ Convert four-char code for use in NSAppleEventDescriptor methods.
		
		code : bytes -- four-char code, e.g. b'utxt'
		Result : int -- OSType, e.g. 1970567284
	"""
    return struct.unpack(">I", code)[0]