Considering migrating to Python from Visual Basic 6 for engineering applications

Chris Angelico rosuav at gmail.com
Thu Feb 18 11:06:12 EST 2016


On Fri, Feb 19, 2016 at 2:49 AM,  <wrong.address.1 at gmail.com> wrote:
> Thanks. You have guided me quite well, and I am almost ready to declare that I will use Python for the next few decades.
>

Don't declare like that - just start using it, and see what you think
:) But I would be very much surprised if Python doesn't get added to
your toolbelt. A good programmer should always keep a selection of
tools handy - seldom is one tool the right one for every job.

> Imagine I want to read in two (or a few) numbers from a text file, display them in two (or more) text boxes, calculate their sums and products, may be take logarithms of them, and display them in other two text boxes or labels, and make some bar charts, scatter plots, and later draw curves and surfaces on a computer screen. Do I really need PyPi or other external stuff for this? Is Python well equipped for this?
>

You could do all of that with just the standard library, but then your
only choice of GUI library is Tkinter, which is derived from Tcl/Tk.
If you don't like how that looks (either in your code, or in the
resulting GUI), you'll need to turn to PyPI for an alternative (eg
something derived from GTK or wxWindows or Qt). I'm not sure how the
graphing capabilities of Tkinter are, so you might want to grab
matplotlib too - again, it'll give you a lot more flexibility than you
would have if you restrict yourself to *just* the standard library.
But I think you could do all of that - certainly most of it - with
just the language and standard library.

> I will have to learn GUI creating quickly after I know the basics of reading and writing text files, and doing simple mathematical calculations.
>

Reading and writing text files is easy, as is basic mathematics.
You'll have that down in an hour or two, most likely, and then you'll
have time to play GUIs.

> Later I can imagine using things like sending an SMS from a phone running this on Android, or placing a graph in a WhatsApp message, make a call to someone and tell him the temperature is now too high, etc. These things might need external libraries, but I can learn this later on.
>

Those things will most likely require external libraries. But most of
them are probably possible.

ChrisA



More information about the Python-list mailing list