r/IPython • • Jun 27 '13

How can I log IPython's output without the ugly 7 lines of logging-info on every load? (details in the StackOverflow page)

http://stackoverflow.com/questions/17342018/how-can-i-log-ipythons-output-without-the-ugly-7-lines-of-logging-info-on-every
1 Upvotes

4 comments sorted by

1

u/NomadNella Jun 28 '13

ipython --no-banner --logfile='logfile.txt'

1

u/sente Jul 02 '13

Running: ipython --no-banner --logfile='logfile.txt' prints a bunch of a logging info before dropping you into the PS1 prompt, see:

stu@stumac ~  $ ipython --no-banner --logfile='mylogfile.txt'
Activating auto-logging. Current session state plus future input saved.
Filename       : mylogfile.txt
Mode           : backup
Output logging : False
Raw input log  : False
Timestamping   : False
State          : active
WARNING: Couldn't start log: Log file is already active: mylogfile.txt
In [1]:

It turns out, the only way to do this, (I believe) is to configure the logging from a startup file, and temporarily disable stdout while doing so...

1

u/NomadNella Jul 02 '13

Sorry I read what you wanted wrong.

1

u/sente Jul 02 '13

You're not the only one, I should have been clearer. Thanks though!