View difference between Paste ID: k8jCbenF and UyFwXGCt
SHOW: | | - or go back to the newest paste.
1
(import  (sortsmillff pure)
2
         (sortsmillff python))
3
4-
(pure-eval
4+
(define pure-result
5-
5+
  (pure-eval
6-
 using system;
6+
7-
 fprintf stderr "This is a test\nof embedded Pure code.\n" ();
7+
   using system;
8-
 »#)
8+
   fprintf stderr "This is a test\nof embedded Pure code.\n" ();
9
   reverse [1, 2, 3, 4, 5];
10
   »#))
11
12
(format (current-error-port) "pure-result = ~a\n" pure-result)
13
14
(format (current-error-port) "1 + 2/3 = ~a\n"
15
        (pure-expr->number
16
         (pure-eval #« using math; 1 + 2%3 »#)))
17
18
(PyRun_SimpleString
19
 (string->pointer
20
21
import sys
22
print "This is a test\nof embedded Python code."
23
print globals ()
24
»#
25
))