run python script

$ python -i test.py

としてスクリプトを走らせると,スクリプトの実行後にスクリプトで定義された変数が利用できる.デバッグの際に便利.

Pythonではスクリプトの実行前のpythonセッションで定義されている変数を使うことはできないようだ(やり方知っている人は見延に教えて!)

By running a python script

$ python -i test.py

you can use variables that are defined inside of the script, after it's run. This is useful for debugging.

On the other hand, it seems to be impossible to use variables that defined before running the script. If somebody knows a way to do so, please let me (Minobe) know.