As you may or may not know, Microsoft is discontinuing Visual Basic in favor
of VB.NET and that means I need to find a new easy programming language. I
heard that Python is an interpreted language similar to VB. This means that
it doesn''t have all the hard stuff like pointers, classes and templates like
C, C++ and assembly language.
Where I work we use Microsoft Office with a lot of customization using
Visual Basic. I would like to switch to Python to do it since VB is being
discontinued. Would Python meet our requirements? I need to make lots of
GUI applications (message boxes, forms, etc.) and do the underlying business
logic too.
Thanks in advance.
解决方案First of all, discontinuing VB doesn''t mean you have to stop using it.
I worked on a project which was compiled with Visual C 1.52, for many
years after it was not supported. The project is used by nearly every
engineer at the company where I work.
We are still devleoping the project I work on now in VB6, and have no
reason to bail.
For new projects, it would make sense to look into VB.net or some
alternative.
Python has classes, but not templates. However, you don''t have to use
classes in your program, but it will make life easier if you learned
them.
Python''s classes are not as complicated as C++, it''s a much better
language to learn from.
VB has classes too, and if you haven''t used them in your programs, then
there''s a good chance you can program that way with Python too, but I
wouldn''t make a point of it.
VB has a much better IDE than the IDE''s for Python, although Eric3 is
one of the best, and is absolutely free.
VB''s ide is it''s strongpoint, not the language itsself.
If you need to do Gui''s then it is extremely usefull to learn the
basics of classes, your code will be much simpler in the long run.
There are many gui toolkits/frameworks for Python, but the foreunners
are pyQT, wxPython, pyGTK, and TK/Tkinter.
You don''t have to worry about pointers though :-)
"Would Python meet our requirements? "
Yes and no. Because Python is a very high-level language and
dynamically typed it is easy to learn. Python doesn''t make use of
pointers but you are able to write object-oriented code (as opposed to
just being object-friendly like Visual Basic is). You will find that on
its own you won''t be able to do any Office macro scripting although
there are several packages that will give you added functionality like
access to Com+ objects (see win32 modules by Mark Hammond). Now, this
may require more work than using VBA but it *is* doable. The com
portion of the win32 modules can enable one to create even a
macro-language unto itself!
Python is very powerful. There are many 3rd party modules and
frameworks (Zope, CherryPy). Also, there are many GUI toolkits
available for it (wxWindows, GTK, QT, Tk and on and on) and you can
also use it as a wrapper to write and compile to Java bytecode (see
Jython). The problem for you, however, is it may or may *not* meet
every requirement. For that you''ll have to find out for yourself. I
suggest downloading Python and giving the Python tutorial a whirl and
then taking a look at other Python-related stuff:
[For programmers:] http://docs.python.org/tut/tut.html
[For non-programmers:] http://honors.montana.edu/~jjc/easytut/easytut/
[Win32 stuff:] http://starship.python.net/crew/mhammond/
[Tk ''Tkinter'':]
http://www.pythonware.com/library/tkinter/introduction/
[wxPython:] http://www.wxpython.org/
[PyGTK:] http://www.pygtk.org/
Purusing these links will give you a very good idea of whether Python
is right for you. Naturally we''d all like to say ''YES Python is good
for you!'' but you have to investigate for yourself.
Good luck!
Harlin Seritt
On Wed, 16 Mar 2005 21:33:36 -0800, "Mike Cox"
declaimed the following in comp.lang.python:
As you may or may not know, Microsoft is discontinuing Visual Basic in favor
of VB.NET and that means I need to find a new easy programming language. I
So far as I know, VB.NET is the next version of Visual Basic,
making use of the "common language runtime" -- which, as I understand,
is M