pub.py 289 B

12345678910111213141516171819
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter mqtt
  5. name:pub.py
  6. author:rabin
  7. """
  8. from connect import Connect
  9. class Pub(object):
  10. def __init__(self):
  11. Connect(self)
  12. def __del__(self):
  13. pass
  14. def push(self, key, msg):
  15. self.connect.getClient().publish(key,msg)