Shell:~/tools/Py3k/bin >: ./python3.0
Python 3.0 (r30:67503, Dec 4 2008, 23:27:21)
[GCC 3.3.5 (propolice)] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.uname()
('OpenBSD', 'obsd.org', '4.4', 'GENERIC.MP#0', 'i386')
>>> import sys
>>> for line in sys.path: print(line)
...
/home/Py3k/mylibs/lib/Python
/home/Py3k/tools/Py3k/lib/python30.zip
/home/Py3k/tools/Py3k/lib/python3.0
/home/Py3k/tools/Py3k/lib/python3.0/plat-openbsd4
/home/Py3k/tools/Py3k/lib/python3.0/lib-dynload
/home/Py3k/tools/Py3k/lib/python3.0/site-packages
>>>
本文展示了如何在 OpenBSD 4.4 系统上运行 Python 3.0,并列出了 Python 解释器的路径及环境变量 sys.path 的详细内容,这对于理解 Python 在特定操作系统上的工作方式非常有用。
689

被折叠的 条评论
为什么被折叠?



