7 Commits

Author SHA1 Message Date
Elias Pschernig
10232db2f7 Added the killer python AI by Michael Schmahl, under the name 'bruteforce.py' 2007-07-01 16:08:10 +00:00
Elias Pschernig
32f4192601 Python: Fixed a bug with import,
and whitelisted wesnoth, random and heapq modules - so now all old
legal scripts should be working without change.
2007-03-29 09:06:56 +00:00
Elias Pschernig
37ec6e8aaf More work on the safe python AIs:
- Using safe.py from the given SVN repository, which is much cleaner,
  no more notes or tests.

- Added a preprocessor, as a way to allow a limited import again.

- Made runtime docs work again, with a --python-api switch instead of
  the previous AI hack.
2007-03-21 15:24:48 +00:00
Elias Pschernig
a0bf9a7209 First step for restricted (and therefore safe) Python in trunk.
For script authors this means:

- no more exceptions (try..except)

- no more unsafe builtins (eval, file, type, ...)

- no more import (some whitelisted modules are auto-imported currently)

- no more access to internals (e.g. __dict__, __name__, ...)

The campaign server for now still doesn't allow .py scripts, but
likely this restriction can be removed.
2007-03-18 16:26:22 +00:00
Elias Pschernig
93d07d2182 Added script to generate python API docs. 2006-09-03 11:05:47 +00:00
Elias Pschernig
0afb158715 Made sample.py show the use of some more python-ai functions. 2006-07-27 12:08:54 +00:00
Elias Pschernig
fc7ac64cbc Added a sample python AI script.
It's not quite finished, so not sure it should go into 1.2.
2006-07-24 18:06:56 +00:00