In this eBook we’ll present some fascinating insights into the current performance of product development teams, including comparing the tools used by successful teams to those of their less successful counterparts.

I have recently been experimenting with Python + numpy and scipy; combined with PyXll to talk to Excel. It seems to me to be a good way of getting round Excel's main limitation for engineering work (i.e. the lack of good heavy-duty numerical analysis routines), although the need to work in a new language slows things down at first.

Anyone else using Python for engineering work?

Any recommended engineering applications or good documentation/help resources would be much appreciated.

I'm using it more and more. We've used it for scripting (running tests, controlling builds, etc.) for a while, but the big incentive lately was that we decided to abandon Matlab. A popular alternative (though not a clone in the spirit of Octave) is IPython. It's a confusing world of packages and GUIs and consoles though. Ended up installing Python(x,y) which bundles together all the important bits, though it's still not clear where to go for what.

While not directly related to Excel, I found the following two websites useful general resources:

Since the cost of Matlab is monotonically increasing, it would make sense that at some point in time, some people will abandon Matlab in favor of Python or Octave. I would expect, though, that Octave will be more prevalent than Python, mainly because Octave at least has some claim to compatibility with Matlab. The issue with Python would be the uncertainty of compatibility of any given routine with and given version of Python. The proliferation of Python versions would be an impediment to any company looking to have maximal compatibility with available code.

I don't see code incompatibility as being a problem. At some point somebody will write a translator which will turn m files into py. That may not be efficient py code, but cpu time is cheap.

I write most of my matlab stuff in octave compatible code anyway, so of the two alternatives I am more likely to stick with octave. That being said it wouldn't kill me to get a working py environment up and running, as we already have large slabs of the GUI for my main programs written in py.

