main.py 799 B

123456789101112131415161718192021222324252627
  1. # This is a sample Python script.
  2. # Press Shift+F10 to execute it or replace it with your code.
  3. # Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
  4. import async_communication as rabitmq
  5. def print_hi(name):
  6. # Use a breakpoint in the code line below to debug your script.
  7. print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
  8. def func(msg):
  9. print(msg)
  10. # Press the green button in the gutter to run the script.
  11. if __name__ == '__main__':
  12. rabit=rabitmq.RabbitAsyncCommunicator("192.168.8.201",5672,"zx","123456")
  13. calbbacks=[["AGV_park_command_request_queue",func]]
  14. rabit.Init(calbbacks,None)
  15. rabit.start()
  16. rabit.join()
  17. print_hi('PyCharm')
  18. # See PyCharm help at https://www.jetbrains.com/help/pycharm/