如何在Mac上运行python文件?

时间:2018-10-28 18:14:49

标签: python

我有一个像这样的python文件:

base64 import
from ctypes import *
 
code = 'BgQAANtYAAJDAPkxAHwAQXIw7zcGNN4ANiox + w81HrUGOP8eUABSAEUA + 1oAWQBEDv9OAFQAIABN3wAuClMAvlQPV / eKUhq9Wg5X7k58Utc' \
       'WSVq9TF5J79pBZ + 5PAEsG12bTSm5GVQBM / ntSAEH7L1dj + 0MAS1vvMvovewo3Ut4wDi39HjEAN6Pbl0FNe3YgPt5Q3kv3IlSevVnX1z9FMm' \
       'uCShL2WgBaG9umKADvSAApJnx75k + itwZMAEx9X0rvbkSOTXtOOF / DRy0WOW53fPYLFoMzLr0xAi3DGnevLQOCfJ / vQZ5TcBZrN0oa9k4Af' \
       'A82Q4QaDzj3q8deN6sN7zIE / 1x8lbMnQdwBQi5ZT86jL2tqNAr2MwAw34xSH + uPSVPYFxZThBMzON8AMJM5wQA3MwRcMX7bNcET2jInwyed' \
       'E01HZ4dlM94qKy0DL38fNgAqeBszSxOvNIeKfHM7fCLxNQAwVkMtdzl7Xiw / YMyrFzxQACBWw + Hza7c3C93 / NWuHg1OWRquPQ5KP02K9IBZ' \
       'T4QZC9oNZU7aXFiOX83U4ADJFC7ADhrNVCyOW8w9qMbEnZhdHbHxjdjIT7E4DW0M3OQuGaxYmCSSSSSr /'
 
ucl = cdll.LoadLibrary ('libucl.so')
ucl.ucl_nrv2e_decompress_safe_8.argtypes = (c_char_p, c_int32, POINTER (c_char), POINTER (c_int32), c_void_p)
ucl.ucl_nrv2e_decompress_safe_8.restype = c_int32
 
data = base64.b64decode (code)
 
size = int.from_bytes (data [: 4], byteorder = 'little')
 
buffer = (c_char * size) ()
buffer_length = c_int32 (size)
 
ucl.ucl_nrv2e_decompress_safe_8 (date [4:], len (date), buffer, buffer_length, None)
 
result = bytes (buffer) .decode ('utf-16')
 
print (result)

当我尝试启动它时,出现错误: http://serwer1356363.home.pl/test.py

我从错误消息中找到了这个库: https://pypi.org/project/ucl/

但我不知道如何运行它:(

我可以寻求帮助吗? 我不了解Python,我需要运行此test.py

请帮助。

0 个答案:

没有答案