2013-02-19 8 views
5

Wie aktiviere ich in IPython das Standarddrucken? Ich habe nirgendwo klare Anweisungen gefunden, wie das geht. Vielen Dank!Pretty-Druck standardmäßig in IPython aktivieren

+0

Es ist standardmäßig in Ubuntu aktiviert. Was benutzt du? –

+1

Dieser [Forenthread] (http://grokbase.com/t/scipy.org/ipython-user/12b9kbt2kv/pretty-print-as-default-print-function) hatte das gleiche Problem wie Sie. Ich würde es überprüfen! – xxmbabanexx

+1

Wollen Sie nur die Out-Zeilen in IPython anstelle von 'print (repr (_))', oder wollen Sie jeden Anruf an 'print' zu' pprint.pprint' statt, oder so ähnlich? – abarnert

Antwort

3
$ ipython help notebook | grep pprint -A1 
--pprint 
    Enable auto pretty printing of results. 
-- 
--no-pprint 
    Disable auto auto pretty printing of results. 


$ ipython help console | grep pprint -A1 
--pprint 
    Enable auto pretty printing of results. 
-- 
--no-pprint 
    Disable auto auto pretty printing of results.