Can Python replace Visual Basic? Should it?...and generalities :)
Clark C. Evans
cce at clarkevans.com
Tue Mar 6 14:07:02 EST 2001
On Tue, 6 Mar 2001, Brad Bollenbach wrote:
> I was really hoping someone would come along and say something like:
>
> "Yes, our company used to use VB for our main product, a universal
> scheduler program with a clickable ledger. We saw the benefits of Python and
> rewrote the whole thing in it, and our company have saved more time and
> money than ever before, and our customers are thanking us for it."
>
> Unfortunately, maybe that time won't come.
Over the last 3-4 months I've written a pretty sophisticated
"front-end" program using Visual Basic; it is essentially an
editor for a specific type of XML file. (I've used Visual Basic
since Version 1.0 and have written VBX's, but not ATL OCX's yet.)
A few years ago '97, I switched over to Java, and got sick to
my stomach (Java is far worse than Visual Basic) after a year
of giving it a fair shake. So, I switched back...
I did spend some time (about a week) investigating Python. Here
are my impressions:
1. I very much like Python language, and I will learn much more.
In particular, if you interface is "dynamic", where user interface
widgets are being created/destroyed/moved all of the time then
Python could be a big winner!
2. It was not "obvious" how to put together a Windows installation
program that is python friendly. We need to have a seperate
user-level python/wxwindows module and then a way for the
install program to check to see if that module is installed,
downloading/fetching-from-cd if the module isn't.
3. It looks significantly slower, and the particular application
that I have does a ton of re-calculating and re-drawing and
has to work on out-dated Win95 boxes on office desks.
I wrote a small sample, and as I feared, it showed significant
"lag" on a Pentium 60. The visual basic program is 'snappy.
4. The re-draw speeds got somewhat faster when I re-wrote my
small sample program with wxWindows. wxWindows looks cool.
5. I did not see a sutiable replacement for the visual basic
data control. Writing all of the widget to data binding
code is *very* tedious... Python just isn't there yet in
this respect.
6. On the plus side, Python has some wonderful XML tools
(4suite.org), and it's string processing kicks the shit
out of visual basic (I still use VSAWK for string processing).
If Pythoners seriously want to have people in VB land convert
over to Python, then a few "immediate" things need to be done:
A Python "OCX" control needs to be written. This control
would simply encapsulate Python for us Visual Basic idiots.
This way we could 'pop in the control in our VB project and
start using Python for parts of the program.
At first, this control could be non-visual. The OCX would
have to expose through IDispatch the objects managed within
the embedded python system. Then, it would be cool if it
became a wxWindows frame, so that small client areas could
be re-written in Python, etc. For extra bonus points,
the visual control would allow OCX components to be dropped.
Eventually the VB programmer could 'drop the VB shell after
their entire program is re-written. In the corporate world,
it will be damn near impossible to get funding for re-writing
a program in Python. However, it is very possible to have
this conversion be INCREMENTAL, one sub-routine at a time!
In short, a complete re-write is just too high of risk for
most corporate progammers to do...
By the way, the component does have a server-side part. I've
decided to write this in Python since cross-platform compatibility
would be a big bonus. I'll give a report on my findings here
in about two to three months.
Kind Regards,
Clark Evans
More information about the Python-list
mailing list