Advertisement
Glocke

Python Console Session

Jan 8th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. Python 2.7.3 (default, Aug  1 2012, 05:16:07)
  2. [GCC 4.6.3] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> from Engine import Engine, User
  5. >>> e = Engine("glocke", 12)
  6. >>> e.run()
  7. New value is of 'glocke' is 1
  8. New value is of 'glocke' is 2
  9. New value is of 'glocke' is 3
  10. New value is of 'glocke' is 4
  11. New value is of 'glocke' is 5
  12. New value is of 'glocke' is 6
  13. New value is of 'glocke' is 7
  14. New value is of 'glocke' is 8
  15. New value is of 'glocke' is 9
  16. New value is of 'glocke' is 10
  17. New value is of 'glocke' is 11
  18. New value is of 'glocke' is 12
  19. >>> u = User("foobar")
  20. >>> print u.foo
  21. <Swig Object of type 'std::map< int,std::string,std::less< int >,std::allocator< std::pair< int const,std::string > > > *' at 0xb7209908>
  22. >>> u.foo[2] = "Zwei"
  23. Traceback (most recent call last):
  24.   File "<stdin>", line 1, in <module>
  25. TypeError: 'SwigPyObject' object does not support item assignment
  26. >>> u.foo.append(2, "Zwei")
  27. Traceback (most recent call last):
  28.   File "<stdin>", line 1, in <module>
  29. TypeError: append() takes exactly one argument (2 given)
  30. >>> u.foo.append((2, "Zwei"))
  31. Traceback (most recent call last):
  32.   File "<stdin>", line 1, in <module>
  33. SystemError: error return without exception set
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement