daily pastebin goal
75%
SHARE
TWEET

torvald

a guest Jun 10th, 2012 131 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2.  
  3. from pyrowl import Pyrowl
  4. from pprint import pprint
  5. import os, sys
  6.  
  7. p = None
  8.  
  9. def main(keys):
  10.     global p
  11.     pkey = None
  12.    
  13.     p = Pyrowl()
  14.     if os.path.isfile("myproviderkey"):
  15.         pkey = open("myproviderkey",'r').readline().strip()
  16.         p.providerkey(pkey)
  17.  
  18.     p.addkey(keys)
  19.     prio = 0
  20.     if len(sys.argv) == 6:
  21.         prio = sys.argv[5]
  22.     res = p.push(sys.argv[1],sys.argv[2],sys.argv[3], sys.argv[4], prio, batch_mode=False)
  23.     pprint(res)
  24.    
  25. if __name__ == "__main__":
  26.     if len(sys.argv) < 5:
  27.         print "Need args!"
  28.         sys.exit()
  29.    
  30.     keys = ['your key goes here mr']
  31.     main(keys)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top