summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readme.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/readme.txt b/readme.txt
index 33eb3a5..c901a5a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -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).')