[Tutor] Python executables

Jeff Shannon jeff@ccvcorp.com
Thu, 07 Feb 2002 17:48:56 -0800


> "Willem de Beer" <awuli@xtra.co.nz> wrote:
>
> I would like to run extremely simple Python 2.0 programs from MS Access.
>
> Any suggestions?

This might not quite count as "extremely simple", but it's not terribly difficult either.

If you can't use a straight system call (as per DMan's suggestion), then you can try setting up your Python programs as COM servers, and calling them through the standard COM interface.  (I'm presuming that Access gives you fairly simple COM ability, of course; it'd be a serious
oversight on MS's part if it doesn't... but I know nothing of Access in particular.)

Creating a Python COM server is fairly easy, but more than I can conveniently describe in a single message like this.  If you do go this route, you will want to get the O'Reilly book, "Python Programming on Win32", by Mark Hammond and Andy Robinson.  It's very clearly written, with
lots of working examples and step-by-step walkthroughs of creating Win32-friendly Python programs.  (I'd recommend it to *anyone* doing Python on Windows, but especially if you're doing anything with COM.)

Jeff Shannon
Technician/Programmer
Credit International