jdev - 2019-08-30


  1. aj has joined

  2. lksjdflksjdf has left

  3. moparisthebest has left

  4. moparisthebest has joined

  5. bhaveshsgupta has joined

  6. bhaveshsgupta has left

  7. bhaveshsgupta has joined

  8. bhaveshsgupta has left

  9. bhaveshsgupta has joined

  10. bhaveshsgupta has left

  11. bhaveshsgupta has joined

  12. bhaveshsgupta has left

  13. bhaveshsgupta has joined

  14. bhaveshsgupta has left

  15. bhaveshsgupta has joined

  16. bhaveshsgupta has left

  17. bhaveshsgupta has joined

  18. bhaveshsgupta has left

  19. bhaveshsgupta has joined

  20. bhaveshsgupta has left

  21. bhaveshsgupta has joined

  22. bhaveshsgupta has left

  23. bhaveshsgupta has joined

  24. larma has left

  25. larma has joined

  26. Zash has left

  27. bhaveshsgupta has left

  28. bhaveshsgupta has joined

  29. bhaveshsgupta has left

  30. Zash has joined

  31. bhaveshsgupta has joined

  32. jonas’ has left

  33. jonas’ has joined

  34. bhaveshsgupta has left

  35. bhaveshsgupta has joined

  36. bhaveshsgupta has left

  37. bhaveshsgupta has joined

  38. bhaveshsgupta has left

  39. bhaveshsgupta has joined

  40. bhaveshsgupta has left

  41. bhaveshsgupta has joined

  42. bhaveshsgupta has left

  43. bhaveshsgupta has joined

  44. lksjdflksjdf has joined

  45. bhaveshsgupta has left

  46. bhaveshsgupta has joined

  47. bhaveshsgupta has left

  48. bhaveshsgupta has joined

  49. bhaveshsgupta has left

  50. bhaveshsgupta has joined

  51. marc0s has left

  52. marc0s has joined

  53. bhaveshsgupta has left

  54. MattJ has left

  55. Zash has left

  56. Zash has joined

  57. Zash

    Anyone happen to know about any wokkel pubsub examples I could look at?

  58. bhaveshsgupta has joined

  59. lovetox has joined

  60. bhaveshsgupta has left

  61. bhaveshsgupta has joined

  62. ralphm

    Zash: besides the ones in the repo?

  63. Zash

    ralphm, were there examples specific to *pubsub* that I missed?

  64. ralphm

    ah, crap

  65. ralphm

    let me see if I can point you to some

  66. Zash

    I got as far as making a thing that connects and subscribes to a node

  67. bhaveshsgupta has left

  68. bhaveshsgupta has joined

  69. ralphm

    I have code using it, of course, e.g. in ikDisplay, but that's not really an easy example.

  70. ralphm

    Zash: maybe I can help you with something specific?

  71. Zash

    Actually, I might be a point where I'd wanna read docs on how to interact with the XML data.

  72. ralphm

    Zash: I assume you have implemented an itemsReceived method on your subclass of PubSubClient?

  73. ralphm

    Then, the only arguments is `events`, and it has an `items` attribute you can inspect

  74. Zash

    https://cerdale.zash.se/upload/jlSf-ddwwUkewp1n/pubsub-example.tac

  75. ralphm

    Right. So an item here is one of these: https://wokkel.ik.nu/documentation/current/api/wokkel.pubsub.Item.html

  76. Daniel has left

  77. ralphm

    as an Item is an Element, you can either use named attributes 'eg. item.foo, to get to the payload root named foo', or using the elements() function that returns an iterator of child elements

  78. ralphm

    an Element has 'name' and 'uri' attributes to inspect

  79. aj has left

  80. ralphm

    and you can coerce the text in an child 'bar' with `unicode(parent.bar)`

  81. ralphm

    Zash: does that help?

  82. Zash

    Yes, thanks. Finding some twisted domish docs too.

  83. ralphm

    https://twistedmatrix.com/documents/current/api/twisted.words.xish.domish.Element.html

  84. ralphm

    Zash: I had plans to actually write more documentation, but sadly that's not happened yet

  85. ralphm

    Zash: if you want to see typical use of domish Elements, I suggest looking at the wokkel code, where it parses things in methods typically called fromElement

  86. ralphm

    Zash: e.g. in data_form.py or muc.py

  87. bhaveshsgupta has left

  88. bhaveshsgupta has joined

  89. Zash

    Wooh! `2019-08-30T17:39:00+0200 [stdout#info] Hello World`

  90. MattJ has joined

  91. ralphm

    :-D

  92. bhaveshsgupta has left

  93. Daniel has joined

  94. bhaveshsgupta has joined

  95. bhaveshsgupta has left

  96. bhaveshsgupta has joined

  97. bhaveshsgupta has left

  98. bhaveshsgupta has joined

  99. bhaveshsgupta has left

  100. bhaveshsgupta has joined

  101. bhaveshsgupta has left

  102. bhaveshsgupta has joined

  103. bhaveshsgupta has left

  104. bhaveshsgupta has joined

  105. marc0s has left

  106. marc0s has joined

  107. bhaveshsgupta has left

  108. bhaveshsgupta has joined

  109. bhaveshsgupta has left

  110. bhaveshsgupta has joined

  111. bhaveshsgupta has left

  112. aj has joined

  113. bhaveshsgupta has joined