Advertisement
Guest User

Untitled

a guest
Apr 7th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. command = ["ipfs", "pubsub", "sub", "GofkZ9GO"]
  2.         while 1:
  3.             process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  4.             output = process.communicate()[0]
  5.             exitCode = process.returncode
  6.  
  7.             if (exitCode == 0):
  8.                 print(output)
  9.                 return output
  10.             else:
  11.                 raise ProcessException(command, exitCode, output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement