Drukuj komórek notebookowych do pliku

%%capture cap --no-stderr
print 'stuff'
with open('output.txt', 'w') as f:
    f.write(cap.stdout)
Calm Coyote