![]() |
How do I run a python file on Mac? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: How do I run a python file on Mac? (/thread-13717.html) |
How do I run a python file on Mac? - trifek - Oct-28-2018 I warmly welcome. I have a python file like this: 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) When I try to start it, I get an error: http://serwer1356363.home.pl/test.py I found this library from the error message: https://pypi.org/project/ucl/ but I do not know how to run it :( Can I ask for help? I do not know Python, and I need to run this test.py Please help. |