Exploring Powerful Python
Apr 28, 2016 News Archive
I first heard of Python about 3 years ago, but I simply took it as just another programming language and didn’t dig out more about it. Only recently did I start exploring this powerful tool. Needless to say, I was really amazed by its capabilities!
Python is a user-friendly, object-orientated, and platform-independent programming language that has the nice features of C++ and MATLAB. Just like any other object-oriented language, Python structures the data like a tree, making it a very useful tool in software development, easily adding more features. Python can be used to generate graphical user interfaces (GUIs) and executable files, which combined can be further compiled as a software package. Python codes are very easy to read and understand. The way it defines a function and a variable along with input/output data makes it very user-friendly. Also, numerous well-developed modules are already available to take advantage of. Visualization modules such as Matplotlib and Mayavi are very powerful graphic tools, making animations a breeze.
Simple Wamit Interface GUI
Another nice thing about Python is that it can work with a lot of commercial software such as Rhino, OrcaFlex and ANSYS. We all have the feeling that it is tedious and boring to change several parameters in the software and run it all over again. Python can easily be used to automate all these repetitive processes, greatly improving our working efficiency. Also, Python can be used to bridge the gaps between different software packages, facilitating the completion of more advanced analyses.
Python works with Excel just like VBA. The macro-enabled workbook with VBA has more working rows, however it may crash sometimes when processing large amounts of data. On the other hand, using the standard workbook with Python manipulation can avoid this. To speed things up, one piece of advice I have is trying to avoid hard-coded formula in excel and using a function in Python to achieve what you want. Excel can be used as final data output book to make graphs and summary tables.
One last thing I am going to talk about is Python’s multiprocessing feature. If you have multiprocessors in your computer and you want to do some parallel data processing, the multiprocessing coding will dramatically increase the processing speed. This is especially useful when large amounts of data and information are involved.
Of course, Python can be used for the development of website and video games which I haven’t explored yet. Given all the nice features and convenience it brings to science and engineering, Python is a very powerful and useful tool at work.
You can find some very useful information on Python at the links below: