Python 3 for Absolute Beginners

Front Cover
Apress, Mar 10, 2010 - Computers - 300 pages
0 Reviews
As you’ve seen, text is integral to most Python programs, and you saw how often of our examples use it. We take text input from users, manipulate that text, and display messages in response. This is why Python comes with so many text-related features. In this chapter, you learned how to split and join strings; format, edit, and search for strings; use regular expressions to search for patterns within strings; and work with the files on your file system. We then applied much of this in our example application. 160 C H A P T E R 8 ? ? ? Executable Files, Organization, and Python on the Web Up to this point, you’ve been running your scripts via the python interpreter. This is all well and good, but it would be nice if we could get the scripts to run by themselves, just like real programs, so that’s just what we'll look at first. I’ll then cover how to organize and spruce up your code, because clean, organized code makes you more efficient and gives you time to write even more lovely Python code. This leads us onto some of the dynamic features of Python: modules and the exec() and eval() functions. These features give you more flexibility and choice when writing Python applications.
 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Introducing Python
1
Designing Software
9
Variables and Data Types
27
Making Choices
49
Using Lists
75
Functions
101
Working with Text
125
Executable Files Organization and Python on the Web
161
Classes
181
Exceptions
221
Reusing Code with Modules and Packages
241
Simple Windowed Applications
261
Index
283
Copyright

Other editions - View all

Common terms and phrases

About the author (2010)

Tim Hall currently provides front-line support for 64 Studio. He has also written newbie tutorials for Linux User and Developer magazine in between more mundane system admin and web authoring jobs. Tim has released albums and performed as a musician and songwriter, both solo and in collaboration with other artists. He has been further honored as the holder of the Bardic chair of Glastonbury between 2005 and 2007. Tim uses Python as his main programming language, primarily as a means for creative ends, because it is easy to read and fun to learn.