| 47 | |
| 48 | __oldTime = False |
| 49 | def echoLog(__str): |
| 50 | global __oldTime, __logVerboseFile |
| 51 | |
| 52 | if __logVerboseFile != False: |
| 53 | __logVerboseFileParsed = __logVerboseFile.replace('%DATE%', str(date('%Y-%m-%d'))) |
| 54 | |
| 55 | if __logVerboseFile != False and not os.path.exists(__logVerboseFileParsed): |
| 56 | f = open(__logVerboseFileParsed, 'w') |
| 57 | f.write('<style type="text/css">html { white-space: pre; font-family: Courier New,Courier,Lucida Sans Typewriter,Lucida Typewriter,monospace; }</style>') |
| 58 | f.close() |
| 59 | |
| 60 | if (__oldTime == False) or (__oldTime != date('%H:%M:%S')): |
| 61 | __oldTime = date('%H:%M:%S') |
| 62 | __str = str(__oldTime) + ' | ' + str(__str) |
| 63 | else: |
| 64 | __str = ' ' + ' | ' + str(__str) |
| 65 | |
| 66 | print __str |
| 67 | sys.stdout.flush() |
| 68 | |
| 69 | if __logVerboseFile != False: |
| 70 | f = open(__logVerboseFileParsed, 'a') |
| 71 | f.write(__str + '\n') |
| 72 | f.close() |
| 73 | |
| 74 | |
| 75 | def echoLogJSON(__json): |