Advertisement
Guest User

Untitled

a guest
Jul 31st, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. import csv
  2.  
  3. accounts_file = "accounts.txt"
  4. locations_file = "locations.txt"
  5.  
  6. runner_template = "nohup python ../../runserver.py -ns -k \"[GMAPS_KEY]\" -l \"{location}\" -u \"{username}\" -p \"{password}\" -st 3 &"
  7. starting_line = "nohup python ../../runserver.py -os -k \"[GMAPS_KEY]\" -l \"[SOME LOCATION HERE]\" &"
  8.  
  9.  
  10. print(starting_line)
  11. with open(accounts_file) as accounts_csvfile:
  12. with open(locations_file) as locations:
  13. accounts = csv.reader(accounts_csvfile)
  14.  
  15. for account, location in zip(accounts, locations):
  16. username, password = account
  17. # print(username, password, lat, lon)
  18. print(runner_template.format(username=username, password=password, location=location.strip()))
  19.  
  20. print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement