[racket] Accessing Win32 API from Racket

From: Harry Spier (harryspier at hotmail.com)
Date: Thu Nov 10 20:45:49 EST 2011

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: 

One of the reasons I'm doing this conversion is also to get some practical experience using the Racket gui toolkit.

Harry Spier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111110/ee742760/attachment.html>

Posted on the users mailing list.