diff options
-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).') |