Skip to content

Commit fe12390

Browse files
committed
Better example for os.system(): do not change the system time.
1 parent 326c57d commit fe12390

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/tutorial/stdlib.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ The :mod:`os` module provides dozens of functions for interacting with the
1414
operating system::
1515

1616
>>> import os
17-
>>> os.system('time 0:02')
18-
0
1917
>>> os.getcwd() # Return the current working directory
2018
'C:\\Python31'
21-
>>> os.chdir('/server/accesslogs')
19+
>>> os.chdir('/server/accesslogs') # Change current working directory
20+
>>> os.system('mkdir today') # Run the command mkdir in the system shell
21+
0
2222

2323
Be sure to use the ``import os`` style instead of ``from os import *``. This
2424
will keep :func:`os.open` from shadowing the built-in :func:`open` function which

0 commit comments

Comments
 (0)