python - how to send the output of pprint module to a log file -


i have following code:

logfile=open('c:\\temp\\mylogfile'+'.txt', 'w') pprint.pprint(dataobject) 

how can send contents of dataobject log file on pretty print format ?

pprint.pprint(dataobject, logfile) 

see the documentation


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

php - How can I merge Nodes & Webform Submissions into instances of one general Content Type in Drupal 6? -

xslt - Umbraco and EXSLT sets do not work -