Search the Community
Showing results for tags 'Tests'.
Here is a Python 0AD launcher which intercepts stdout lines and reacts to certain command. The commands start with hash bang space '#! '. They can be placed everywhere (I think) within JS code. Example: print("#! terminate"); // terminates 0ADCurrently it works with Python 2.6.7 (Ubuntu 14.04 default) and gnome-terminal and probably a lot of other configurations. So far it understands 3 commands: print("#! write Full/File/Path") // opens a file to redirect outputprint("#! close") // closes this fileprint("#! terminate") // terminates 0ADprint("#! clear"); // clears terminal, not yet workingIt's already in use to export the triple store as JSON file. Next steps will be output to multiple files and overwrite files within a bot directory e.g. to relaunch with a different config and somehow marry it with the charts mod. Most pressing question now is: How can I call 'Engine.SetSimRate(20)' from JS or the launcher? I'm not exactly an expert in system programming with Python, but the links of the copy&pasted code are included. Feel free to propose more commands, I'll check everything. launcher.py.zip