用于RCON通信的python3包装器。
py3rcon的Python项目详细描述
PY3RCON
Python3的RCON API
为3级地震建造和测试,但将与大多数RCON系统一起工作。
安装:
$ pip install py3rcon
示例:
发送rcon命令而不等待响应:
frompy3rconimportRCONrcon=RCON("127.0.0.1","secret_password")rcon.send_command("say Hello, world!",response=False)
发送rcon命令并得到它们的响应:
frompy3rconimportRCONrcon=RCON("127.0.0.1","secret_password",port=27960)#port is optionalstatus=rcon.send_command("status")print(status)