[問題] 找出 module 裡面的 class 跟 method

看板Python作者 (reindeer)時間13年前 (2012/11/01 17:58), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
請問一下 我在寫程式的時候 我都會固定 from sandbox import *** 我要的功能 對方寫好一個 sandbox 的 module 可是我找不到 .py 檔 不曉得這是怎麼實現的 用 c++ 寫 封在 dll 檔裡面嗎? 其次因為手冊很多的 class method 都沒寫出來 所以想要自己找看看 sandbox 這個 module 裡面倒底有什麼 class 跟 method 請問這可行嗎 我 print sys.modules['sandbox'] 他就顯示 <module 'sandbox' (built-in)> 請前輩給個提示 謝謝 其次 若知道 module 下個某個 class 了 那有可能找出所有在某個 class 之下的 method 嗎 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.69.42.170 ※ 編輯: largesperm 來自: 219.69.42.170 (11/01 18:04)

11/01 20:38, , 1F
dir 一下看看,或 help / pydoc 之類的也可以看到一些
11/01 20:38, 1F
文章代碼(AID): #1GaaVA2p (Python)
文章代碼(AID): #1GaaVA2p (Python)