문제

64-bit Vista, Python 2.6, IPython 0.10

I want to try logging everything I do, so I set

o.log = 1

in my ipy_user_conf.py .

But logging doesn't start. It will if I enter "logstart" at the prompt. But what's the problem with 'o.log = 1'?

도움이 되었습니까?

해결책

Where does your ipy_user_conf.py reside? If you are editing the Python26\Lib\site-packages\IPython\UserConfig file, chances are it doesn't even get loaded in the first place.

The right file is in %USERPROFILE%\_ipython, editing that should do the trick.

Also, I'd suggest using

o.autoexec.append('%logstart <option>')

that way, you can configure logging using the regular magic command.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top