我想我明白你在找什麼,但如果我沒有正確理解你,請發表評論。
完成你正在尋找的最簡單的方法之一就是使用python提示符本身。如果你把所有程序放在一個文件中(確保沒有重疊的名字),那麼你可以從一個程序調用這些函數,稱之爲masterprogram.py 在你的提示符下,然後導入masterprogram開始
運行dir(masterprogram)
將列出您的主程序的所有功能,並且運行help(masterprogram.somefunction)
將打印該功能的文檔。
如果你想如何這會工作的例子,嘗試打開你的Python提示符運行遵守下列規定:
>>> import math
>>> dir(math)
['__doc__', '__name__', '__package__', 'acos', 'acosh', 'asin', 'asinh', 'atan',
'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'er
fc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gam
ma', 'hypot', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'mod
f', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc']
>>> help(math.ceil)
Help on built-in function ceil in module math:
ceil(...)
ceil(x)
Return the ceiling of x as a float.
This is the smallest integral value >= x.
>>>
什麼是錯的操作系統?它有目錄。 Python有軟件包。那有什麼問題? – 2011-02-28 18:57:18
我很困惑你的問題。 O/s沒有問題 – david 2011-02-28 19:01:48
你可不只是導入所有文件,然後根據用戶輸入選擇哪些功能以獲得樂趣? – amccormack 2011-02-28 19:05:48