Answer the question
In order to leave comments, you need to log in
How to get data returned by .so library in python?
Good day, I have the code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys,os,optparse,ctypes,platform,time
login = 'admin'
passw = '123456'
host = '10.10.15.61'
port = '37777'
def Auth():
dll = ctypes.CDLL('./libdhnetsdk.so')
init = dll.CLIENT_Init(host.encode('ascii'), 0)
dll.CLIENT_Login.restype = ctypes.c_longlong
loginH = dll.CLIENT_Login(host.encode('ascii'), port.encode('ascii'), login.encode('ascii'), passw.encode('ascii'), 0)
print(loginH)
Auth()
Answer the question
In order to leave comments, you need to log in
The function CLIENT_Login
returns 0 on error. Perhaps the error occurs because the second parameter must be a number and not a string.
See if there are localization files ru_RU.po and ru_RU.mo in the template, if there are, change them using the Poedit program. Just as a way, you download a program for searching text in files (@Text Replacer) and check all files for text, then change them in all files in which text was found. Perhaps you are changing in the wrong file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question