I'm trying to read a student program (which might include images or
not) as text, just so I can look at it.

I tried this:

#lang racket
(require wxme)

(define/contract (read-assignment-file path)
  (-> (or/c string? path-string?) bytes?)
  (let* ([the-path (if (path-string? path)
                       path
                       (string->path path))]
         [file-port (open-input-file the-path)]
         [port (if (is-wxme-stream? file-port)
                   (wxme-port->text-port file-port #t)
                   file-port)]
         [contents (port->string port)])
    contents))

And got this error:

read-bytes: cannot load snip-class reader: #"(lib \"image-core.ss\" \"mrlib\")"

Am I close to doing the right thing? Do I need to require something else?

Todd
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to