16.01.2014 Views

Beginning Python - From Novice to Professional

Beginning Python - From Novice to Professional

Beginning Python - From Novice to Professional

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

268 CHAPTER 11 ■ FILES AND STUFF<br />

New Functions in This Chapter<br />

Function<br />

file(name[, mode[, buffering]])<br />

open(name[, mode[, buffering]])<br />

Description<br />

Opens a file and returns a file object<br />

Alias for file; use open rather than file when<br />

opening files<br />

What Now?<br />

So now you know how <strong>to</strong> interact with the environment through files; but what about interacting<br />

with the user? So far we’ve used only input, raw_input, and print, and unless the user writes<br />

something in a file that your program can read, you don’t really have any other <strong>to</strong>ols for creating<br />

user interfaces. That changes in the next chapter, when I cover graphical user interfaces, with<br />

windows, but<strong>to</strong>ns, and so on.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!