Questions tagged [pypubsub]

27 questions
30
votes
7 answers

Recommended Python publish/subscribe/dispatch module?

From PyPubSub: Pypubsub provides a simple way for your Python application to decouple its components: parts of your application can publish messages (with or without data) and other parts can subscribe/receive them. This allows message…
Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412
5
votes
1 answer

Python: threads managing events notified by other threads

I'm developing a multithreaded application in Python. In particular, in this application a thread should be able to generate an event that should be notified to one (or more) threads; the threads that receive the notification of the event should…
Cell
  • 81
  • 1
  • 4
3
votes
1 answer

There's invalid syntax in pub.py

The followed method is defined in the pubsub.py which is a python file in the site-package pubsub. When I try to use this, the pycharm tells me this is invalid syntax with an arrow pointing to '->'. I don't why and I have installed the pypubsub. def…
T. Qin
  • 31
  • 3
3
votes
4 answers

Pyinstaller and import issue with wx.lib.pubsub

My Python GUI app, works perfectly but when I try to create an executable I tried with pyinstaller (3.3.dev0+483c819) command: pyinstaller gui_app.py I get the follow issue: 7699 INFO: Loading module hook "hook-wx.lib.pubsub.py"... Traceback (most…
Stefano
  • 43
  • 1
  • 5
2
votes
2 answers

How to fix this warning of wxPyDeprecationWarning in wxPython module?

a deprecating warning in wxPython lib is as follows: wxPyDeprecationWarning: wx.lib.pubsub has been deprecated, plese migrate your code to use pypubsub, available on PyPI. python 3.7.2 and pycharm IDE
Minux
  • 51
  • 1
  • 8
1
vote
1 answer

using pypubsub & wxpython to transfer data between windows getting TypeError:

I am trying to pass data between two wxpython windows using PyPubSub. Below I have pared the code down the the basics. What I am getting when I fill in the data in the textcntrl on the main window and hit the button to pass it to the second window…
Dadrick
  • 11
  • 1
1
vote
1 answer

Pub\Sub Python Client - Gracefully shutdown subscriber

I am using Google Pub/Sub client v2.2.0 in python3.6 as a Subscriber. I want my application to shutdown gracefully after acking all the messages it already received. Sample code for a subscriber from Google's guide with minor changes that will show…
1
vote
1 answer

Laravel Framework PubSub

Hi I have installed google pubsub library via composer in Laravel Framework $ composer require google/cloud Is this the right library for laravel framework. Has anyone used this library and successfully implemented pubsub. Then I have created the…
Binod
  • 21
  • 4
1
vote
1 answer

Python: Does PubSub and WxPython with Threading require wx.CallAfter?

I am using: wxPython 4.0.7.post2 Pypubsub 4.0.3 Python 3.8.1 I have the following example program I have written: import wx import time from threading import Thread from pubsub import pub TIME_UPDATED = "time.updated" class…
Har
  • 3,727
  • 10
  • 41
  • 75
1
vote
1 answer

Is pypubsub message data sent by reference or value and why should I not modify the message data

I am using python 3. and would like to know if the message data attached to a pypubsub Sendmessage command is sent by reference or by value? It appears to be sent by reference but I was wondering if someone could verify that. Also the…
1
vote
1 answer

Python 3 -- using kwargs with an args only module

I am writing a gui in tkinter and using a publish/subscribe module (pyPubSub) to inform different parts of the program of what is occurring if they're subscribed. So, I have two functions that I need to work together. From tkinter, I'm…
linus72982
  • 1,418
  • 2
  • 16
  • 31
1
vote
1 answer

Preventing PyPubSub "Dead Listener" error

I'm using the package PyPubSub in a Python project so I can subscribe methods to channels and publish on those channels while the program runs. As part of a stress test, I set the program to run over and over for multiple hours. (Each run takes…
1
vote
1 answer

publish-subscribe pattern within an application versus between applications

Are publish-subscribe systems (e.g. ActiveMQ, Google App Engine pub/sub, and pypubsub) mainly for message communication between applications running over multiple machines with different memory spaces? Or can they be used for handling efficiently…
morfys
  • 2,195
  • 3
  • 28
  • 35
0
votes
1 answer

AWS IoT core pubsub.py example how to save messages to a variable

I am very new to python as well as to AWS IoT. I am using a raspberry pi zero in conjunction to publish and receive messages from my AWS IoT topic. I can send messages just fine and I can also receive messages and now I'm trying to figure out a way…
currydem
  • 1
  • 2
0
votes
1 answer

WxPython PyPubSub, using curried function not working

I'm using the PyPubSub module of WxPython, to send messages around, and I want to have a function subscribed to a topic, where the function has some curried parameters. Unfortunately, it doesn't seem to be using the curried function as I would…
John C
  • 6,285
  • 12
  • 45
  • 69
1
2