Skip to main content

Part of the book series: Texts in Computational Science and Engineering ((TCSE,volume 3))

  • 12k Accesses

This chapter extends the overview of Python functionality in Chapter 3. Miscellaneous topics like modules for parsing command-line arguments and how to generate Python code at run time are discussed in Chapter 8.1. The comprehensive Chapter 8.2 is devoted to regular expressions for interpreting and editing text. Lots of tools for storing and retrieving data in files are covered in Chapter 8.3, while Chapter 8.4 explores compact file storage of numerical data represented as NumPy arrays. Chapter 8.5 outlines methods for working with a local and a remote host when doing tasks like simulation and visualization. Chapter 8.6 treats numerous topics related to class programming. Chapter 8.7 discusses scope of variables. Error handling via exceptions is described in Chapter 8.8. Extending for loops to iterate over user-defined data structures via Python iterators is the subject of Chapter 8.9. Finally, in Chapter 8.10 we present methods for investigating the efficiency of a script and provide some advice on optimizing Python codes.

Readers who are interested in more advanced Python material are highly recommended to read the “Python Cookbook” [23].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 64.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

(2009). Advanced Python. In: Langtangen, H.P. (eds) Python Scripting for Computational Science. Texts in Computational Science and Engineering, vol 3. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-73916-6_8

Download citation

Publish with us

Policies and ethics