Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103064 > unrolled thread

Considering migrating to Python from Visual Basic 6 for engineering applications

Started bywrong.address.1@gmail.com
First post2016-02-17 11:49 -0800
Last post2016-02-20 10:47 -0800
Articles 20 on this page of 94 — 31 participants

Back to article view | Back to comp.lang.python


Contents

  Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-17 11:49 -0800
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications sohcahtoa82@gmail.com - 2016-02-17 12:25 -0800
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-02-17 20:54 +0000
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Ray Cote <rgacote@appropriatesolutions.com> - 2016-02-17 16:13 -0500
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications paul.hermeneutic@gmail.com - 2016-02-17 14:18 -0700
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications William Ray Wing <wrw@mac.com> - 2016-02-17 16:27 -0500
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 00:17 -0800
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-02-18 10:09 +0000
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-18 21:16 +1100
          Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 03:11 -0800
            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-18 22:32 +1100
              Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 07:49 -0800
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-19 03:06 +1100
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 09:49 -0800
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dietmar Schwertberger <maillist@schwertberger.de> - 2016-02-18 21:37 +0100
                RE: Considering migrating to Python from Visual Basic 6 for engineering applications Dan Strohl <D.Strohl@F5.com> - 2016-02-18 16:24 +0000
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 09:58 -0800
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Tim Chase <python.list@tim.thechases.com> - 2016-02-18 13:18 -0600
              Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-19 11:30 +1100
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-19 11:57 +1100
                Ohnoes significant whitespace (was: Considering migrating to Python from Visual Basic 6 for engineering applications) Ben Finney <ben+python@benfinney.id.au> - 2016-02-19 12:03 +1100
                  Re: Ohnoes significant whitespace Marko Rauhamaa <marko@pacujo.net> - 2016-02-19 08:36 +0200
                  Re: Ohnoes significant whitespace (was: Considering migrating to Python from Visual Basic 6 for engineering applications) Grant Edwards <invalid@invalid.invalid> - 2016-02-19 14:57 +0000
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-19 02:14 +0000
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-19 21:18 +1100
            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-02-18 15:20 +0000
              Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 07:33 -0800
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2016-02-18 15:47 +0000
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications William Ray Wing <wrw@mac.com> - 2016-02-18 10:59 -0500
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 09:38 -0800
                RE: Considering migrating to Python from Visual Basic 6 for engineering applications Dan Strohl <D.Strohl@F5.com> - 2016-02-18 16:00 +0000
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 09:44 -0800
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Tim Chase <python.list@tim.thechases.com> - 2016-02-18 13:28 -0600
                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-19 02:47 -0800
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-19 11:23 +0000
                      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-19 03:53 -0800
                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-19 08:13 -0500
                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-20 18:54 +1100
                          Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-20 10:45 -0800
                            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Christian Gollwitzer <auriocus@gmx.de> - 2016-02-20 20:21 +0100
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Tony van der Hoff <tony@vanderhoff.org> - 2016-02-19 11:34 +0000
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Tim Chase <python.list@tim.thechases.com> - 2016-02-19 07:40 -0600
                      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-19 10:14 -0800
                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-19 23:06 +0000
                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Larry Hudson <orgnut@yahoo.com> - 2016-02-19 23:49 -0800
                          Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-20 10:38 -0800
                            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Larry Hudson <orgnut@yahoo.com> - 2016-02-20 23:28 -0800
                              Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-21 13:16 +0000
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-22 00:54 +1100
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-02-21 17:08 +0200
                                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-21 16:16 +0000
                                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-02-21 23:52 +0200
                                      Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-21 23:05 +0000
                                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-02-22 10:50 +0200
                                          Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-22 12:24 +0000
                                      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-21 21:19 -0500
                                      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-22 21:46 +1100
                                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-02-22 13:39 +0200
                                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Random832 <random832@fastmail.com> - 2016-02-22 09:49 -0500
                                        Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-22 16:21 +0000
                                          Re: Considering migrating to Python from Visual Basic 6 for   engineering applications Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-02-23 10:45 +1300
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Christian Gollwitzer <auriocus@gmx.de> - 2016-02-21 16:21 +0100
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Tim Chase <python.list@tim.thechases.com> - 2016-02-21 12:19 -0600
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-21 21:40 -0500
                                Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-22 22:16 +1100
                                  Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-22 12:51 +0000
                                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-23 00:09 +1100
                            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-21 13:39 -0500
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Peter Otten <__peter__@web.de> - 2016-02-19 15:58 +0100
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Matt Wheeler <m@funkyhat.org> - 2016-02-19 17:05 +0000
                    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Roel Schroeven <roel@roelschroeven.net> - 2016-02-20 23:28 +0100
            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-19 01:07 +0000
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications wxjmfauth@gmail.com - 2016-02-18 01:49 -0800
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications William Ray Wing <wrw@mac.com> - 2016-02-18 09:07 -0500
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-18 07:35 -0800
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-19 12:06 +1100
          Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-19 03:11 -0800
            Re: Considering migrating to Python from Visual Basic 6 for engineering applications Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-02-19 08:27 -0500
              Re: Considering migrating to Python from Visual Basic 6 for engineering applications Steven D'Aprano <steve@pearwood.info> - 2016-02-20 12:13 +1100
                Re: Considering migrating to Python from Visual Basic 6 for engineering applications William Ray Wing <wrw@mac.com> - 2016-02-19 22:28 -0500
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-19 15:34 +0000
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-20 02:43 +1100
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Grant Edwards <invalid@invalid.invalid> - 2016-02-19 16:04 +0000
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Grant Edwards <invalid@invalid.invalid> - 2016-02-19 15:59 +0000
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications BartC <bc@freeuk.com> - 2016-02-19 16:32 +0000
          Re: Considering migrating to Python from Visual Basic 6 for engineering applications Chris Angelico <rosuav@gmail.com> - 2016-02-20 03:49 +1100
          Re: Considering migrating to Python from Visual Basic 6 for engineering applications Grant Edwards <invalid@invalid.invalid> - 2016-02-19 18:03 +0000
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications Denis Akhiyarov <denis.akhiyarov@gmail.com> - 2016-02-19 20:58 -0800
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-20 10:50 -0800
        Re: Considering migrating to Python from Visual Basic 6 for engineering applications Denis Akhiyarov <denis.akhiyarov@gmail.com> - 2016-02-22 00:02 -0800
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications Mike S <mscir@yahoo.com> - 2016-02-20 19:52 -0800
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications wxjmfauth@gmail.com - 2016-02-20 01:46 -0800
    Re: Considering migrating to Python from Visual Basic 6 for engineering applications nholtz <nholtz@cee.carleton.ca> - 2016-02-20 08:22 -0800
      Re: Considering migrating to Python from Visual Basic 6 for engineering applications wrong.address.1@gmail.com - 2016-02-20 10:47 -0800

