This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
logreader-py [2016/04/28 11:40] zoza |
logreader-py [2016/04/28 11:42] zoza |
||
---|---|---|---|
Line 72: | Line 72: | ||
====== logreader.py (wi-fi fingerprints) ====== | ====== logreader.py (wi-fi fingerprints) ====== | ||
+ | |||
+ | <code python> | ||
+ | import dateutil.parser, subprocess, codecs, random, time | ||
+ | |||
+ | logs = subprocess.Popen("ls -RSl *csv | head -10", \ | ||
+ | shell=True, stdout=subprocess.PIPE, \ | ||
+ | stderr=subprocess.PIPE).communicate()[0].strip() | ||
+ | print logs | ||
+ | |||
+ | toRead = raw_input("choose a file: (you can use one from the list above)\n") | ||
+ | fileOut = codecs.open("vizi/visualize.csv", "w", encoding="utf-8") | ||
+ | fileOut.write("user,user_time,positionx,positiony,bajts\n") | ||
+ | </code> |