Taede wrote:If you just need some example code, look in libottdadmin2's bin directory. It contains a few example scripts which make use of the lib, and is what I used when writing Soap.
Well the thing is, im trying to do anything with the examples in /bin/. So I am trying to do any rcon command for example.
The Server is a Windows Server 2008 R2 with Python 2.7 installed (had 3.3 before but went back for troubleshooting)
This is the command i was trying, just for testing if the lib is working:
python openttd-admin-rcon.py -H 127.0.0.1 -P 3009 -p port! -v clients
And this is what happens:
C:\Python27\Scripts>openttd-admin-rcon.py -H 127.0.0.1 -P 3009 -p port! -v clients
Connecting to 127.0.0.1:3009
Traceback (most recent call last):
File "C:\Python27\Scripts\openttd-admin-rcon.py", line 43, in <module>
connection = AdminClient()
File "C:\Python27\lib\site-packages\libottdadmin2\client.py", line 123, in __i
nit__
self.__init_poll__()
File "C:\Python27\lib\site-packages\libottdadmin2\client.py", line 76, in __in
it_poll__
self._pollobj = poll()
NameError: global name 'poll' is not defined
Any idea whats wrong there?
Does the lib maybe only work on unix systems? Or whats wrong there?