VBA to Python

Matt Gerrans mgerrans at mindspring.com
Sat Jun 15 03:35:16 EDT 2002


> In moving from using Access front end forms and code connected to an
Access
> back end I am looking at changing to Java front end to SQL back end with a
> business rules engine using Python.

Using the Win32 extensions, in particular win32com.client.Dispatch() is
quite handy for dealing with COM automation objects; I use this quite often
to access the same objects commonly used in JScript and VBScript (and
probably also VBA).

> Is Python a good choice to manage and run the rules ...

Of course!   Knocks the socks off BASIC programming.   You have the temerity
to even ask such a question in *this* newsgroup?   :-)

> ...and is there a way of
> transcribing the VBA code across to Python other than literally doing it
> line by line?

As opposed to figuratively doing it line by line?    I guess you want to
convert existing code to Python, rather than just doing the new code in
Python?   There may be translators, but my guess is that this would open a
big can of worms (figuratively) and be the source (so to speak) of lots of
headaches.    I like the idea of doing new work in Python, while slowly
converting modules that you come across (while bug fixing, adding new
features, etc.) to Python.   If you have a lot of working code (even if it
is encoded in a distasteful syntax like VB), there is no sense in junking it
carte blanche -- if (when) there are any problems there will be naysayers
blaming it on Python, which would be a shame.

- mfg





More information about the Python-list mailing list