asterisms

This commit is contained in:
Mark Pilgrim
2009-10-06 11:34:19 -04:00
parent 27ac1b783b
commit e088b76ba8
+4
View File
@@ -20,6 +20,8 @@ body{counter-reset:h1 3}
<h2 id=divingin>Diving In</h2>
<p class=f>This chapter will teach you about list comprehensions, dictionary comprehensions, and set comprehensions: three related concepts centered around one very powerful technique. But first, I want to take a little detour into two modules that will help you navigate your local file system.
<p class=a>&#x2042;
<h2 id=os>Working With Files And Directories</h2>
<p>Python 3 comes with a module called <code>os</code>, which stands for &#8220;operating system.&#8221; The <a href=http://docs.python.org/3.1/library/os.html><code>os</code> module</a> contains a plethora of functions to get information on&nbsp;&mdash;&nbsp;and in some cases, to manipulate&nbsp;&mdash;&nbsp;local directories, files, processes, and environment variables. Python does its best to offer a unified <abbr>API</abbr> across <a href=installing-python.html>all supported operating systems</a> so your programs can run on any computer with as little platform-specific code as possible.
@@ -191,6 +193,8 @@ body{counter-reset:h1 3}
<samp class=p>>>> </samp><kbd class=pp>print(os.path.realpath('feed.xml'))</kbd>
<samp class=pp>c:\Users\pilgrim\diveintopython3\examples\feed.xml</samp></pre>
<p class=a>&#x2042;
<h2 id=listcomprehension>List Comprehensions</h2>
<aside>You can use any Python expression in a list comprehension.</aside>