473,382 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

wx Python event question

Hi I really haven't used wxPython before and I was just wondering if
there was some sort of timer event that can be used. For example if I
have a database that I want to query at regular intervals and display
the results in a window is that possibly to do under a wx Python
program?

So far I have come across certain event handlers, but they all seem to
wait for something to happen, like moving the mouse, clicking on a
button etc. I just want to display the results of a query every so
often automatically without having to press a button to do so.

I'm not looking for a complete solution as I'm doing this so I can
teach myself Python, but a bit of a hint or a nudge in the right
direction would be great.

Jan 27 '07 #1
2 1556
use wx.Timer - you bind a method to a timer event and define the
timer's interval when you start it

timer = wx.Timer(self, -1)
self.Bind(wx.EVT_TIMER, self.timerMethod, timer)
timer.Start(500)
On Jan 27, 5:56 pm, "dudds" <d...@netspace.net.auwrote:
Hi I really haven't used wxPython before and I was just wondering if
there was some sort of timer event that can be used. For example if I
have a database that I want to query at regular intervals and display
the results in a window is that possibly to do under a wx Python
program?

So far I have come across certain event handlers, but they all seem to
wait for something to happen, like moving the mouse, clicking on a
button etc. I just want to display the results of a query every so
often automatically without having to press a button to do so.

I'm not looking for a complete solution as I'm doing this so I can
teach myself Python, but a bit of a hint or a nudge in the right
direction would be great.
Jan 27 '07 #2
Thanks Steve.

On Jan 27, 8:01 pm, "Steve" <stephen...@gmail.comwrote:
use wx.Timer - you bind a method to a timer event and define the
timer's interval when you start it

timer = wx.Timer(self, -1)
self.Bind(wx.EVT_TIMER, self.timerMethod, timer)
timer.Start(500)

On Jan 27, 5:56 pm, "dudds" <d...@netspace.net.auwrote:
Hi I really haven't used wxPython before and I was just wondering if
there was some sort of timer event that can be used. For example if I
have a database that I want to query at regular intervals and display
the results in a window is that possibly to do under a wx Python
program?
So far I have come across certain event handlers, but they all seem to
wait for something to happen, like moving the mouse, clicking on a
button etc. I just want to display the results of a query every so
often automatically without having to press a button to do so.
I'm not looking for a complete solution as I'm doing this so I can
teach myself Python, but a bit of a hint or a nudge in the right
direction would be great.
Jan 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Ajay | last post by:
hi! can you call a Python application from a Java program? does this require any additional package to be installed? thanks cheers
18
by: Cameron Laird | last post by:
QOTW: "... So I started profiling the code and the slowdown was actually taking place at places where I didn't expect it." -- Guyon Mor?e (and about twenty-three thousand others) " suggestion...
35
by: John Coleman | last post by:
Greetings, I have a rough classification of languages into 2 classes: Zen languages and tool languages. A tool language is a language that is, well, a *tool* for programming a computer. C is the...
9
by: redefined.horizons | last post by:
Here is another non-pythonic question from the Java Developer. (I beg for forgiveness...) Does Python have a mechanism for events/event-driven programming? I'm not necessarily talking about...
112
by: mystilleef | last post by:
Hello, What is the Pythonic way of implementing getters and setters. I've heard people say the use of accessors is not Pythonic. But why? And what is the alternative? I refrain from using them...
23
by: gord | last post by:
As a complete novice in the study of Python, I am asking myself where this language is superior or better suited than others. For example, all I see in the tutorials are lots of examples of list...
4
by: Gianmaria | last post by:
Hi, i'm a .net programmer and i'm learnig python, so this question can be very stupid or easy for python programmers. I've a doubt about events.... here is what: in c# for example i can write a...
2
by: Anders Dahnielson | last post by:
Sorry if this is a somewhat silly question... I'm using the Observer implementation found in 'Patterns in Python' and find it really neat. But, I have not yet fully groked the new-style class,...
20
by: Jimmy | last post by:
Hi to all python now has grown to a versatile language that can accomplish tasks for many different purposes. However, AFAIK, little is known about its ability of kernel coding. So I am...
15
by: lixinyi.23 | last post by:
Hi! I'm currently working on a scientific computation software built in python. What I want to implement is a Matlab style command window <-> workspace interaction. For example, you type...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.