pexpect: TIMEOUT no longer clears child.before

2011-05-19 Thread Adrian Casey
The behaviour of pexpect has changed between version 2.1 and 2.3. In version 2.1, the following code would result in child.before being cleared -: >>>child.expect(pexpect.TIMEOUT,1) In version 2.3, this is no longer the case. No matter how many times the above code is run, child.before con

Re: QCoreApplication will not quit

2011-04-02 Thread Adrian Casey
Dennis Lee Bieber wrote: > On Sat, 02 Apr 2011 14:12:38 +0930, Adrian Casey > declaimed the following in gmane.comp.python.general: > >> Can someone please explain why this simple PyQt4 application never exits? >> >> #!/usr/bin/env python >> from PyQt4 import

QCoreApplication will not quit

2011-04-01 Thread Adrian Casey
Can someone please explain why this simple PyQt4 application never exits? #!/usr/bin/env python from PyQt4 import QtCore import sys class foo(QtCore.QObject): def __init__(self, parent): QtCore.QObject.__init__(self, parent) self.parent = parent

logging and PyQt4

2011-03-14 Thread Adrian Casey
eciated. Thank you. Adrian Casey. -- http://mail.python.org/mailman/listinfo/python-list

pyqt4: multi-threaded database access

2010-11-24 Thread Adrian Casey
I have a PyQt4 multi-threaded application which accesses many hosts concurrently via ssh. I would like each thread to have access to a database so that it can look up details about the particular system it is connected to. The easy way is to have each thread create a connection to the database.

Re: Using signal.alarm to terminate a thread

2006-11-15 Thread Adrian Casey
Nick Craig-Wood wrote: > Adrian Casey <[EMAIL PROTECTED]> wrote: >> > Adrian Casey <[EMAIL PROTECTED]> wrote: >> > import os, pexpect, threading >> > >> > def runyes(): >> > print "Running yes command..." >> &g

Re: Using signal.alarm to terminate a thread

2006-11-14 Thread Adrian Casey
Nick Craig-Wood wrote: > Adrian Casey <[EMAIL PROTECTED]> wrote: >> I have a multi-threaded python application which uses pexpect to connect >> to >> multiple systems concurrently. Each thread within my application is a >> connection to a remote system. The

Using signal.alarm to terminate a thread

2006-11-13 Thread Adrian Casey
y .bashrc and loops forever? Just one thread locking up like this holds up all the others. Any ideas or suggestions on how to handle such situations in a multi-threaded way would be appreciated. Cheers. Adrian Casey. Alice Springs Linux User Goup. http://www.aslug.org.au -- http://mail.python.org/mailman/listinfo/python-list

pexpect: TIMEOUT exception never raised

2005-05-12 Thread Adrian Casey
e, the child.expect statement will hang forever. I thought about using signal.signal to set an alarm that fires a few seconds after timeout and explicitly closes the session. However, my application is multi-threaded (i.e. each thread respresents a connection to a remote host) and signals can not be u

Re: Kill GIL

2005-02-15 Thread Adrian Casey
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Frans Englich <[EMAIL PROTECTED]> wrote: >> >>Personally I need a solution which touches this discussion. I need to run >>multiple processes, which I communicate with via stdin/out, >>simultaneously, and my plan was to do this with threads. Any favo

Re: short programming projects for kids

2005-01-24 Thread Adrian Casey
André Roberge wrote: > bobdc wrote: >> I will be teaching an "Introduction to Programming" class to some >> middle school aged children and will be using Python, obviously. Does >> anyone have suggestions for simple little programs to create and >> analyze with them after I get past turtle graphic

Re: Command line and GUI tools : need a single threading solution

2005-01-12 Thread Adrian Casey
Adrian Casey wrote: > Diez B. Roggisch wrote: > >>> I'm thinking it may be possible to modify the command line tools to use >>> qt >>> threads instead of native python threads. Is this the way to go? Are >>> there other options? >> >&

Re: Command line and GUI tools : need a single threading solution

2005-01-11 Thread Adrian Casey
Phil Thompson wrote: >> I have a collection of multi-threaded command line tools which I want >> wrap a >> PyQt gui around. I'm using queues to route messages from the command >> line tools to the PyQt gui. The command line tools use python threads to >> do >> their work. The gui uses a QThread

Re: Command line and GUI tools : need a single threading solution

2005-01-11 Thread Adrian Casey
Diez B. Roggisch wrote: >> I'm thinking it may be possible to modify the command line tools to use >> qt >> threads instead of native python threads. Is this the way to go? Are >> there other options? > > Why don't you use python threads in qt - I do so and so far it didn't make > any troubles

Command line and GUI tools : need a single threading solution

2005-01-10 Thread Adrian Casey
I have a collection of multi-threaded command line tools which I want wrap a PyQt gui around. I'm using queues to route messages from the command line tools to the PyQt gui. The command line tools use python threads to do their work. The gui uses a QThread object to read incoming messages. This