Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/stdlib.rst @ 66490:bf5f4174b8c2
Better example for os.system(): do not change the system time.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 26 Nov 2010 12:12:14 +0000 |
| parents | f923fe55a40c |
| children | b405a7f0aed7 |
line wrap: on
line diff
--- a/Doc/tutorial/stdlib.rst Fri Nov 26 12:10:06 2010 +0000 +++ b/Doc/tutorial/stdlib.rst Fri Nov 26 12:12:14 2010 +0000 @@ -14,11 +14,11 @@ operating system:: >>> import os - >>> os.system('time 0:02') - 0 >>> os.getcwd() # Return the current working directory 'C:\\Python31' - >>> 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
