Considering migrating to Python from Visual Basic 6 for engineering applications

sohcahtoa82 at gmail.com sohcahtoa82 at gmail.com
Wed Feb 17 15:25:51 EST 2016


On Wednesday, February 17, 2016 at 11:49:44 AM UTC-8, wrong.a... at gmail.com wrote:
> I am mostly getting positive feedback for Python.

Good!

> 
> 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?


Python is not traditionally compiled.  It is interpreted.  That said, there are utilities out there than can compile a Python script to a Windows executable.  I personally have never used them, so I don't know about their limitations.

As for Android, I've heard of frameworks for making Android apps with Python, but I don't know of any off the top of my head.

> 
> 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.?

I'm fairly certain there are GUI editors for Python.  I don't use any because I don't write anything with a GUI.

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

Check out the numpy and scipy packages.

> 
> 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.

IMO, Python's greatest advantage is readability.  Python's syntax just plain makes sense to me.  It is just an easy language to work with.  It's funny, really.  I used to be a hardcore C/C++ fanatic.  When I first started learning Python, I hated it.  I thought it made things too easy and held your hand too much.  Now, I love it because it makes things so easy and holds your hand.  I spend less time worrying about memory allocation and pointer syntax and more time actually getting things done.

I think Python's biggest disadvantage is performance.  If you write 100% pure Python code, it can be a bit on the slower side.  However, if you're doing heavy number crunching using numpy/scipy, they're mostly written in C and are quite fast.

Basically, the way I see it, if speed of development is much more important than speed of execution, typically Python is a good choice.

> 
> Thanks for your responses.

I'm hoping someone else will be able to give a better response to Python on Android and the GUI editor.


More information about the Python-list mailing list