Page 1 of 5  [1] 2 3 4 5  Next page →


#103064 — Considering migrating to Python from Visual Basic 6 for engineering applications

Fromwrong.address.1@gmail.com
Date2016-02-17 11:49 -0800
SubjectConsidering migrating to Python from Visual Basic 6 for engineering applications
Message-ID<90cc50d2-1ce5-4588-9bfd-a49d439f00dd@googlegroups.com>
I am mostly getting positive feedback for Python.

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?

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

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

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.

Thanks for your responses. 

[toc] | [next] | [standalone]


#103065

Fromsohcahtoa82@gmail.com
Date2016-02-17 12:25 -0800
Message-ID<e82e421d-7763-4047-bdd4-7a6eab246f78@googlegroups.com>
In reply to#103064
On Wednesday, February 17, 2016 at 11:49:44 AM UTC-8, wrong.a...@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.

[toc] | [prev] | [next] | [standalone]


#103069

FromRob Gaddi <rgaddi@highlandtechnology.invalid>
Date2016-02-17 20:54 +0000
Message-ID<na2mls$44e$1@dont-email.me>
In reply to#103064
wrong.address.1@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.

[toc] | [prev] | [next] | [standalone]


#103071

FromRay Cote <rgacote@appropriatesolutions.com>
Date2016-02-17 16:13 -0500
Message-ID<mailman.221.1455743671.22075.python-list@python.org>
In reply to#103069
On Wed, Feb 17, 2016 at 3:54 PM, Rob Gaddi <
rgaddi@highlandtechnology.invalid> wrote:

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

