@@ -64,54 +64,57 @@ msgid ""
6464":file:`mathmodule.c`, somewhere in a C source directory (not on the Python "
6565"Path)."
6666msgstr ""
67+ "如果你找不到一个模块的源文件,可能它是一个内建的模块,或是使用 C,C++ "
68+ "或其他编译型语言编写的动态加载模块。这种情况下是没有源码文件的,或者有也是类似 :file:`mathmodule.c` 这样存放在 C "
69+ "代码目录的文件(但不在 Python 目录中)。"
6770
6871#: ../../faq/library.rst:35
6972msgid "There are (at least) three kinds of modules in Python:"
70- msgstr ""
73+ msgstr "Python 中(至少)有三类模块: "
7174
7275#: ../../faq/library.rst:37
7376msgid "modules written in Python (.py);"
74- msgstr ""
77+ msgstr "使用 Python 便携的模块(.py); "
7578
7679#: ../../faq/library.rst:38
7780msgid ""
7881"modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc);"
79- msgstr ""
82+ msgstr "使用 C 编写的动态加载库(.dll,.pyd,.so,.sl 等); "
8083
8184#: ../../faq/library.rst:39
8285msgid ""
8386"modules written in C and linked with the interpreter; to get a list of "
8487"these, type::"
85- msgstr ""
88+ msgstr "使用 C 编写并链接到解释器的模块,要获取这种模块的列表,输入: "
8689
8790#: ../../faq/library.rst:47
8891msgid "How do I make a Python script executable on Unix?"
89- msgstr ""
92+ msgstr "在 Unix 中怎样让 Python 脚本可执行? "
9093
9194#: ../../faq/library.rst:49
9295msgid ""
9396"You need to do two things: the script file's mode must be executable and the"
9497" first line must begin with ``#!`` followed by the path of the Python "
9598"interpreter."
96- msgstr ""
99+ msgstr "你需要做两件事:文件必须是可执行的,并且第一行需要以 ``#!`` 开头,后面跟上 Python 解释器的路径。 "
97100
98101#: ../../faq/library.rst:53
99102msgid ""
100103"The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod "
101104"755 scriptfile``."
102- msgstr ""
105+ msgstr "第一点可以执行 ``chmod +x scriptfile`` 或是 ``chmod 755 scriptfile``。 "
103106
104107#: ../../faq/library.rst:56
105108msgid ""
106109"The second can be done in a number of ways. The most straightforward way is"
107110" to write ::"
108- msgstr ""
111+ msgstr "第二点有很多种写法,最直接的方式是: "
109112
110113#: ../../faq/library.rst:61
111114msgid ""
112115"as the very first line of your file, using the pathname for where the Python"
113116" interpreter is installed on your platform."
114- msgstr ""
117+ msgstr "在文件第一行,使用安装在你所在平台的 Python 解释器的路径。 "
115118
116119#: ../../faq/library.rst:64
117120msgid ""
@@ -120,13 +123,15 @@ msgid ""
120123"variants support the following, assuming the Python interpreter is in a "
121124"directory on the user's :envvar:`PATH`::"
122125msgstr ""
126+ "如果你希望脚本不关心 Python 解释器的具体路径,你也可以使用 :program:`env` 程序。几乎所有的 Unix "
127+ "变种都支持下面的写法,假设你的 Python 解释器所在目录已经添加到了 :envvar:`PATH` 环境变量中:"
123128
124129#: ../../faq/library.rst:71
125130msgid ""
126131"*Don't* do this for CGI scripts. The :envvar:`PATH` variable for CGI "
127132"scripts is often very minimal, so you need to use the actual absolute "
128133"pathname of the interpreter."
129- msgstr ""
134+ msgstr "*不要*在 CGI 脚本中这么做,CGI 脚本中的 :envvar:`PATH` 环境变量通常会非常短,所以你需要使用解释器的绝对路径。 "
130135
131136#: ../../faq/library.rst:75
132137msgid ""
0 commit comments