Thanks for the links LiteYear. I have also found the number of different packages confusing. I ended up installing Anaconda with Python 2.7 (although I also have WinPython 3.3 installed, which doesn't seem to cause any difficulties, so far).

My main reasons for going with Python rather than Octave were:
- It seems to be much easier to integrate with Excel (with the help of PyXll).
- The Strand7 API has interfaces for Matlab and Python, but not Octave. Trying to convert from Matlab to a partial clone, in a language I know nothing about, seemed like asking for trouble.
- Python is (it seems) more flexible, and probably has a bigger developer community.

This Python stuff sounds really interesting, but climbing the learning curve on another language is an unenvious proposition.

So I ask, what advantages does Python have over my old favs Fortran and Excel VBA?

I have done some stuff linking Excel to Fortran via VBA, and it worked well, but it doesn't seem to work since I moved to 64 bit Windows. It would probably be fairly simple to fix, but I haven't found the time to look at it.

The main advantages of Python are:

There are extensive libraries linking to high performance compiled code, and these seem to be under more active development than Fortran.

Using PyXll it's very easy to call these libraries, either directly from a User Defined Function, or via VBA.

It is also very easy to develop routines in VBA, then link to compiled routines, via PyXll and Python, for the calculation intensive bits.

The main disadvantage compared with linking Excel directly to a compiled language is that pure Python seems to be even slower than VBA, although there are easy to use ways to speed it up, which from my limited testing seem to work very well.

I guess the main reason for adopting Python, other than that I enjoy dabbling with this stuff, is that I see it as a way of future-proofing for the days when VBA and/or Excel become just another programming tool that old people used to use once.

By the way, since starting this thread I have posted a series of articles on Python for VBA users, which might be of interest to others starting on that path:

I don't primarily use Python for every day use.
But, I have used it many times before for statistical calculations.

Since reading this thread I tried to use if for scientific things I would normally use Matlab or Maple, Octave for.
But, the scientific libraries for Mac OSX are a serious pain to install. With a net search this seems to be a widespread issue.
If anyone here uses Python for engineering on OSX let me know. Thanks.

"Simplicity is the ultimate sophistication." L. da Vinci
G. Coppola

I just remembered I used another very useful Open source computational language before.
It is very useful and similar to Octave. It although has a better interface imo than Octve. http://www.scilab.org/

"Simplicity is the ultimate sophistication." L. da Vinci
- Gian

Yup Scilab is much prettier, more modern and more actively developed than Octave. Sadly it is less compatible with Matlab. I can write Octave at home and be fairly confident that the same code will run on Matlab with very few tweeks. Converting Scilab to Matlab is nowhere near as easy.

scilab can come with scicos if dynamic block-based modelling is your thing. It even claims to support Modelica, although that bit was quite immature when I last looked into it.

Industrial equipment is becoming more interconnected and automated. However, leaving the big data gathered from automation unanalyzed ignores business values. Download Now

Products are getting smarter. Things that were once merely physical are now becoming digital, imbued with intelligence and connectivity to keep pace with the modern world Download Now

## RE: Python/Excel for engineers

While not directly related to Excel, I found the following two websites useful general resources:

http://wiki.scipy.org/NumPy_for_Matlab_Users

http://matplotlib.org/users/navigation_toolbar.htm...

## RE: Python/Excel for engineers

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers

## RE: Python/Excel for engineers

I write most of my matlab stuff in octave compatible code anyway, so of the two alternatives I am more likely to stick with octave. That being said it wouldn't kill me to get a working py environment up and running, as we already have large slabs of the GUI for my main programs written in py.

Cheers

Greg Locock

New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?

## RE: Python/Excel for engineers

My main reasons for going with Python rather than Octave were:

- It seems to be much easier to integrate with Excel (with the help of PyXll).

- The Strand7 API has interfaces for Matlab and Python, but not Octave. Trying to convert from Matlab to a partial clone, in a language I know nothing about, seemed like asking for trouble.

- Python is (it seems) more flexible, and probably has a bigger developer community.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

So I ask, what advantages does Python have over my old favs Fortran and Excel VBA?

## RE: Python/Excel for engineers

This IDE is useful: http://www.jetbrains.com/pycharm/

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

I have done some stuff linking Excel to Fortran via VBA, and it worked well, but it doesn't seem to work since I moved to 64 bit Windows. It would probably be fairly simple to fix, but I haven't found the time to look at it.

The main advantages of Python are:

- There are extensive libraries linking to high performance compiled code, and these seem to be under more active development than Fortran.
- Using PyXll it's very easy to call these libraries, either directly from a User Defined Function, or via VBA.
- It is also very easy to develop routines in VBA, then link to compiled routines, via PyXll and Python, for the calculation intensive bits.

The main disadvantage compared with linking Excel directly to a compiled language is that pure Python seems to be even slower than VBA, although there are easy to use ways to speed it up, which from my limited testing seem to work very well.I guess the main reason for adopting Python, other than that I enjoy dabbling with this stuff, is that I see it as a way of future-proofing for the days when VBA and/or Excel become just another programming tool that old people used to use once.

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

http://newtonexcelbach.wordpress.com/2013/09/24/py...

Doug Jenkins

Interactive Design Services

http://newtonexcelbach.wordpress.com/

## RE: Python/Excel for engineers

But, I have used it many times before for statistical calculations.

Since reading this thread I tried to use if for scientific things I would normally use Matlab or Maple, Octave for.

But, the scientific libraries for Mac OSX are a serious pain to install. With a net search this seems to be a widespread issue.

If anyone here uses Python for engineering on OSX let me know. Thanks.

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

"Simplicity is the ultimate sophistication." L. da Vinci

G. Coppola

## RE: Python/Excel for engineers

It is very useful and similar to Octave. It although has a better interface imo than Octve.

http://www.scilab.org/

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

Cheers

Greg Locock

New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?

## RE: Python/Excel for engineers

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

http://help.scilab.org/docs/5.3.3/en_US/mfile2sci....

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

It converted:

## CODE -->

to

## CODE -->

Also, seems that Matlab runs the code same faster. Interesting.

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian

## RE: Python/Excel for engineers

- Steve

## RE: Python/Excel for engineers

Although, the direct programming of scripts seems to be almost on par with matlab in terms of functionality.

"Simplicity is the ultimate sophistication." L. da Vinci

- Gian