summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/atexit.rst4
-rw-r--r--Doc/library/cgi.rst2
-rw-r--r--Doc/library/imghdr.rst2
-rw-r--r--Doc/library/mailcap.rst4
-rw-r--r--Doc/library/nntplib.rst2
-rw-r--r--Doc/library/optparse.rst4
-rw-r--r--Doc/library/pipes.rst6
-rw-r--r--Doc/library/sqlite3.rst4
-rw-r--r--Doc/library/trace.rst4
-rw-r--r--Doc/library/zipimport.rst10
10 files changed, 21 insertions, 21 deletions
diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst
index 7c76bab..01cf379 100644
--- a/Doc/library/atexit.rst
+++ b/Doc/library/atexit.rst
@@ -67,7 +67,7 @@ automatically when the program terminates without relying on the application
making an explicit call into this module at termination. ::
try:
- _count = int(open("/tmp/counter").read())
+ _count = int(open("counter").read())
except IOError:
_count = 0
@@ -76,7 +76,7 @@ making an explicit call into this module at termination. ::
_count = _count + n
def savecounter():
- open("/tmp/counter", "w").write("%d" % _count)
+ open("counter", "w").write("%d" % _count)
import atexit
atexit.register(savecounter)
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index 21509d1..478c95a 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -79,7 +79,7 @@ program to users of your script, you can have the reports saved to files
instead, with code like this::
import cgitb
- cgitb.enable(display=0, logdir="/tmp")
+ cgitb.enable(display=0, logdir="/path/to/logdir")
It's very helpful to use this feature during script development. The reports
produced by :mod:`cgitb` provide information that can save you a lot of time in
diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst
index 32ec9cf..9e89523 100644
--- a/Doc/library/imghdr.rst
+++ b/Doc/library/imghdr.rst
@@ -65,6 +65,6 @@ to this variable:
Example::
>>> import imghdr
- >>> imghdr.what('/tmp/bass.gif')
+ >>> imghdr.what('bass.gif')
'gif'
diff --git a/Doc/library/mailcap.rst b/Doc/library/mailcap.rst
index 4bb31bf..8115e42 100644
--- a/Doc/library/mailcap.rst
+++ b/Doc/library/mailcap.rst
@@ -71,6 +71,6 @@ An example usage::
>>> import mailcap
>>> d=mailcap.getcaps()
- >>> mailcap.findmatch(d, 'video/mpeg', filename='/tmp/tmp1223')
- ('xmpeg /tmp/tmp1223', {'view': 'xmpeg %s'})
+ >>> mailcap.findmatch(d, 'video/mpeg', filename='tmp1223')
+ ('xmpeg tmp1223', {'view': 'xmpeg %s'})
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
index 247efb7..ef8b9b5 100644
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -47,7 +47,7 @@ To post an article from a binary file (this assumes that the article has valid
headers, and that you have right to post on the particular newsgroup)::
>>> s = nntplib.NNTP('news.gmane.org')
- >>> f = open('/tmp/article.txt', 'rb')
+ >>> f = open('article.txt', 'rb')
>>> s.post(f)
'240 Article posted successfully.'
>>> s.quit()
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 6a03edf..13395b6 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -171,10 +171,10 @@ required option
For example, consider this hypothetical command-line::
- prog -v --report /tmp/report.txt foo bar
+ prog -v --report report.txt foo bar
``-v`` and ``--report`` are both options. Assuming that ``--report``
-takes one argument, ``/tmp/report.txt`` is an option argument. ``foo`` and
+takes one argument, ``report.txt`` is an option argument. ``foo`` and
``bar`` are positional arguments.
diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst
index 016a720..69e891d 100644
--- a/Doc/library/pipes.rst
+++ b/Doc/library/pipes.rst
@@ -26,12 +26,12 @@ The :mod:`pipes` module defines the following class:
Example::
>>> import pipes
- >>> t=pipes.Template()
+ >>> t = pipes.Template()
>>> t.append('tr a-z A-Z', '--')
- >>> f=t.open('/tmp/1', 'w')
+ >>> f = t.open('pipefile', 'w')
>>> f.write('hello world')
>>> f.close()
- >>> open('/tmp/1').read()
+ >>> open('pipefile').read()
'HELLO WORLD'
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 28edfcf..0d7baef 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -18,10 +18,10 @@ with the DB-API 2.0 specification described by :pep:`249`.
To use the module, you must first create a :class:`Connection` object that
represents the database. Here the data will be stored in the
-:file:`/tmp/example` file::
+:file:`example.db` file::
import sqlite3
- conn = sqlite3.connect('/tmp/example')
+ conn = sqlite3.connect('example.db')
You can also supply the special name ``:memory:`` to create a database in RAM.
diff --git a/Doc/library/trace.rst b/Doc/library/trace.rst
index c4ddc56..9b52f7d 100644
--- a/Doc/library/trace.rst
+++ b/Doc/library/trace.rst
@@ -201,7 +201,7 @@ A simple example demonstrating the use of the programmatic interface::
# run the new command using the given tracer
tracer.run('main()')
- # make a report, placing output in /tmp
+ # make a report, placing output in the current directory
r = tracer.results()
- r.write_results(show_missing=True, coverdir="/tmp")
+ r.write_results(show_missing=True, coverdir=".")
diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
index 4f17092..60b2bd1 100644
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -16,7 +16,7 @@ Typically, :data:`sys.path` is a list of directory names as strings. This modul
also allows an item of :data:`sys.path` to be a string naming a ZIP file archive.
The ZIP archive can contain a subdirectory structure to support package imports,
and a path within the archive can be specified to only import from a
-subdirectory. For example, the path :file:`/tmp/example.zip/lib/` would only
+subdirectory. For example, the path :file:`example.zip/lib/` would only
import from the :file:`lib/` subdirectory within the archive.
Any files may be present in the ZIP archive, but only files :file:`.py` and
@@ -144,8 +144,8 @@ Examples
Here is an example that imports a module from a ZIP archive - note that the
:mod:`zipimport` module is not explicitly used. ::
- $ unzip -l /tmp/example.zip
- Archive: /tmp/example.zip
+ $ unzip -l example.zip
+ Archive: example.zip
Length Date Time Name
-------- ---- ---- ----
8467 11-26-02 22:30 jwzthreading.py
@@ -154,8 +154,8 @@ Here is an example that imports a module from a ZIP archive - note that the
$ ./python
Python 2.3 (#1, Aug 1 2003, 19:54:32)
>>> import sys
- >>> sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path
+ >>> sys.path.insert(0, 'example.zip') # Add .zip file to front of path
>>> import jwzthreading
>>> jwzthreading.__file__
- '/tmp/example.zip/jwzthreading.py'
+ 'example.zip/jwzthreading.py'