Advertisement
chemoelectric

Untitled

Jan 24th, 2013
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. A snippet from my user-init.scm:
  2.  
  3. (pyindexed-set! (py-dict (current-pymodule))
  4. (string->pystring "magick")
  5. (procedure->pycallable
  6. (lambda (a b) (integer->pyint (+ (pyint->integer a) (pyint->integer b))))))
  7. (write (pyeval "magick (10, 20)"))
  8. (newline)
  9. (pyexec "print (magick (40, 50))")
  10.  
  11. The output:
  12.  
  13. #<pyobject repr:30 0x3b96210>
  14. 90
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement