[問題] 有關package使用方式

看板Python作者 (討厭虛情假意的人)時間12年前 (2012/01/09 20:02), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
小弟想請問一下關於package使用方式 / test.py abc/ __init__.py a.py In a.py def x(x): print 'a is called' In test.py import abc abc.a.x() __init__.py is an empty file. 但是在/下執行python test.py卻沒有成功 File "test.py", line 2, in <module> abc.a.x() 請問是哪裡出錯了呢 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.218.116 ※ 編輯: kalawang 來自: 140.112.218.116 (01/09 20:02)
文章代碼(AID): #1F2jTGC_ (Python)
文章代碼(AID): #1F2jTGC_ (Python)