[racket] Accessing Win32 API from Racket

From: Harry Spier (harryspier at hotmail.com)
Date: Thu Nov 10 21:28:08 EST 2011

Dear Robby,

>From the documentation this seems to be exactly what I need!

The more I get to know Racket the more impressive it is.  On the one hand everything is so high-level, well thought out, simple and straight forward . Unlike Python I don't even have to install an extension to do Windows shell scripting from Racket! But on the other hand it gives you all the freedom you want to do all the weird and wonderful things you can think of. As indicated in a previous post, if I want Python style quoting I can easily change the language to give me this.

Many thanks,

> Date: Thu, 10 Nov 2011 19:49:13 -0600
> Subject: Re: [racket] Accessing Win32 API from Racket
> From: robby at eecs.northwestern.edu
> To: harryspier at hotmail.com
> CC: users at racket-lang.org
> Does 'system' do what you want?
> Robby
> On Thu, Nov 10, 2011 at 7:45 PM, Harry Spier <harryspier at hotmail.com> wrote:
> > Dear list members,
> > Is there an extension or package for Racket that can call the Win32 API ?  I
> > don't need the whole API.   I only need to execute a Win32 shell command to
> > open a file with its default application indicated by the files extension.
> >
> >
> > I have a small python utility I want to convert to Racket but to do so I
> > need this capability.  The utility is written in Python with Pywin win32api
> > extensions (and a tcl/tk gui) . The utility selects a file  containing
> > Sanskrit text in one transliteration scheme and has options to convert it
> > into other transliteration schemes.  But it also has an option to convert
> > the text in the file into devanagari (a script of India) and to do so it
> > executes a shell command through the win32api extensions to open a file with
> > its default application identified by the file extension.  The file
> > extension is such that a third party windows application, a kind of
> > combination editor/converter  that does this conversion opens it.  My script
> > then waits until the file is closed (indicating the conversion is over) and
> > then continues.  The exact command in the Python extension Pywin Win32api
> > I'd like to emulate in a Racket program is:  win32api.shellexecute as
> > described in this page of the documentation for win32api:
> > http://timgolden.me.uk/pywin32-docs/win32api__ShellExecute_meth.html
> >
> >
> > One of the reasons I'm doing this conversion is also to get some practical
> > experience using the Racket gui toolkit.
> >
> >
> > Thanks,
> > Harry Spier
> >
> >
> >
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/users
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111110/68d70dfc/attachment.html>

Posted on the users mailing list.