Script Languages in Science CCOM Student Seminar Series

Post on 08-Jan-2016

28 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Script Languages in Science CCOM Student Seminar Series. Kurt Schwehr 12-Nov-2008. http://vislab-ccom.unh.edu/~schwehr/Classes/2008/. Tides. Python Everywhere. Scripting Languages. bash. Comes with Linux and Mac Windows can get it via “cygwin” - PowerPoint PPT Presentation

Transcript

Script Languages in ScienceCCOM Student Seminar Series

Kurt Schwehr12-Nov-2008

http://vislab-ccom.unh.edu/~schwehr/Classes/2008/

Tides

Python Everywhere

Scripting Languages

bash

• Comes with Linux and Mac• Windows can get it via “cygwin”• Good to use as “glue” to hold it all together• Automate common tasks

Full power of the Unix command line

Why python?

• Support on many operating systems (Windows, Mac, Linux)• More fun to program• Promotes readable code• Many support libraries (modules) including databases,

plotting, geospatial, scientific processing• Used by Arc/GIS• No licenses required / free / open-source• Useful for almost all application types• “Easy” access to C and C++ libraries

Getting Python

• Windows – enthought, cygwin, or python.org• Mac – built in, fink/macports, or python.org• Linux – built in or python.org

Python Books• http://www.coderholic.com/free-python-programming-books/• A Byte of Python - http://www.swaroopch.com/notes/Python• Text Processing in Python - http://gnosis.cx/TPiP/• Thinking In Python - http://www.mindview.net/Books/TIPython

If there is interest, I can teach an in-depth python short course

Python.org and Pypi

Reading a file

How did I collect this data?pyserial!

Parsing the lines

matplotlib

Histograms

projections

ipython

Databases

Scipy

fft

Using libraries in other languages• Almost anything written in C, C++ or Fortran can be

used in Python• There are many ways to accomplish this:– SWIG– SIP– PyInline– CPython– Ctypes– Boost Python– …

Thanks for listening!

top related