Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail From: William Ray Wing Newsgroups: comp.lang.python Subject: Re: Considering migrating to Python from Visual Basic 6 for engineering applications Date: Wed, 17 Feb 2016 16:27:59 -0500 Lines: 95 Message-ID: References: <90cc50d2-1ce5-4588-9bfd-a49d439f00dd@googlegroups.com> Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de /pu90Yk9HYoDn6q7FZOOnQePQA4ozFCLD/0/p/UgxzVA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'exercise': 0.03; 'debug': 0.04; 'source,': 0.04; 'subject:Python': 0.05; 'compiler': 0.05; 'interpreted': 0.07; '*is*': 0.09; 'i\xe2\x80\x99ve': 0.09; 'subject:Visual': 0.09; 'themselves,': 0.09; 'python': 0.10; 'python.': 0.11; 'itself.': 0.11; 'language,': 0.11; 'appropriate': 0.14; 'languages.': 0.15; 'subject: \n ': 0.15; '(other': 0.16; '(there': 0.16; 'between.': 0.16; 'compile,': 0.16; 'dependent.': 0.16; 'flavors': 0.16; 'i\xe2\x80\x99m': 0.16; 'numpy': 0.16; 'ported': 0.16; 'received:10.0.1.5': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'responses.': 0.16; 'scipy,': 0.16; 'sizes,': 0.16; 'wrote:': 0.16; 'numerical': 0.18; 'of.': 0.18; 'received:10.0.1': 0.18; '(in': 0.18; 'gui': 0.18; 'python?': 0.18; 'platforms': 0.18; 'language': 0.19; 'library': 0.20; 'changes': 0.20; 'windows': 0.20; 'cc:2**0': 0.20; 'purposes': 0.20; 'to:2**1': 0.21; 'discovery': 0.22; 'info.': 0.22; 'libraries': 0.22; 'programming': 0.22; 'code.': 0.23; 'defined': 0.23; 'seems': 0.23; 'feb': 0.23; 'dependent': 0.23; 'elements': 0.23; 'errors': 0.23; 'somewhere': 0.24; '(which': 0.26; 'linux': 0.26; 'addition,': 0.27; 'mostly': 0.27; 'least': 0.27; 'opposed': 0.27; 'received:17': 0.27; 'tend': 0.27; 'fine': 0.28; 'directly,': 0.29; 'equally': 0.29; 'implied': 0.29; 'matplotlib': 0.29; 'reflected': 0.29; 'structure,': 0.29; 'thus,': 0.29; 'windows,': 0.29; 'typically': 0.29; 'url:mailman': 0.30; 'creating': 0.30; 'code': 0.30; 'task': 0.30; 'operations': 0.31; 'another': 0.32; 'compiled': 0.32; 'getting': 0.33; 'run': 0.33; 'problem': 0.33; 'source': 0.33; 'url:python': 0.33; 'common': 0.33; 'displayed': 0.33; 'surprised': 0.33; 'open': 0.33; 'similar': 0.33; 'url:listinfo': 0.34; 'received:10.0': 0.34; 'running': 0.34; 'list': 0.34; 'could': 0.35; 'done': 0.35; 'platforms,': 0.35; 'step': 0.36; 'but': 0.36; 'too': 0.36; 'should': 0.36; 'project': 0.36; 'there': 0.36; 'url:org': 0.36; 'lines': 0.36; 'possible': 0.36; '(and': 0.36; 'basic': 0.36; 'visual': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'two': 0.37; 'being': 0.37; 'thanks': 0.37; 'youtube': 0.63; 'more': 0.63; 'necessarily': 0.63; 'kindly': 0.64; 'other.': 0.64; 'capable': 0.65; 'fall': 0.66; 'outline': 0.66; 'here': 0.66; 'results': 0.66; 'biggest': 0.67; 'worth': 0.67; 'skip:\xe2 10': 0.70; 'advantages': 0.72; 'analysis': 0.72; 'satisfied': 0.83; '20000': 0.84; 'enjoyable': 0.84; 'extreme,': 0.84; 'graphics).': 0.84; 'header:In-reply-to:1': 0.84; 'optimized.': 0.84; 'pyqt.': 0.84; 'routines': 0.84; 'to:name:python': 0.84; 'swift': 0.91; 'instantly': 0.93; 'shares': 0.93; 'hand,': 0.97 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-02-17_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1602170340 In-reply-to: <90cc50d2-1ce5-4588-9bfd-a49d439f00dd@googlegroups.com> X-Mailer: Apple Mail (2.3112) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103075 > On Feb 17, 2016, at 2:49 PM, wrong.address.1@gmail.com wrote: >=20 > I am mostly getting positive feedback for Python. >=20 I would be surprised if you weren=E2=80=99t. > 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? >=20 I=E2=80=99m 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.=20 > 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.? >=20 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=E2=80=99s which tend to be = independent. There are too many IDE=E2=80=99s 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. >=20 > 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 =E2=80=9Cexecutabl= e pseudo code=E2=80=9D - 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. >=20 Not necessarily better, but at least worth looking into would be the = Swift language, which shares much of Python=E2=80=99s modern structure, = is now also open source, and has been ported to most flavors of Linux. = A Window=E2=80=99s port is promised, but I don=E2=80=99t 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=E2=80=99m sure you will get lots of other answers - Google each of the = things I=E2=80=99ve 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.=20 > --=20 > https://mail.python.org/mailman/listinfo/python-list