[IPython-user] OS X: symbolic links, module paths, logging module
Ville M. Vainio
vivainio@gmail....
Tue May 13 04:05:37 CDT 2008
On Mon, May 12, 2008 at 8:49 AM, Jussi Rasinmäki
<jussi.rasinmaki@simosol.fi> wrote:
> 1) I use symbolic links as shortcuts to my script from data
> folders on Mac. First I %ran the script from IPython from the first
> data folder, then decided to switch to a different folder (and delete
> the symbolic link in the first folder), %cd to the other one and again
> %run the script. The script has a bug, and the Traceback's filepath
> for the script is the one for the first run using the already deleted
> symbolic link.
> I guess this is the reason why I don't seem to be able to set breakpoints
> for the module in pdb. This persists even after restarting ipython.
> How do I fix this?
I have no clue at this point. Certainly restarting ipython should fix this...
> 2) The script uses the logging module to log messages. The
> successive %runs within IPython result in multiple console log
> messages. On the second run each message shows up twice on the screen,
> on the third run three time etc. Fix for this?
Ty reload(logging). You probably set up multiple loggers in the
logging module global space, and the old ones don't disappear between
%run:s.
--
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user
mailing list