diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-08-31 15:40:26 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@araneo.org> | 2015-08-31 15:40:26 +0200 |
commit | 9d4350983336a837c2fc65f377f3527d4714858e (patch) | |
tree | 663e6ef1b2bcb6a83f40d5a2d03ddc2717a3329d | |
parent | 7b98be750d401b2b6093d8de61e04c0e5f5fb764 (diff) |
Update examples in readme.txt
-rw-r--r-- | readme.txt | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -33,7 +33,16 @@ Run Debugging ========= +Some examples to run in a python interpreter: + >>> import server ->>> session = server.user_session.authenticate_and_create_session(user, pass) ->>> session.get_problem_data('prolog', 'family_relations', 'sister_2') ->>> ... +>>> session = server.user_session.authenticate_and_create_session(<user>, <pass>) +>>> session.get_problem_data('python', 'introduction', 'fahrenheit_to_celsius') + +>>> python = session.get_python() +>>> python.test(231, 180, '''print('-17.7')''') +>>> python.hint(231, 180, '''print('-17.7')''') + +>>> prolog = session.get_prolog() +>>> prolog.test(231, 96, 'sister(X,Y):- parent(P,X), parent(P,Y), female(X).') +>>> prolog.hint(231, 96, 'sister(X,Y):- parent(P,X), parent(P,Y), female(X).') |