Tagged Questions
0
votes
2answers
20 views
Python: Interrupting sender with incoming messages
I'm working with socket, asynchronous event-driven programming. I would like to send a message, once I receive a response, send another message. But I may be doing something besides listening. That ...
0
votes
0answers
27 views
Scheduling simultaneous events with a defined time range (Advanced Python Scheduler?)
So here's setup, I have an object, let's call it X, that is polled every 500ms (somewhat irrelevant) now say I have 2 other objects, we'll call them s1 and s2, that watch different values that X is ...
0
votes
1answer
47 views
wxpython wx.TreeCtrl, which subitem of the tree fires the event wx.EVT_TREE_ITEM_ACTIVATED?
I'm making a tree ctrl and need to figure out where the double click came from.
Code:
def _initElementsOfTreePanel(self, panel):
tree = wx.TreeCtrl(panel, -1, wx.Point(0, 0), wx.DefaultSize, ...
0
votes
3answers
36 views
Eventhandler on the last item in a for loop in Python
I couldn't find any (for a beginner) readable information on this. Is it possible to have an event on the last item in a for loop:
array = ["foo", "bar", "john", "test"]
for item in array:
print ...
1
vote
0answers
44 views
How to add another object's handlers to a window with Pyglet
I have a main object with a Pyglet window as an attribute. Pylget's window class has a method called push handlers, which lets me push methods to the event stack. The following code works:
import ...
0
votes
0answers
65 views
How can I use asyncore with the multiprocessing IPC module in Python 3?
I'm trying to utilise the Client/Server architecture of the multiprocessing module to facilitate communication between my Python scripts. I want to be able to implement a separate connection listener ...
0
votes
1answer
54 views
Trouble binding events in TKinter
For background: most of my experience is ruby/rails. I'm trying to help a friend by building a simple GUI app that updates an Excel file and don't have much experience w/ Python or TKinter. The goal ...
0
votes
0answers
68 views
How to download minute to minute stock data in given time range on python
I am trying to
1) Create a file which will write minute to minute data into csv file for a stock through ystockquote.
2) Start at a specific given time to specific end time .
3) For each minute, ...
0
votes
0answers
135 views
Catching button click on Gtk.Image - python, gtk3
I'm trying to execute some code whenever the user clicks a Gtk.Image widget.
Example code:
from gi.repository import Gtk, Gdk
def callback(*args):
print args
w= Gtk.Window()
...
1
vote
1answer
29 views
How can I prevent specific classes from being updated/deleted in SQLAlchemy?
Let's say I have classes Dog(), Walrus(), Boot().
I want to make it so you cannot update Walrus objects ever although you can delete them and you can never delete Boot objects.
So if do:
dog1 = ...
0
votes
1answer
215 views
Django Gunicorn Long Polling
Is using Django with gunicorn is considered to be a replacement for using evented/async servers like Tornado, Node.js, and similar ? Additionally, Will that be helpful in handling long-polling/cometed ...
2
votes
0answers
165 views
Fastest Python concurrency framework [closed]
Could someone suggest a concurrency framework (threads, event based) in Python that can handle two tasks, one that has to process a LOT of events, and another that can process one or more commands at ...
3
votes
1answer
157 views
Working with matplotlib key events and modifiers
import matplotlib
import matplotlib.pyplot as plt
print matplotlib.__version__
print plt.get_backend()
def key_event(e):
print e.key
fig = plt.figure()
fig.canvas.mpl_connect('key_press_event', ...
1
vote
1answer
75 views
matplotlib: deliberately block code execution pending a GUI event
Is there some way that I can get matplotlib to block code execution pending a matplotlib.backend_bases.Event?
I've been working on some classes for interactively drawing lines and polygons inside ...
0
votes
1answer
47 views
How to get all connections of a widget?
I have a PySide widget, with some connections. There are times when they are simply replaced by new widget instances based on input. How can I retain (getting the connections is the difficult part for ...