Python cookbook

Portable, powerful, and a breeze to use, Python is the popular open source object-oriented programming language used for both standalone programs and scripting applications. It is now being used by an increasing number of major organizations, including NASA and Google. Updated for Python 2.4, The...

Descripción completa

Detalles Bibliográficos
Otros Autores: Martelli, Alex, author (author), Ascher, David (-), Ravenscroft, Anna Martelli, Martelli, Alex
Formato: Libro electrónico
Idioma:Inglés
Publicado: Beijing ; Sebastopol, California : O'Reilly 2005.
Edición:2nd ed
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627124006719
Tabla de Contenidos:
  • Python Cookbook, 2nd Edition; The Implementation of the Book; Using the Code from This Book; Audience; Organization; Further Reading; Conventions Used in This Book; How to Contact Us; Safari® Enabled; Acknowledgments; Alex Martelli; Anna Martelli Ravenscroft; 1. Text; Basic Textual Operations; Sources of Text; String Basics; 1.1. Processing a String One Character at a Time; Solution; Discussion; See Also; 1.2. Converting Between Characters and Numeric Codes; Solution; Discussion; See Also; 1.3. Testing Whether an Object Is String-like; Solution; Discussion; See Also; 1.4. Aligning Strings
  • SolutionDiscussion; See Also; 1.5. Trimming Space from the Ends of a String; Solution; Discussion; See Also; 1.6. Combining Strings; Solution; Discussion; See Also; 1.7. Reversing a String by Words or Characters; Solution; Discussion; See Also; 1.8. Checking Whether a String Contains a Set of Characters; Solution; Discussion; See Also; 1.9. Simplifying Usage of Strings& translate Method; Solution; Discussion; See Also; 1.10. Filtering a String for a Set of Characters; Solution; Discussion; See Also; 1.11. Checking Whether a String Is Text or Binary; Solution; Discussion; See Also
  • 1.12. Controlling CaseSolution; Discussion; See Also; 1.13. Accessing Substrings; Solution; Discussion; See Also; 1.14. Changing the Indentation of a Multiline String; Solution; Discussion; See Also; 1.15. Expanding and Compressing Tabs; Solution; Discussion; See Also; 1.16. Interpolating Variables in a String; Solution; Discussion; See Also; 1.17. Interpolating Variables in a Stringin Python 2.4; Solution; Discussion; See Also; 1.18. Replacing Multiple Patterns in a Single Pass; Solution; Discussion; See Also; 1.19. Checking a String for Any of Multiple Endings; Solution; Discussion
  • See Also1.20. Handling International Text with Unicode; Solution; Discussion; See Also; 1.21. Converting Between Unicode and Plain Strings; Solution; Discussion; See Also; 1.22. Printing Unicode Charactersto Standard Output; Solution; Discussion; See Also; 1.23. Encoding Unicode Data for XML and HTML; Solution; Discussion; See Also; 1.24. Making Some Strings Case-Insensitive; Solution; Discussion; See Also; 1.25. Converting HTML Documents to Texton a Unix Terminal; Solution; Discussion; See Also; 2. Files; Portability and Flexibility; 2.1. Reading from a File; Solution; Discussion; See Also
  • 2.2. Writing to a FileSolution; Discussion; See Also; 2.3. Searching and Replacing Text in a File; Solution; Discussion; See Also; 2.4. Reading a Specific Line from a File; Solution; Discussion; See Also; 2.5. Counting Lines in a File; Solution; Discussion; See Also; 2.6. Processing Every Word in a File; Solution; Discussion; See Also; 2.7. Using Random-Access Input/Output; Solution; Discussion; See Also; 2.8. Updating a Random-Access File; Solution; Discussion; See Also; 2.9. Reading Data from zip Files; Solution; Discussion; See Also; 2.10. Handling a zip File Inside a String; Solution
  • Discussion