Considering migrating to Python from Visual Basic 6 for engineering applications

Rob Gaddi rgaddi at highlandtechnology.invalid
Wed Feb 17 15:54:21 EST 2016


wrong.address.1 at gmail.com wrote:

> I am mostly getting positive feedback for Python.

Welcome to the party.  Learn to write Python 3.  There is no reason
whatsoever for someone picking up Python to learn the deprecated
problems of Python 2.

> It seems Python is used more for web based applications. Is it equally fine for creating stand-alone *.exe's? Can the same code be compiled to run on Linux or Android or web-based?

Standalone EXEs are hit and miss.  I've had best luck deploying just as
Python scripts to machines with an expectation that the environment is
already configured (i.e. Python already installed).

You don't compile, you interpret.  So long as you've got the
interpreter on the target platform you're set.  The EXE tools out there
do so by bundling your plain-text source up with the interpreter
environment.

Packaging/distribution remains one of the real pain points in Python.

> Is it possible to create GUI elements with a good IDE? Can they be defined like in Visual Basic with given sizes, fonts, visible/invisible, etc.?
>

Yep, and you've got your choice of GUI toolkits (which has ups and
downs).  Coming from VB you're probably used to graphical designers, in
which case I'd point you to Qt Designer and PySide or PyQt.

> Is it easy to do matrix operations in Python? Or do I need to write subroutines like in Visual Basic?

Here's where Python's a godsend.  NumPy will give you vectors, matrices,
linear algebra, all manner of good stuff, all compiled to be blindingly
fast.

Depending on what you mean by engineering applications there's a
ton of good stuff in SciPy too; as an EE I make pretty extensive use
of SciPy's signal processing and optimization packages. Matplotlib is
the 3rd piece of the puzzle and behold! you have graphs, as simple or
complex as you'd like.

> Could someone kindly tell me advantages and disadvantages of Python? Or any better options? I have like 40-50 VB Forms and may be around 20000 lines of code. It will be a task to learn a new language and translate/re-write that code.
>

It will be, and I'm not sure I'd recommend doing it.  The last time I
wrote any VB was Windows 3.1, and the .NET framework wasn't even a gleam
in Paul Allen's ey.  So I can't speak too authoratively on what you're
leaving. But over the years I've probably tried to get work done in
two dozen languages. None of them turn out correct code more quickly
than Python; few even come close.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.


More information about the Python-list mailing list