Python Scripting for Computational ScienceSpringer Science & Business Media, 2009 M01 9 - 756 pages Numerous readers of the second edition have noti?ed me about misprints and possible improvements of the text and the associated computer codes. The resulting modi?cations have been incorporated in this new edition and its accompanying software. The major change between the second and third editions, however, is caused by the new implementation of Numerical Python, now called numpy. The new numpy package encourages a slightly di?erent syntax compared to the old Numeric implementation, which was used in the previous editions. Since Numerical Python functionality appears in a lot of places in the book, there are hence a huge number of updates to the new suggested numpy syntax, especially in Chapters 4, 9, and 10. The second edition was based on Python version 2.3, while the third edition contains updates for version 2.5. Recent Python features, such as generator expressions (Chapter 8.9.4), Ctypes for interfacing shared libraries in C (Chapter 5.2.2), the with statement (Chapter 3.1.4), and the subprocess module for running external processes (Chapter 3.1.3) have been exempli?ed to make the reader aware of new tools. Chapter 4.4.4 is new and gives a taste of symbolic mathematics in Python. |
Contents
Introduction | 1 |
Getting Started with Python Scripting 27 | 26 |
1 Become familiar with the electronic documentation | 31 |
5 Use standard inputoutput instead of files | 44 |
13 Compute time step values in the simviz1 py script | 57 |
16 Combine twocolumn data files to a multicolumn file | 71 |
Basic Python | 73 |
1 Write format specifications in printfstyle | 106 |
Introduction to GUI Programming | 227 |
Web Interfaces and CGI Programming | 295 |
Advanced Python | 319 |
Fortran Programming with NumPy Arrays | 451 |
More Advanced GUI Programming | 529 |
Tools and Examples 605 | 604 |
A Setting up the Required Software Environment | 677 |
B Elements of Software Engineering | 689 |
Other editions - View all
Common terms and phrases
alternative application arguments automatically basic button Chapter command command-line compiled complete computing construction contains convenient convert copy corresponding create data structures defined dictionary different documentation double elements entry environment error example execute Exercise explained extension extract F2PY file first format Fortran func function grid implementation import initial input install instance integration interface label languages look loop match means method module Numerical Python NumPy arrays object operations option output pack package parameters perform plot points present problem Python reference regular expression requires result script simple simulation simviz1.py solution specific standard statement step stored string SWIG syntax tuple variable vectorized visualization widget window wrapper write