さて、私はコンピューターを使用する能力に疑問を投げかけるような瞬間があります。これは、最初のSO投稿として私が想像したような質問ではありませんが、ここで説明します。
Zedの新しい「LearnPythontheHard Way」を始めたのは、10年間の休止の後、プログラミングに戻ることを考えていたからです。Pythonは常に私が望んでいたものでした。この本は本当に私に話しかけました。そうは言っても、コマンドからのpydocに深刻な問題があります。システムパスにc:/ python26のすべてのディレクトリがあり、pwdに関係なく、コマンドラインからpydocを正常に実行できますが、引数は受け入れられません。何を入力しても、受け入れ可能な引数を示す標準のpydoc出力が表示されます。
何か案は?その価値については、Zedの提案に従ってActivePythonをインストールしました。
C:\Users\Chevee>pydoc file
pydoc - the Python documentation tool
pydoc.py <name> ...
Show text documentation on something. <name> may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If <name> contains a '\', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.
pydoc.py -k <keyword>
Search for a keyword in the synopsis lines of all available modules.
pydoc.py -p <port>
Start an HTTP server on the given port on the local machine.
pydoc.py -g
Pop up a graphical interface for finding and serving documentation.
pydoc.py -w <name> ...
Write out the HTML documentation for a module to a file in the current
directory. If <name> contains a '\', it is treated as a filename; if
it names a directory, documentation is written for all the contents.
C:\Users\Chevee>
編集:新しい情報、pydocはPowerShellで問題なく動作します。Linuxユーザーとして、なぜとにかくcmdを使おうとしているのかわかりませんが、pydocとcmdがどうなっているのかを理解したいと思っています。
編集2:より多くの新しい情報。cmdで...
c:\>python c:/python26/lib/pydoc.py file
...問題なく動作します。PowerShellのpydocだけで、pwd、拡張機能、パスについて心配することなく、すべてが正常に機能します。