Hi all.
I am currently learning python (and pyGTK) and I'm having a hard time
understanding some threading stuff.
I'm writing here hoping I can get
- pointers to some documentation that could help me
- a lead concerning the specific problem described in the message
- a hint about which librar
Well, I figured it out. Thanks anyway for your help.
--
http://mail.python.org/mailman/listinfo/python-list
def check_message(self, spawn=True):
'''Method for pulling message from server process.'''
if spawn: self.pid2 = os.fork()
if self.pid2 == 0:
if verbose: print('message checker initialized')
# repeat message check forever
while True:
class MessageServer:
'''Creates a message server object that listens for textual
information
and sends it back to the main program. Intended to be spawned
as a
separate process.
'''
def __init__(self, port_number, server_send, server_receive):
'''@param server_
Thank you for the reply. When I said "TCP/IP" protocol, what I meant
was this: http://en.wikipedia.org/wiki/Internet_Protocol_Suite.
The reason the server is in a separate process is because it needs to
continually be listening for network packets, which would disrupt the
GUI. In any case, that pa
On Sunday 15 August 2010, it occurred to Jerrad Genson to exclaim:
> Hello,
>
> I'm learning Tkinter, and I have an issue that I'd appreciate help
> with. I have a program that initializes a GUI (I'll call this the "GUI
> process"), then spawns another process that listens on a network via
> the T
I should also mention that I'm running Ubuntu 10.04 and Python 2.6.5.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm learning Tkinter, and I have an issue that I'd appreciate help
with. I have a program that initializes a GUI (I'll call this the "GUI
process"), then spawns another process that listens on a network via
the TCP/IP protocol for incoming strings (I'll call this the "server
process"). Ever
Many thanks to all who replied to my questions re. SQLite connections,
cursors and threading.
Looks like I have got some reading to do regarding connection pooling and
a decent SQLite ORM package. Does anyone know of any which are Python 3
compatible?
Many thanks,
Alanj
--
http://mail.pyth
Jonathan Gardner wrote:
On Jan 29, 8:37 am, Alan Harris-Reid
wrote:
Questions...
1. Is there a large overhead in opening a new SQLite connection for
each thread (ie. within each method)?
Suggestion: Use something like SQLAlchemy to manage you DB
interactions. One day, you'll move away from
On Fri, Jan 29, 2010 at 8:37 AM, Alan Harris-Reid <
aharrisr...@googlemail.com> wrote:
> Hi,
>
> I am creating a web application (using Python 3.1 and CherryPy 3.2) where a
> SQLite connection and cursor object are created using the following code
> (simplified from the original):
>
> class MainSi
On Jan 29, 8:37 am, Alan Harris-Reid
wrote:
>
> Questions...
> 1. Is there a large overhead in opening a new SQLite connection for
> each thread (ie. within each method)?
Yes, but not as bad as some other DBs.
> 2. Is there any way to use the same connection for the whole class (or
> should I
Hi,
I am creating a web application (using Python 3.1 and CherryPy 3.2)
where a SQLite connection and cursor object are created using the
following code (simplified from the original):
class MainSite:
con = sqlite.connect('MyDatabase.db')
cursor = con.cursor()
def index_page():
hi,
i am using pygtk,glade in the front end and postgresql,python-twisted
(xmlrpc) as the back end.My issue is i am trying to add the progress bar in
my application but when the progress bar comes up it is blocking the backend
process.So i started using threading in my application.But when i added
*** SOLVED ***
Thanks, Eric. I've had luck with code along these lines:
# 1. Assume Text widget as instance variable: textView
# 2. Assume button with method, 'start', bound to it
def start(self, event=None):
"""
Starts the demo.
"""
# Print A-Z to wid
On Wed, 12 Dec 2007 02:58:37 +0100, mariox19 <[EMAIL PROTECTED]> wrote:
> Are Tkinter widgets running on their own thread?
No. And usually, GUI toolkits and threads don't mix well...
> If I try to make a simple application that will print the letters A to
> Z to a Tkinter Text widget, and I spac
On Tue, 11 Dec 2007 17:58:37 -0800, mariox19 wrote:
> If I am supposed to send messages to Tkinter objects only from the
> main thread, how can I get the letters to appear 1 per second?
Take a look at the `after()` method on widgets.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.
Are Tkinter widgets running on their own thread?
If I try to make a simple application that will print the letters A to
Z to a Tkinter Text widget, and I space the printing of each letter by
1 second, it seems no text will appear in the Text widget until the
method exits.
Take a look at this snip
Patrick Smith wrote:
> > Well, the problem is that you can't simply kill a thread--it shares
> > memory with other threads that it could be leaving in an inconsistent
> > state. Imagine that it was, say, holding a lock when it was forceably
> > killed. Now any other thread that tries to acquire t
"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If your thread is long running and it is not possible to easily set a
> flag for it to check and bail out, then how does it display the
> progress in the progress dialog. How often does that get updated? If
> the progr
> Well, the problem is that you can't simply kill a thread--it shares
> memory with other threads that it could be leaving in an inconsistent
> state. Imagine that it was, say, holding a lock when it was forceably
> killed. Now any other thread that tries to acquire that lock will
> block forever
If your thread is long running and it is not possible to easily set a
flag for it to check and bail out, then how does it display the
progress in the progress dialog. How often does that get updated? If
the progress dialog is updated often, then at each update have the
thread check a self.please_di
Patrick Smith wrote:
> Hi,
> Thanks for your reply.
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > [Re: cancelling a worker thread from the GUI thread]
> >
> > Have the main thread set a flag telling the worker thread to exit, and
> > have the worker thread check that periodi
Patrick Smith wrote:
> Hi,
> Thanks for your reply.
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>Patrick Smith wrote:
>>
>>>Hi,
>>>I'm hoping someone here will be able to help as I've been struggling
>
> with
>
>>>this problem for a few days now.
>>>
>>>I'm working on a
Hi,
Thanks for your reply.
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Patrick Smith wrote:
> > Hi,
> > I'm hoping someone here will be able to help as I've been struggling
with
> > this problem for a few days now.
> >
> > I'm working on an application that is creating a Progress
Patrick Smith wrote:
> Hi,
> I'm hoping someone here will be able to help as I've been struggling with
> this problem for a few days now.
>
> I'm working on an application that is creating a ProgressDialog, and then
> creating a thread that runs a function from another module in the program.
>
> Th
Hi,
I'm hoping someone here will be able to help as I've been struggling with
this problem for a few days now.
I'm working on an application that is creating a ProgressDialog, and then
creating a thread that runs a function from another module in the program.
The problem is, when the cancel butto
27 matches
Mail list logo