Re: [MIT-Scheme-devel] tied in knots with environments
From:
David Gray
Subject:
Re: [MIT-Scheme-devel] tied in knots with environments
Date:
Tue, 1 Feb 2011 14:39:40 +0200
Thanks for all the help clearing this stuff up. One other mistake I made was that I assumed the ScmUtils was bound to the user-initial-environment but when I looked into the source code it's the user-generic-environment, hence the initial
knot tying. So I ended up with a small dance across the environments a la point 2 from Joe's email. Also if anyone has a need to plot stuff or call the odd python command I included it. plot.scm -------------
(define pin (windows-procedure (initpy) int (find-module "Python26.dll") "Py_Initialize")) ;init python (pin) (define prun (windows-procedure (runpy (code string)) int (find-module "Python26.dll") "PyRun_SimpleString"))
in *scheme*: (load "~/plot.scm" (->environment '(win32))) (define (plot x y) ((access plot (->environment '(win32))) x y))
(define x (iota 20)) (define y (map square plot)) (plot x y) ; as many times as you like
[Prev in Thread]
Current Thread
[Next in Thread]
Re: [MIT-Scheme-devel] tied in knots with environments,
David Gray<=