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)
Comments
Post a Comment