django - How to pass arguments to an already running python program? -
i'm using django framwork, , have pass new query python script. however, python program have read large data file, , takes 2 minutes load data. want load data once, , pass new query running python program, fast enough web users. unfortunately, have searched lot, still don't know how implement it.
one method read communication file:
oldid = -1 while true: f = open("communication","r") t = f.read() f.close() t = t.split("==") id = int(t[0]) query = t[1] if id > oldid: # query not handled yet stuff handle query ... oldid = id
you write file looks so: id==query replace id , query wishes. count id +1 if push new query. use script that.
Comments
Post a Comment