Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これは機能します:
from twilio import twiml r = twiml.Response()
しかし
import twilio r = twilio.twiml.Response()
で失敗します
AttributeError: 'module' object has no attribute 'twiml'
なんで?また、「from twilio import stuff」の使用を避けるにはどうすればよいですか?
おそらくサブモジュールもインポートする必要があります。
import twilio.twiml