Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

notebook cell print output to file

%%capture cap --no-stderr
print 'stuff'
with open('output.txt', 'w') as f:
    f.write(cap.stdout)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #notebook #cell #print #output #file
ADD COMMENT
Topic
Name
8+2 =