import uuid identity = str(uuid.uuid4()).encode('ascii') 转载于:https://www.cnblogs.com/callyblog/p/10388573.html