Commit graph

12 commits

Author SHA1 Message Date
Benoît Timbert
2888a76b0c Apply patch #954 by Vladimir Slavik : svn:ignore tweaks 2008-02-17 20:54:17 +00:00
Elias Pschernig
cfd4cf22b6 made sample.py less verbose 2008-01-26 20:42:54 +00:00
Elias Pschernig
b7b5f58f84 fixed sample.py ai 2008-01-26 15:59:32 +00:00
Elias Pschernig
6b08abbada Simplified whitelisting of python modules,
...and added information how to disable safe python
2007-11-16 16:07:45 +00:00
Gunter Labes
d771dc87ae add the 'svn:eol-style native' property 2007-08-31 20:18:06 +00:00
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