Python is used for much more then web based applications.
The latest versions of pyInstaller (http://www.pyinstaller.org) are
incredibly good at generating single-file binaries for both Windows and
Linux.
We’re using pyInstaller to distribute applications based on some fairly
complex frameworks—including wxPython (http://www.wxpython.org)
which is one option for building GUI applications.

—Ray




-- 
Raymond Cote, President
voice: +1.603.924.6079 email: rgacote@AppropriateSolutions.com skype:
ray.cote

[toc] | [prev] | [next] | [standalone]


#103073

Frompaul.hermeneutic@gmail.com
Date2016-02-17 14:18 -0700
Message-ID<mailman.223.1455743959.22075.python-list@python.org>
In reply to#103064
On Wed, Feb 17, 2016 at 12:49 PM,  <wrong.address.1@gmail.com> wrote:
> 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.

Why are you looking to change from VB? Too slow? Cannot run on
anything but Windows? Buggy?

I, like most people here, would encourage you to learn Python 3.
However, there is something to be said for "if it ain't broke, don't
fix it."

[toc] | [prev] | [next] | [standalone]


#103075

FromWilliam Ray Wing <wrw@mac.com>
Date2016-02-17 16:27 -0500
Message-ID<mailman.226.1455748107.22075.python-list@python.org>
In reply to#103064
> On Feb 17, 2016, at 2:49 PM, wrong.address.1@gmail.com wrote:
> 
> I am mostly getting positive feedback for Python.
> 

I would be surprised if you weren’t.

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

I’m not sure where you got that idea.  Python has been and is being used for an extremely broad range of applications.  At one extreme, the popular YouTube site is based on Python (and yes, that is a web application), at the other extreme much (most?) of the data analysis of the recent LIGO data leading up to the discovery of gravitational waves was done in Python, and numpy (a python numerical library); with the results displayed in matplotlib (a python library for scientific-engineering graphics).

The basic python language and its libraries are completely cross-platform (Linux, OS-X, Windows, iOS, and Android).  The same source code will run on all of them.  However, because it is an Interpreted language, the step to a bundled, self-contained image is platform dependent. There python compliers (as opposed to interpreters) for some, but not all platforms, and there is a very active JiT compiler project that would fall somewhere in between. 

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

There are several GUI libraries for Python.  You might check out TK (which comes built-in), but there are also libraries like wxPython, Kivi (which is completely cross platform), and PyQt.  Note that these are the GUI libraries themselves, not IDE’s which tend to be independent.  There are too many IDE’s to list here - check with Google.

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

Matrix (and similar operations) can be done in Python directly, but if you need maximum performance you should use the optimized vector routines available in numpy, these are typically pre-compiled with C or FORTRAN and squeeze out the maximum speed your hardware is capable of.  (There is work being done to migrate them to GPUs, but is VERY hardware dependent at this point.) If you need to do scientific/engineering analysis, you should also check out scipy, which is built on top of it and is also vector optimized.

> 
> Could someone kindly tell me advantages and disadvantages of Python?

If you are completely satisfied with VB, there is no reason to change (other than the enjoyable exercise of learning a new and more powerful language).

On the other hand, Python has often been referred to as “executable pseudo code” - in other words, the english-like steps you might sketch out to outline the solution to a programming problem in another language is to all intents and purposes Python itself.  This makes for very fast and productive code generation with typically fewer errors than are made in other languages. In addition, and as has been implied above, it is cross platform.  The same python source code (with the appropriate libraries) will run on all the platforms mentioned above. One of the biggest productive features of Python is the fact that it is interpreted (in its most common instantiation).  Thus, you can have two windows open side by side, with the source code in one and running code in the other.  Changes in the source code can instantly be reflected in the output.

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

Not necessarily better, but at least worth looking into would be the Swift language, which shares much of Python’s modern structure, is now also open source, and has been ported to most flavors of Linux.  A Window’s port is promised, but I don’t know how far along it is.  It *is* a compiled language, so you would then be back in the edit, compile, link, and run loop as you debug your code.

I’m sure you will get lots of other answers - Google each of the things I’ve mentioned and you will get a truck-load of info.  You might start with Wikipedia and read there about Python and Swift.

> Thanks for your responses. 
> -- 
> https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#103095

Fromwrong.address.1@gmail.com
Date2016-02-18 00:17 -0800
Message-ID<14c75a68-0d2e-45cc-8d73-0d71b6a6aea6@googlegroups.com>
In reply to#103075
Thanks to all of you who have responded. One point two of you ask me is why I want to shift from Visual Basic. 

Most of my software is in VB6 (and VB3), and converting to VB.net is not very pleasant. I have learnt enough VB.net to manage most of the things I will need, but it always gives me a feeling that it is not meant for the kind of things I am doing. And you never know when Microsoft will kick us out of VB.net also. For the sake of keeping software compatible with new versions of Windows, you need to keep changing things in the software, which takes too much time. You might ask if it is really necessary to move from VB6 to VB.net because Microsoft will still not be able to kill VB6 very soon, thanks to VBA used in Excel. If my reasoning is wrong, please correct me. I am just an engineer, not a good programmer.

Is it easy to create vector graphics files of plots in Python? In VB6, I wrote my own code to generate EPS files. Then people who demand jpg and gif files could be given those by converting the EPS with the desired resolution.

More points in the text below.

William Ray Wing writes:
> > On Feb 17, 2016, at 2:49 PM, wrong.address.1@gmail.com wrote:
> > 
> > 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?
> > 
> 
> I'm not sure where you got that idea.  Python has been and is being used for an extremely broad range of applications.  At one extreme, the popular YouTube site is based on Python (and yes, that is a web application), at the other extreme much (most?) of the data analysis of the recent LIGO data leading up to the discovery of gravitational waves was done in Python, and numpy (a python numerical library); with the results displayed in matplotlib (a python library for scientific-engineering graphics).
> 

This is good news, because I need several kinds of plots.

> The basic python language and its libraries are completely cross-platform (Linux, OS-X, Windows, iOS, and Android).  The same source code will run on all of them.  However, because it is an Interpreted language, the step to a bundled, self-contained image is platform dependent. There python compliers (as opposed to interpreters) for some, but not all platforms, and there is a very active JiT compiler project that would fall somewhere in between. 
> 

OK. This is clear to me now. It is like needing different Fortran compilers for different operating systems, but Fortran code does not need much modifications (except file names/paths, etc.).

> > 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.?
> > 
> 
> There are several GUI libraries for Python.  You might check out TK (which comes built-in), but there are also libraries like wxPython, Kivi (which is completely cross platform), and PyQt.  Note that these are the GUI libraries themselves, not IDE's which tend to be independent.  There are too many IDE's to list here - check with Google.
> 
> > Is it easy to do matrix operations in Python? Or do I need to write subroutines like in Visual Basic?
> 
> Matrix (and similar operations) can be done in Python directly, but if you need maximum performance you should use the optimized vector routines available 

Speed is usually not an issue.

> in numpy, these are typically pre-compiled with C or FORTRAN and squeeze out the maximum speed your hardware is capable of.  (There is work being done to migrate them to GPUs, but is VERY hardware dependent at this point.) If you need to do scientific/engineering analysis, you should also check out scipy, which is built on top of it and is also vector optimized.
> 
> > 
> > Could someone kindly tell me advantages and disadvantages of Python?
> 
> If you are completely satisfied with VB, there is no reason to change (other than the enjoyable exercise of learning a new and more powerful language).
> 

Will VB6 run on Windows 11? Or can I compile VB6 on Windows 11. We can't know. But there will be easy ways to run Python on any Windows version or Linux or whatever.

> On the other hand, Python has often been referred to as "executable pseudo code" - in other words, the english-like steps you might sketch out to outline the solution to a programming problem in another language is to all intents and purposes Python itself.  This makes for very fast and productive code generation with typically fewer errors than are made in other languages. In addition, and as has been implied above, it is cross platform.  The same python source code (with the appropriate libraries) will run on all the platforms mentioned above. One of the biggest productive features of Python is the fact that it is interpreted (in its most common instantiation).  Thus, you can have two windows open side by side, with the source code in one and running code in the other.  Changes in the source code can instantly be reflected in the output.
> 
> > 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.
> > 
> 
> Not necessarily better, but at least worth looking into would be the Swift language, which shares much of Python's modern structure, is now also open source, and has been ported to most flavors of Linux.  A Window's port is promised, but I don't know how far along it is.  It *is* a compiled language, so you would then be back in the edit, compile, link, and run loop as you debug your code.
> 
> I'm sure you will get lots of other answers - Google each of the things I've mentioned and you will get a truck-load of info.  You might start with Wikipedia and read there about Python and Swift.
> 
> > Thanks for your responses. 

Thanks again to all of you who have responded.

> > -- 
> > https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#103101

FromOscar Benjamin <oscar.j.benjamin@gmail.com>
Date2016-02-18 10:09 +0000
Message-ID<mailman.242.1455790218.22075.python-list@python.org>
In reply to#103095
On 18 February 2016 at 08:17,  <wrong.address.1@gmail.com> wrote:
> Is it easy to create vector graphics files of plots in Python?

Yes

> In VB6, I wrote my own code to generate EPS files. Then people who demand jpg and gif files could be given those by converting the EPS with the desired resolution.

That sounds a lot harder than doing it in Python using matplotlib. To
run the following you need Python, numpy and matplotlib:

-----
from matplotlib import pyplot as plt

xdata = [0, 1, 2, 3, 4]
ydata = [0, 1, 0, 1, 0]

fig = plt.figure(figsize=(4, 3))
ax = fig.add_axes([0.15, 0.15, 0.70, 0.70])
ax.plot(xdata, ydata, color='black', linewidth=2)
ax.set_xlabel('$V_x$') # Latex math-mode in text
ax.set_ylabel('$V_y$')

plt.show() # Make the plot window appear on screen
-----

The last line can be replaced with a call to fig.savefig if you want
the plot to go straight to a file. The format is inferred from the
filename so:

fig.savefig('plot.eps') # Do you really want eps?
fig.savefig('plot.pdf') # I'd use pdf
fig.savefig('plot.jpg') # etc.

--
Oscar

[toc] | [prev] | [next] | [standalone]


#103103

FromChris Angelico <rosuav@gmail.com>
Date2016-02-18 21:16 +1100
Message-ID<mailman.243.1455790578.22075.python-list@python.org>
In reply to#103095
On Thu, Feb 18, 2016 at 7:17 PM,  <wrong.address.1@gmail.com> wrote:
> Thanks to all of you who have responded. One point two of you ask me is why I want to shift from Visual Basic.
>
> Most of my software is in VB6 (and VB3), and converting to VB.net is not very pleasant. I have learnt enough VB.net to manage most of the things I will need, but it always gives me a feeling that it is not meant for the kind of things I am doing. And you never know when Microsoft will kick us out of VB.net also. For the sake of keeping software compatible with new versions of Windows, you need to keep changing things in the software, which takes too much time. You might ask if it is really necessary to move from VB6 to VB.net because Microsoft will still not be able to kill VB6 very soon, thanks to VBA used in Excel. If my reasoning is wrong, please correct me. I am just an engineer, not a good programmer.
>

Very fair point. And I fully support your move, here. Just make sure
you start on the latest Python (currently that's 3.5), and you should
have no difficulty moving forward in versions; as someone who started
writing Python 3 code back when 3.3 was the newest and latest thing, I
can attest that it's been easy to migrate 3.2->3.3->3.4->3.5->3.6;
there are very few things that get broken by the upgrade, and they're
mostly things that would have been bad code in the older version
anyway.

>> The basic python language and its libraries are completely cross-platform (Linux, OS-X, Windows, iOS, and Android).  The same source code will run on all of them.  However, because it is an Interpreted language, the step to a bundled, self-contained image is platform dependent. There python compliers (as opposed to interpreters) for some, but not all platforms, and there is a very active JiT compiler project that would fall somewhere in between.
>>
>
> OK. This is clear to me now. It is like needing different Fortran compilers for different operating systems, but Fortran code does not need much modifications (except file names/paths, etc.).
>

Something like that. There are a lot of little traps you can fall into
(as you say, file names can be different, especially system ones) that
stop your code from running correctly on all platforms, but porting a
Python script from Linux to Windows or vice versa is a matter of
testing it on the new platform and seeing what breaks, not completely
rewriting it in a new language.

>> > Could someone kindly tell me advantages and disadvantages of Python?
>>
>> If you are completely satisfied with VB, there is no reason to change (other than the enjoyable exercise of learning a new and more powerful language).
>>
>
> Will VB6 run on Windows 11? Or can I compile VB6 on Windows 11. We can't know. But there will be easy ways to run Python on any Windows version or Linux or whatever.
>

There will indeed. That's the advantage of a fully open system - even
if a nuclear meltdown kills all the Python core devs in one stroke (we
really shouldn't have had PyCon Chernobyl), anyone in the world can
pick up the source code and keep going with it. And Microsoft, despite
having a strongly anti-freedom history, has come far more on board of
recent years; as I understand it, Steve Dower has been spending
company time improving Python (notably in the area of Windows
installers and such). The future of open source software is pretty
secure, and the future of openly-developed languages even more so,
because CPython isn't the only way to run your Python code.

One Python advantage that you may or may not be aware of is its
extensibility. To an extent that I haven't seen since working with
REXX on OS/2, there is a thriving community building Python packages,
many of which (about 75K!) are listed on PyPI [1]. Got this
proprietary database that you need to get info from? Check PyPI -
chances are someone's written a connector for it, so you can perform
queries on it as if it had native support in the language. Once you
install something using "pip" [2], you can import it into your script
the exact same way that you would import something from the standard
library - making PyPI kinda like the "extended library" for the
language. The barrier to entry is low, though, so you do sometimes
have to wade through a bunch of stagnant or expired projects to find
the gems you want. But there's so much good stuff there that it's well
worth the effort.

ChrisA

[1] https://pypi.python.org/pypi
[2] No, not the chipmunk from Enchanted.

[toc] | [prev] | [next] | [standalone]


#103107

Fromwrong.address.1@gmail.com
Date2016-02-18 03:11 -0800
Message-ID<c977991d-a635-4a8f-a0e3-28f436b378f6@googlegroups.com>
In reply to#103103
Almost everything points positively for Python. Thanks to all of you who have responded. But please also tell me the disadvantages of Python. If I start using Python, I should be aware of the price I am paying. Speed is not a big problem for me, so an interpreted language is fine. Is packaging/installing very messy? Do I create dozens of files for a simple program calculating the sum of two numbers and product of two numbers in text boxes with one command to be clicked? Can I learn this much in the first couple of hours?

torstai 18. helmikuuta 2016 12.16.30 UTC+2 Chris Angelico kirjoitti:
> On Thu, Feb 18, 2016 at 7:17 PM,  <wrong.address.1@gmail.com> wrote:
> > Thanks to all of you who have responded. One point two of you ask me is why I want to shift from Visual Basic.
> >
> > Most of my software is in VB6 (and VB3), and converting to VB.net is not very pleasant. I have learnt enough VB.net to manage most of the things I will need, but it always gives me a feeling that it is not meant for the kind of things I am doing. And you never know when Microsoft will kick us out of VB.net also. For the sake of keeping software compatible with new versions of Windows, you need to keep changing things in the software, which takes too much time. You might ask if it is really necessary to move from VB6 to VB.net because Microsoft will still not be able to kill VB6 very soon, thanks to VBA used in Excel. If my reasoning is wrong, please correct me. I am just an engineer, not a good programmer.
> >
> 
> Very fair point. And I fully support your move, here. Just make sure
> you start on the latest Python (currently that's 3.5), and you should
> have no difficulty moving forward in versions; as someone who started
> writing Python 3 code back when 3.3 was the newest and latest thing, I
> can attest that it's been easy to migrate 3.2->3.3->3.4->3.5->3.6;
> there are very few things that get broken by the upgrade, and they're
> mostly things that would have been bad code in the older version
> anyway.
> 
> >> The basic python language and its libraries are completely cross-platform (Linux, OS-X, Windows, iOS, and Android).  The same source code will run on all of them.  However, because it is an Interpreted language, the step to a bundled, self-contained image is platform dependent. There python compliers (as opposed to interpreters) for some, but not all platforms, and there is a very active JiT compiler project that would fall somewhere in between.
> >>
> >
> > OK. This is clear to me now. It is like needing different Fortran compilers for different operating systems, but Fortran code does not need much modifications (except file names/paths, etc.).
> >
> 
> Something like that. There are a lot of little traps you can fall into
> (as you say, file names can be different, especially system ones) that
> stop your code from running correctly on all platforms, but porting a
> Python script from Linux to Windows or vice versa is a matter of
> testing it on the new platform and seeing what breaks, not completely
> rewriting it in a new language.
> 
> >> > Could someone kindly tell me advantages and disadvantages of Python?
> >>
> >> If you are completely satisfied with VB, there is no reason to change (other than the enjoyable exercise of learning a new and more powerful language).
> >>
> >
> > Will VB6 run on Windows 11? Or can I compile VB6 on Windows 11. We can't know. But there will be easy ways to run Python on any Windows version or Linux or whatever.
> >
> 
> There will indeed. That's the advantage of a fully open system - even
> if a nuclear meltdown kills all the Python core devs in one stroke (we
> really shouldn't have had PyCon Chernobyl), anyone in the world can
> pick up the source code and keep going with it. And Microsoft, despite
> having a strongly anti-freedom history, has come far more on board of
> recent years; as I understand it, Steve Dower has been spending
> company time improving Python (notably in the area of Windows
> installers and such). The future of open source software is pretty
> secure, and the future of openly-developed languages even more so,
> because CPython isn't the only way to run your Python code.
> 
> One Python advantage that you may or may not be aware of is its
> extensibility. To an extent that I haven't seen since working with
> REXX on OS/2, there is a thriving community building Python packages,
> many of which (about 75K!) are listed on PyPI [1]. Got this
> proprietary database that you need to get info from? Check PyPI -
> chances are someone's written a connector for it, so you can perform
> queries on it as if it had native support in the language. Once you
> install something using "pip" [2], you can import it into your script
> the exact same way that you would import something from the standard
> library - making PyPI kinda like the "extended library" for the
> language. The barrier to entry is low, though, so you do sometimes
> have to wade through a bunch of stagnant or expired projects to find
> the gems you want. But there's so much good stuff there that it's well
> worth the effort.
> 
> ChrisA
> 
> [1] https://pypi.python.org/pypi
> [2] No, not the chipmunk from Enchanted.

[toc] | [prev] | [next] | [standalone]


#103108

FromChris Angelico <rosuav@gmail.com>
Date2016-02-18 22:32 +1100
Message-ID<mailman.246.1455795162.22075.python-list@python.org>
In reply to#103107
On Thu, Feb 18, 2016 at 10:11 PM,  <wrong.address.1@gmail.com> wrote:
> Almost everything points positively for Python. Thanks to all of you who have responded. But please also tell me the disadvantages of Python. If I start using Python, I should be aware of the price I am paying. Speed is not a big problem for me, so an interpreted language is fine. Is packaging/installing very messy? Do I create dozens of files for a simple program calculating the sum of two numbers and product of two numbers in text boxes with one command to be clicked? Can I learn this much in the first couple of hours?
>

There are a few warts, particularly on Windows, as regards packaging
and third-party modules. Anything that's written in pure Python is
fairly easy; stuff that's written in C is sometimes a bit hairy. But
that's a limitation on the "extended library" of PyPI, not the stuff
that comes with Python itself.

Your simple example could easily be a single file. Python tends to
eschew boilerplate; its motto comes from Baloo - look for the bare
necessities of life.

For a first couple of hours, I would recommend working at the console
or in Idle, rather than creating a GUI; a window takes a bit of extra
effort (plus you have choices in how to do that), so just learn the
language first. But you could easily advance to building a GUI within
your first day of learning Python, if that's the direction you want to
go.

The biggest disadvantage of Python is that, in a number of ways, it
surprises people. Significant whitespace bugs a lot of experienced
programmers (and some tools, too), and there are a few other ways that
you may find a team of people revile against it. But if you can deal
with the social aspects, it's a solid language.

ChrisA

[toc] | [prev] | [next] | [standalone]


#103127

Fromwrong.address.1@gmail.com
Date2016-02-18 07:49 -0800
Message-ID<0a56557a-3c41-4900-b03c-288f1af82c53@googlegroups.com>
In reply to#103108
On Thursday, 18 February 2016 13:32:58 UTC+2, Chris Angelico  wrote:
> On Thu, Feb 18, 2016 at 10:11 PM,  <wrong.address.1@gmail.com> wrote:
> > Almost everything points positively for Python. Thanks to all of you who have responded. But please also tell me the disadvantages of Python. If I start using Python, I should be aware of the price I am paying. Speed is not a big problem for me, so an interpreted language is fine. Is packaging/installing very messy? Do I create dozens of files for a simple program calculating the sum of two numbers and product of two numbers in text boxes with one command to be clicked? Can I learn this much in the first couple of hours?
> >
> 
> There are a few warts, particularly on Windows, as regards packaging
> and third-party modules. Anything that's written in pure Python is
> fairly easy; stuff that's written in C is sometimes a bit hairy. But
> that's a limitation on the "extended library" of PyPI, not the stuff
> that comes with Python itself.
> 
> Your simple example could easily be a single file. Python tends to
> eschew boilerplate; its motto comes from Baloo - look for the bare
> necessities of life.
> 
> For a first couple of hours, I would recommend working at the console
> or in Idle, rather than creating a GUI; a window takes a bit of extra
> effort (plus you have choices in how to do that), so just learn the
> language first. But you could easily advance to building a GUI within
> your first day of learning Python, if that's the direction you want to
> go.
> 
> The biggest disadvantage of Python is that, in a number of ways, it
> surprises people. Significant whitespace bugs a lot of experienced
> programmers (and some tools, too), and there are a few other ways that
> you may find a team of people revile against it. But if you can deal
> with the social aspects, it's a solid language.
> 
> ChrisA

Thanks. You have guided me quite well, and I am almost ready to declare that I will use Python for the next few decades.

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?

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

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.

[toc] | [prev] | [next] | [standalone]


#103132

FromChris Angelico <rosuav@gmail.com>
Date2016-02-19 03:06 +1100
Message-ID<mailman.14.1455811574.2289.python-list@python.org>
In reply to#103127
On Fri, Feb 19, 2016 at 2:49 AM,  <wrong.address.1@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

[toc] | [prev] | [next] | [standalone]


#103141

Fromwrong.address.1@gmail.com
Date2016-02-18 09:49 -0800
Message-ID<9750b589-2045-4634-9364-01e8d5f3dc99@googlegroups.com>
In reply to#103132
On Thursday, 18 February 2016 18:06:29 UTC+2, Chris Angelico  wrote:
> On Fri, Feb 19, 2016 at 2:49 AM,  <wrong.address.1@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.
> 

What do I lose by using an external library? Bigger size of the *.exe is not a problem, neither is speed an issue. It might even be easier to learn with these external libraries, and produce more readable code.

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

That is good.

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

Thanks again for your input.

[toc] | [prev] | [next] | [standalone]


#103153

FromDietmar Schwertberger <maillist@schwertberger.de>
Date2016-02-18 21:37 +0100
Message-ID<mailman.24.1455833329.2289.python-list@python.org>
In reply to#103141
On 18.02.2016 18:49, wrong.address.1@gmail.com wrote:
> What do I lose by using an external library?
With using matplotlib for your plots, you can easily create many kinds 
of plots.
On the other hand, if integration with MS Office is a concern, other 
options may be more suitable for you as matplotlib can not export 
EMF/WMF files any more. (Using svg or pdf as intermediate format is 
possible, but no fun.)
With the drawing function of e.g. wxPython or PyQt you can either draw 
on the screen or into a Metafile context using the same code. So you can 
easily export high quality vector graphics via clipboard or file.

Regards,

Dietmar

[toc] | [prev] | [next] | [standalone]


#103134

FromDan Strohl <D.Strohl@F5.com>
Date2016-02-18 16:24 +0000
Message-ID<mailman.15.1455812679.2289.python-list@python.org>
In reply to#103127
I totally agree with Chris here, try it out, do some simpler things to get your feet wet before committing to redoing hundreds of thousands of lines of code in it.  Find a few of the "deal breakers" and try to solve them in Python (create a hello world app in python, then package it in an exe and distribute it to some friends).. VB is a fine language, and is likely to suit your needs as well... even if we all believe that Python is better, the effort to convert from one to the other may not make sense.

I would also suggest taking a few steps back and seeing if there is a different overall architectural approach that makes sense.  If you are using a heavy weight local app, what about a web app?  What about doing a combination approach?  Have a back end running on a server with Python, that feeds a VB app on a client for displaying and manipulating data? (then a Java app for mobile clients or Linux ones?)

Also, looking at existing frameworks and expandable apps out there that you might be able to do less work but still meet your goals with because 80% of the work was done for you... things like django, splunk, tableau, etc...

Dan


> -----Original Message-----
> From: Python-list [mailto:python-list-bounces+d.strohl=f5.com@python.org] On
> Behalf Of Chris Angelico
> Sent: Thursday, February 18, 2016 8:06 AM
> Cc: python-list@python.org
> Subject: Re: Considering migrating to Python from Visual Basic 6 for engineering
> applications
> 
> On Fri, Feb 19, 2016 at 2:49 AM,  <wrong.address.1@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
> --
> https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#103142

Fromwrong.address.1@gmail.com
Date2016-02-18 09:58 -0800
Message-ID<9d101727-7e9d-4031-9814-95b81b7c5520@googlegroups.com>
In reply to#103134
On Thursday, 18 February 2016 18:24:55 UTC+2, Dan Strohl  wrote:
> I totally agree with Chris here, try it out, do some simpler things to get your feet wet before committing to redoing hundreds of thousands of lines of code in it.  Find a few of the "deal breakers" and try to solve them in Python (create a hello world app in python, then package it in an exe and distribute it to some friends).. VB is a fine language, and is likely to suit your needs as well... even if we all believe that Python is better, the effort to convert from one to the other may not make sense.
> 

How long can I depend on VB? I don't really mind learning one more language if there is sufficient utility of it. Besides, I hear that Python is relatively easy to learn compared to C++ or Java.

I have some smaller VB programs (single form, little math) for my own use. I could convert those first and get a feel of how it is going to be with larger programs with thousands of lines.

> I would also suggest taking a few steps back and seeing if there is a different overall architectural approach that makes sense.  If you are using a heavy weight local app, what about a web app? 

Some things I do can be done in a web app, but the important stuff has to be put into *.exe files for myself and others to use.

> What about doing a combination approach?  Have a back end running on a server with Python, that feeds a VB app on a client for displaying and manipulating data? (then a Java app for mobile clients or Linux ones?)
> 

I do not know Java, and don't feel inclined to learn that. If I could use VB for years, I need not consider moving over to Python. The trouble is that I don't think we can trust VB (VB6 particularly, but even VB.net) for too long.

> Also, looking at existing frameworks and expandable apps out there that you might be able to do less work but still meet your goals with because 80% of the work was done for you... things like django, splunk, tableau, etc...
> 
> Dan
> 

Thanks.

> 
> > -----Original Message-----
> > From: Python-list [mailto:python-list-bounces+d.strohl=f5.com@python.org] On
> > Behalf Of Chris Angelico
> > Sent: Thursday, February 18, 2016 8:06 AM
> > Cc: python-list@python.org
> > Subject: Re: Considering migrating to Python from Visual Basic 6 for engineering
> > applications
> > 
> > On Fri, Feb 19, 2016 at 2:49 AM,  <wrong.address.1@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
> > --
> > https://mail.python.org/mailman/listinfo/python-list

[toc] | [prev] | [next] | [standalone]


#103145

FromTim Chase <python.list@tim.thechases.com>
Date2016-02-18 13:18 -0600
Message-ID<mailman.19.1455823791.2289.python-list@python.org>
In reply to#103142
On 2016-02-18 09:58, wrong.address.1@gmail.com wrote:
> How long can I depend on VB?

Are you talking the VB6-and-before, or VB.Net?  Given that MS dropped
support for the VB6 line a decade ago (2005-2008 depending on whether
you had extended support) with little to no help in transitioning to
VB.Net which (pejoratively called "Visual Fred" because it's so
different), I wouldn't want to depend on it at all.  Especially since
VB.Net is so radically different from VB6.  As it seems you've found.

> I don't really mind learning one more language if there is
> sufficient utility of it. Besides, I hear that Python is relatively
> easy to learn compared to C++ or Java.

I find that Python is much more readable than the C-flavored
languages.  Also, while there are language gotchas in all of them,
Python's make a lot more sense to me compared to those in the
C-flavored languages.

> I have some smaller VB programs (single form, little math) for my
> own use. I could convert those first and get a feel of how it is
> going to be with larger programs with thousands of lines.

Excellent plan.

-tkc



[toc] | [prev] | [next] | [standalone]


#103157

FromSteven D'Aprano <steve@pearwood.info>
Date2016-02-19 11:30 +1100
Message-ID<56c66225$0$1607$c3e8da3$5496439d@news.astraweb.com>
In reply to#103108
On Thu, 18 Feb 2016 10:32 pm, Chris Angelico wrote:

> The biggest disadvantage of Python is that, in a number of ways, it
> surprises people. Significant whitespace bugs a lot of experienced
> programmers

This is why we cannot have nice things.

"But what if we pass the source code through a system that strips out
leading whitespace?"

"Then don't do that. What if you pass the source code through a system that
strips out braces?"



-- 
Steven

[toc] | [prev] | [next] | [standalone]


#103158

FromChris Angelico <rosuav@gmail.com>
Date2016-02-19 11:57 +1100
Message-ID<mailman.27.1455843458.2289.python-list@python.org>
In reply to#103157
On Fri, Feb 19, 2016 at 11:30 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Thu, 18 Feb 2016 10:32 pm, Chris Angelico wrote:
>
>> The biggest disadvantage of Python is that, in a number of ways, it
>> surprises people. Significant whitespace bugs a lot of experienced
>> programmers
>
> This is why we cannot have nice things.
>
> "But what if we pass the source code through a system that strips out
> leading whitespace?"
>
> "Then don't do that. What if you pass the source code through a system that
> strips out braces?"

You may note that I didn't say that this was a flaw in Python. And
it's not a tooling issue either (that was mentioned as a parenthesis,
but wasn't my main point). I'm talking about how people, those bags of
flesh and thoughts, are bugged out by the notion that *whitespace*
should matter (other than the mere presence/absence of it). It's the
price you pay for being different - people will have trouble
comprehending you.

ChrisA

[toc] | [prev] | [next] | [standalone]


Page 1 of 5  [1] 2 3 4 5  Next page →

Back to top | Article view | comp.lang.python


csiph-web