[racket] Sandbox evaluation problem - files with comment boxes
I'm trying to create a simple sandbox evaluator (to load in programs in
*SL). I have the following code:
#lang racket
(require racket/sandbox)
(define E
(parameterize ([sandbox-path-permissions
'([write "/var/folders"]
[exists "/"]
[read "/"])]
)
(make-module-evaluator (string->path "test-file.rkt"))))
This works fine as long as test-file.rkt does *not* contain a comment box.
If the file contains a comment box, then the following error occurs:
/Applications/Racket
v6.1.1/share/pkgs/snip-lib/racket/snip/private/load-one.rkt:21:2:
dynamic-require: unknown module
module name: #<resolved-module-path:"/Applications/Racket
v6.1.1/share/pkgs/gui-lib/framework/main.rkt">
I thought maybe parameterizing sandbox-namespace-specs with 'framework
might do something:
(require racket/sandbox racket/gui)
(define E
(parameterize ([sandbox-path-permissions
'([write "/var/folders"]
[exists "/"]
[read "/"])]
[sandbox-namespace-specs
(list make-gui-namespace 'framework)]
)
(make-module-evaluator (string->path "lab01-insulin.rkt"))))
But it results in:
namespace-attach-module: a different instance of the same module is
already in the destination namespace
module name: "/Applications/Racket
v6.1.1/collects/racket/stxparam-exptime.rkt"
Any suggestions?
Thanks!
--- nadeem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150125/4d1a8bf9/attachment.html>