Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/stdlib.rst @ 66497:c82ca3beb4df 2.7
Merged revisions 86794,86798,86801 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86794 | georg.brandl | 2010-11-26 12:50:13 +0100 (Fr, 26 Nov 2010) | 1 line
#10526: fix typo.
........
r86798 | georg.brandl | 2010-11-26 13:05:48 +0100 (Fr, 26 Nov 2010) | 1 line
#10420: fix docs of bdb.effective().
........
r86801 | georg.brandl | 2010-11-26 13:12:14 +0100 (Fr, 26 Nov 2010) | 1 line
Better example for os.system(): do not change the system time.
........
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 26 Nov 2010 18:26:04 +0000 |
| parents | 83ef67526011 |
| children | 063a052af878 |
line wrap: on
line diff
--- a/Doc/tutorial/stdlib.rst Fri Nov 26 17:35:50 2010 +0000 +++ b/Doc/tutorial/stdlib.rst Fri Nov 26 18:26:04 2010 +0000 @@ -14,11 +14,11 @@ operating system:: >>> import os - >>> os.system('time 0:02') - 0 >>> os.getcwd() # Return the current working directory 'C:\\Python26' - >>> os.chdir('/server/accesslogs') + >>> os.chdir('/server/accesslogs') # Change current working directory + >>> os.system('mkdir today') # Run the command mkdir in the system shell + 0 Be sure to use the ``import os`` style instead of ``from os import *``. This will keep :func:`os.open` from shadowing the built-in :func:`open` function which
