Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelliao committed Mar 6, 2025
1 parent 5d2bfa4 commit 25e8d8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/books/python/130-io/30-dir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'posix'
```

如果是`posix`,说明系统是`Linux``Unix``Mac OS X`,如果是`nt`,就是`Windows`系统。
如果是`posix`,说明系统是`Linux``Unix``macOS`,如果是`nt`,就是`Windows`系统。

要获取详细的系统信息,可以调用`uname()`函数:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Python的`os`模块封装了常见的系统调用,其中就包括`fork`,可
import os

print('Process (%s) start...' % os.getpid())
# Only works on Unix/Linux/Mac:
# Only works on Unix/Linux/macOS:
pid = os.fork()
if pid == 0:
print('I am child process (%s) and my parent is %s.' % (os.getpid(), os.getppid()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

print("Process (%s) start..." % os.getpid())
# Only works on Unix/Linux/Mac:
# Only works on Unix/Linux/macOS:
pid = os.fork()
if pid == 0:
print("I am child process (%s) and my parent is %s." % (os.getpid(), os.getppid()))
Expand Down

0 comments on commit 25e8d8f

Please sign in to comment.