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.
デバッグしようとしているファイル light.py があります。Python コンソールで「import light」と入力すると、プログラムが実行されます。しかし、変数を入力して、いくつかの変数の内容を確認したいと思います。それ、どうやったら出来るの?
ファイルに名前付きの変数がありtestますlight.py
test
light.py
import light print light.test
プログラムの実行中にテストしたい場合は、pdbを使用して実行をデバッグする必要があります。