fork download
  1. # your code goes here
  2.  
  3. #2020-01-10 13:00:00,123 xxxxxx started xxxxxxxx
  4. 2020-01-10 13:00:00,123 xxxxxxx xxxxx xxxx. Xxxxxz
  5. 2020-01-10 13:00:00,123 xxxx xxxx stored 9999 xxxxx xxxx
  6. 2020-01-10 13:00:00,123 xxxx xxxx xxx finished
  7.  
  8. #!usr/bin/python
  9. # -*- coding: utf-8 -*-
  10.  
  11. import os, datetime, json, re
  12.  
  13.  
  14. with open ('/' + 'home' + '/' + os.getlogin() + '/' + 'components' + '/' + 'mc-feed' + '/' + 'logs'+ '/'+ 'mc-feed.log', 'r') as reading:
  15. line=reading.read()
  16. regex = re.findall(r'\d+.*07.*?started\s+BLOOMBERG_QUOTE_CANDLE(.*?(?:stored\s+(\d+)\s+)?)finished.BLOOMBERG_QUOTE_CANDLE', line, re.DOTALL)
  17. if regex:
  18. for res1, res2 in regex:
  19. print res2
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError:   File "prog.py", line 4
    2020-01-10 13:00:00,123 xxxxxxx xxxxx xxxx. Xxxxxz
                ^
SyntaxError: invalid syntax

stdout
Standard output is empty