Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread a a
On Monday, 13 March 2023 at 16:12:04 UTC+1, Thomas Passin wrote: > On 3/13/2023 12:39 AM, a a wrote: > > But some unknown reasons Matplotlib and numpy crash my Python 3.8 for > > Windows , 32-bit and no support is offered > It is possible, using pip, to downgrade versions (e.g., of Matplotlob >

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread a a
On Monday, 13 March 2023 at 16:16:28 UTC+1, Thomas Passin wrote: > On 3/13/2023 12:39 AM, a a wrote: > > But what I need is analysis of seismograms from 4,000 seismographs world > > wide to detect P-wave energy distribution underground around the earthquake > > to verify EQ Domino Effect > In tha

RE: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread avi.e.gross
13, 2023 2:10 PM To: python-list@python.org Subject: Re: Can you process seismographic signals in Python or should I switch to Matlab ? On 3/13/2023 11:54 AM, Rich Shepard wrote:> On Mon, 13 Mar 2023, Thomas Passin wrote: > >> No doubt, depending on the data formats used. But it&#

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Thomas Passin
On 3/13/2023 11:54 AM, Rich Shepard wrote:> On Mon, 13 Mar 2023, Thomas Passin wrote: > >> No doubt, depending on the data formats used. But it's still going >> to be a big task. > > Thomas, > > True, but once you have a dataframe with all the information about > all the earthquakes you can extra

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Rich Shepard
On Mon, 13 Mar 2023, Thomas Passin wrote: No doubt, depending on the data formats used. But it's still going to be a big task. Thomas, True, but once you have a dataframe with all the information about all the earthquakes you can extract data for every analysis you want to do. If you've not

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Thomas Passin
On 3/13/2023 11:23 AM, Rich Shepard wrote: On Mon, 13 Mar 2023, Thomas Passin wrote: But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect In that case, you will have to

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Rich Shepard
On Mon, 13 Mar 2023, Thomas Passin wrote: But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect In that case, you will have to do a great deal of work to get all that dat

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Thomas Passin
On 3/13/2023 12:39 AM, a a wrote: But what I need is analysis of seismograms from 4,000 seismographs world wide to detect P-wave energy distribution underground around the earthquake to verify EQ Domino Effect In that case, you will have to do a great deal of work to get all that data into a

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread Thomas Passin
On 3/13/2023 12:39 AM, a a wrote: But some unknown reasons Matplotlib and numpy crash my Python 3.8 for Windows , 32-bit and no support is offered It is possible, using pip, to downgrade versions (e.g., of Matplotlob and numpy) to see if you can find versions that work. Of course moving to

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-13 Thread a a
ledge of it yet, it can take a while to know enough and if you just need > it for one project, ... > -Original Message- > From: Python-list On > Behalf Of Thomas Passin > Sent: Sunday, March 12, 2023 12:02 AM > To: pytho...@python.org > Subject: Re: Can you proces

RE: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-11 Thread avi.e.gross
, ... -Original Message- From: Python-list On Behalf Of Thomas Passin Sent: Sunday, March 12, 2023 12:02 AM To: python-list@python.org Subject: Re: Can you process seismographic signals in Python or should I switch to Matlab ? On 3/11/2023 6:54 PM, a a wrote: > My project >

Re: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-11 Thread Thomas Passin
On 3/11/2023 6:54 PM, a a wrote: My project https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.html If your goal is to step through this Matlab example, then clearly you should use Matlab. If you do not have access to Matlab or cannot afford it, then you would have to us

RE: Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-11 Thread avi.e.gross
people here are likely to know much about a specialized field and perhaps a search using a search engine might get you something like this: https://www.google.com/search?q=python+process+seimographic+signals&oq=pytho n+process+seimographic+signals&aqs=chrome..69i57j0i546l5.16718j0j7&

Can you process seismographic signals in Python or should I switch to Matlab ?

2023-03-11 Thread a a
My project https://www.mathworks.com/help/matlab/matlab_prog/loma-prieta-earthquake.html -- https://mail.python.org/mailman/listinfo/python-list

Re: INSTRUCTOR SOLUTIONS MANUAL Linear Systems And Signals 2nd ED by B P Lathi

2017-10-02 Thread Steve D'Aprano
On Tue, 3 Oct 2017 12:54 pm, mosama221...@gmail.com wrote: > i need instructor of second edition of linear system and signals by lathi Don't reply to spammers and don't reply to them. They are the scum of the earth. They are literally criminals, they use computer viruses and malw

Re: INSTRUCTOR SOLUTIONS MANUAL Linear Systems And Signals 2nd ED by B P Lathi

2017-10-02 Thread mosama221122
i need instructor of second edition of linear system and signals by lathi -- https://mail.python.org/mailman/listinfo/python-list

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Steve D'Aprano
On Sun, 6 Aug 2017 03:18 am, Michael Torrie wrote: > Forgive Steven for his off-topic reply. I assume he's trying to goad you > into having a more specific subject line. He knows darn well what PyQt, > even if he has no experience with it. Pardon me, I said: "I don't

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Michael Torrie
On 08/05/2017 08:28 AM, veek wrote: > At a certain point beyond the general stuff, questions about PyQt might be better suited to the PyQt mailing list, hosted by the company that maintains PyQt: https://www.riverbankcomputing.com/mailman/listinfo/pyqt -- https://mail.python.org/mailman/listi

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Michael Torrie
to them. > > At any rate, Python never had to come up with such tricks for callbacks. > Python's closure syntax is maybe the most natural there is. Too bad if > PyQt confuses Python programmers with "signals" and "slots" when they > are simply methods. Tr

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Vincent Vande Vyvre
Le 05/08/17 à 16:28, veek a écrit : 1. What exactly is a signal. In hardware, an interrupt can be viewed as a signal and the voltage on a pin will suddenly jump to +5V as an indicator that an interrupt has occurred. With Qt signals - if a widget-c++ code has to 'signal' an event - wh

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Marko Rauhamaa
is how event-driven > programming works. The concept of signals and slots is very similar to > explicit registering of callbacks in function. It differs only in > form. I would express it as just saying that the Qt developers appropriated the word "signal" for what is simply a callb

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Michael Torrie
s occurred. With Qt signals - if a widget-c++ code has > to 'signal' an event - what does it do? Basically a signal emission is a call to the main loop that indicates that an event has occurred, and then the main loop sees if there are any registered callbacks that want to be notified o

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread veek
Steve D'Aprano wrote: > On Sun, 6 Aug 2017 12:28 am, veek wrote: > >> 1. What exactly is a signal. In hardware, an interrupt can be viewed as a >> signal and the voltage on a pin will suddenly jump to +5V as an indicator >> that an interrupt has occurred. With Qt s

Re: Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread Steve D'Aprano
On Sun, 6 Aug 2017 12:28 am, veek wrote: > 1. What exactly is a signal. In hardware, an interrupt can be viewed as a > signal and the voltage on a pin will suddenly jump to +5V as an indicator > that an interrupt has occurred. With Qt signals - if a widget-c++ code has > to '

Signals and Slots - Summerfield - what exactly is a signal?

2017-08-05 Thread veek
1. What exactly is a signal. In hardware, an interrupt can be viewed as a signal and the voltage on a pin will suddenly jump to +5V as an indicator that an interrupt has occurred. With Qt signals - if a widget-c++ code has to 'signal' an event - what does it do? As a conseque

Re: Alternative to signals in threads

2017-03-08 Thread woooee
Use multiprocessing since you want to do multiple things at once https://pymotw.com/2/multiprocessing/basics.html If I understand you correctly, once the string is found you would terminate the process, so you would have to signal the calling portion of the code using a Manager dictionary or l

Alternative to signals in threads

2017-03-08 Thread saatomic
I've been unsuccessfully looking for an alternative for signals, that works in threads. After updating a script of mine from being single-threaded to being multi-threaded, I realised that signals do not work in threads. I've used signals to handle blocking operations that possibly ta

Re: Signals and Threads in Python 3.5 or so

2016-10-24 Thread Dan Stromberg
That bug is: if you control-C the top-level process, all the >> subprocesses are left running. >> >> I've been thinking about making it catch SIGINT, SIGTERM and SIGHUP, >> and having it SIGKILL its active subprocesses upon receiving one of >> these signals. >> &

Re: PyQT - Signals and Slots?

2016-10-10 Thread Michael Torrie
's announce and atzero defined? In your example code, "atzero" is implicitly defined as a signal in the connect() call. Under the hood in Qt, signals are all dispatched by strings when you emit() the signal. PyQt does allow you to define signals in a more pythonic way using class

Re: PyQT - Signals and Slots?

2016-10-10 Thread Veek M
Mark Summerfield wrote: > > The ZeroSpinBox is a tiny example designed to show how the signal/slot > mechanism works. It is just a QSpinBox with the addition of > remembering how many times (all the) ZeroSpinBox(es) have had a 0 > value. > > Nowadays the connections would be made with a new impr

Re: PyQT - Signals and Slots?

2016-10-10 Thread Mark Summerfield
The ZeroSpinBox is a tiny example designed to show how the signal/slot mechanism works. It is just a QSpinBox with the addition of remembering how many times (all the) ZeroSpinBox(es) have had a 0 value. Nowadays the connections would be made with a new improved syntax: self.connect(self, SIGNAL

PyQT - Signals and Slots?

2016-10-10 Thread Veek M
signalSignature -> functionName -> instance.methodName -> instance.slotSignature If signalSignature is a C++ implemented thingy then we got to pass type info as part of the mapping so "signalSignature(int, float, const char *). PyQT signals are any type and a

Re: Signals and Threads in Python 3.5 or so

2016-10-10 Thread dieter
; > I've been thinking about making it catch SIGINT, SIGTERM and SIGHUP, > and having it SIGKILL its active subprocesses upon receiving one of > these signals. > > However, it's multithreaded, and I've heard that in CPython, threads > and signals don't mix well.

Re: Signals and Threads in Python 3.5 or so

2016-10-09 Thread Marko Rauhamaa
it SIGKILL its active subprocesses upon receiving one of > these signals. SIGKILL is probably a bad idea. It doesn't give the subprocess any opportunity for a graceful exit. For example, Python's try/finally blocks will fail to work as advertised. Better use a catchable signal. > However, i

Re: Signals and Threads in Python 3.5 or so

2016-10-09 Thread Paul Rubin
Dan Stromberg writes: > That bug is: if you control-C the top-level process, all the > subprocesses are left running. Are you setting the daemon flag? -- https://mail.python.org/mailman/listinfo/python-list

Re: Signals and Threads in Python 3.5 or so

2016-10-09 Thread Chris Angelico
pon receiving one of > these signals. > > However, it's multithreaded, and I've heard that in CPython, threads > and signals don't mix well. Generally, expect SIGINT to be handled by the main thread, and code accordingly. But I've never used the low-level thread and _

Signals and Threads in Python 3.5 or so

2016-10-09 Thread Dan Stromberg
d having it SIGKILL its active subprocesses upon receiving one of these signals. However, it's multithreaded, and I've heard that in CPython, threads and signals don't mix well. Is this still an issue in CPython 3.5? If yes, how can I work around it? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: In pyqt, some signals seems not work well

2013-08-04 Thread Jack
On 2013/8/5 2:20, Vincent Vande Vyvre wrote: Le 04/08/2013 18:06, Jacknaruto a écrit : Hi, Guys! I created a thread class based QThread, and defined some signals to update UI through main thread. the UI used a stackedWidget,someone page named 'progressPage' have a progressBar a

Re: In pyqt, some signals seems not work well

2013-08-04 Thread Vincent Vande Vyvre
Le 04/08/2013 18:06, Jacknaruto a écrit : Hi, Guys! I created a thread class based QThread, and defined some signals to update UI through main thread. the UI used a stackedWidget,someone page named 'progressPage' have a progressBar and a Label, the next page named 'res

In pyqt, some signals seems not work well

2013-08-04 Thread Jacknaruto
Hi, Guys! I created a thread class based QThread, and defined some signals to update UI through main thread. the UI used a stackedWidget,someone page named 'progressPage' have a progressBar and a Label, the next page named 'resultsPage' shows results(some Labels). Wh

Why are my signals being ignored?

2011-06-22 Thread Anthony Papillion
he group with hat in hand asking for help. For some reason, in the code below, my signals are being completely ignored. For example, you'll notice that I connected the 'btnExit' to the method called 'clickedButton()' but, for some reason, when the button is clicked, the method

Condition signals and restarts, resumable exceptions (was: Comparison with False - something I don't understand)

2010-12-09 Thread Teemu Likonen
* 2010-12-06 00:14 (-0800), Paul Rubin wrote: > You know, I've heard the story from language designers several times > over, that they tried putting resumable exceptions into their > languages and it turned out to be a big mess, so they went to > termination exceptions that fixed the issue. Are th

pyqt signals

2010-09-03 Thread luca72
Hello i have write this but i not able to connect the emit of the class Socket to the Form class, can you help me? class Socket(QtNetwork.QTcpSocket): def __init__(self, parent=None): super(Socket, self).__init__(parent) self.connect(self, QtCore.SIGNAL("readyRead()"), self.leg

pyqt unhandled RuntimeError \"no access to protected functions or signals for objects not created from Python

2010-09-03 Thread luca72
Hello i have also write to pyqt mailing list but maybe you can help me to solve this question: I have write a tcpserver but wheni try to read by the signal readyRead() e get the error this the part of the program: def nuova_connessione(self): print 'Nuova connessione'

Re: PyQt signals/slots dialogs question

2010-06-07 Thread Thomas Jollans
On 06/07/2010 08:21 PM, AlienBaby wrote: > On Jun 7, 5:21 pm, AlienBaby wrote: > >> My real aim here is to learn pyqt, so I would rather not the the >> QWizard process until I understand myself whats going on behind the >> scenes. >> > Perhaps I posted to early, but a little more perserver

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
On Jun 7, 5:21 pm, AlienBaby wrote: > My real aim here is to learn pyqt, so I would rather not the the > QWizard process until I understand myself whats going on behind the > scenes. Perhaps I posted to early, but a little more perserverance and I have managed to unthaw the brain and move forward

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
My real aim here is to learn pyqt, so I would rather not the the QWizard process until I understand myself whats going on behind the scenes. -- http://mail.python.org/mailman/listinfo/python-list

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
On Jun 7, 4:37 pm, Phil Thompson wrote: > On Mon, 7 Jun 2010 08:22:07 -0700 (PDT), AlienBaby > > wrote: > > > > > > > Hi, > > > I'm just starting to get to grips with PyQt, and I'm having a bit of > > trouble connecting slots / signals, or

Re: PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
I've made a little progress; This appears to setup a connection that fires when the welcomeNext button in the Welcome dialog is clicked; self.Welcome.welcomeNext.connect(self.Welcome.welcomeNext,QtCore.SIGNAL("clicked()"),self.WelcomeNext) In the StartQT4 class I now have the WelcomeNext method

Re: PyQt signals/slots dialogs question

2010-06-07 Thread Phil Thompson
On Mon, 7 Jun 2010 08:22:07 -0700 (PDT), AlienBaby wrote: > Hi, > > I'm just starting to get to grips with PyQt, and I'm having a bit of > trouble connecting slots / signals, or understanding how I should do > so to achieve what I am after. > > I am trying to

PyQt signals/slots dialogs question

2010-06-07 Thread AlienBaby
Hi, I'm just starting to get to grips with PyQt, and I'm having a bit of trouble connecting slots / signals, or understanding how I should do so to achieve what I am after. I am trying to write an application that will display a sequence of dialogs, with back / next / cancel butto

Re: fcntl, serial ports and serial signals on RS232.

2010-04-09 Thread Max Kotasek
eturned by TIOCMBIS/TIOCMBIC is a status value > of 0 for success and <0 for failure. IIRC, that value is checked by > Python'sfcntl.ioctl wrapper and it will raise an exception on > failure. > > > Is someone familiar with manipulating serial signals like this in > &g

Re: fcntl, serial ports and serial signals on RS232.

2010-04-08 Thread Grant Edwards
On 2010-04-08, Anssi Saari wrote: > It seems to me also that RTS is always on after the port has been > opened. I didn't dig out my voltmeter or anything to check this, > though. IIRC, that's generally true: RTS and DTR are both set to "on" by the tty layer's open() handler _if_ the device's use

Re: fcntl, serial ports and serial signals on RS232.

2010-04-08 Thread Grant Edwards
e been using to do that, but > not sure what to do with the returned response: What returned response? The only thing that is returned by TIOCMBIS/TIOCMBIC is a status value of 0 for success and <0 for failure. IIRC, that value is checked by Python's fcntl.ioctl wrapper and it will raise an exc

Re: fcntl, serial ports and serial signals on RS232.

2010-04-08 Thread Anssi Saari
Max Kotasek writes: > Hello to all out there, > > I'm trying to figure out how to parse the responses from fcntl.ioctl() > calls that modify the serial lines in a way that asserts that the line > is now changed. For example I may want to drop RTS explicitly, and > assert that the line has been d

fcntl, serial ports and serial signals on RS232.

2010-04-07 Thread Max Kotasek
tting back a slightly different binary packed 32 bit integer (in that case '\x20\x00\x00\x00'). The above example has self.fd being defined as os.open('/dev/ttyS0', os.O_RDWR | os.O_NONBLOCK). Is someone familiar with manipulating serial signals like this in python? Am I e

Re: threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread Cameron Simpson
On 13Feb2010 17:22, exar...@twistedmatrix.com wrote: | On 04:43 pm, malig...@gmail.com wrote: | >The main part of my script is a function that does many long reads | >(urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to | >display some stats, I needed to run foo() as a seperate thre

Re: threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread exarkun
On 04:43 pm, malig...@gmail.com wrote: The main part of my script is a function that does many long reads (urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to display some stats, I needed to run foo() as a seperate thread to avoid getting errno 4 (interrupted system call) errors (w

Re: threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread MRAB
Maligree wrote: The main part of my script is a function that does many long reads (urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to display some stats, I needed to run foo() as a seperate thread to avoid getting errno 4 (interrupted system call) errors (which occur if SIGINFO i

threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread Maligree
The main part of my script is a function that does many long reads (urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to display some stats, I needed to run foo() as a seperate thread to avoid getting errno 4 (interrupted system call) errors (which occur if SIGINFO is received while u

Re: PyQt Signals and multiple sources

2009-12-20 Thread Zabin
On Dec 21, 11:15 am, "John Posner" wrote: > On Sun, 20 Dec 2009 16:59:11 -0500, Zabin wrote: > > I am beginner in programming in pyqt. I have been trying to call the > > same function from multiple events- but each event results in a > > different instance of the function. I am just unable to fig

Re: PyQt Signals and multiple sources

2009-12-20 Thread John Posner
On Sun, 20 Dec 2009 16:59:11 -0500, Zabin wrote: I am beginner in programming in pyqt. I have been trying to call the same function from multiple events- but each event results in a different instance of the function. I am just unable to figure out how to retrieve the source which calls the fun

PyQt Signals and multiple sources

2009-12-20 Thread Zabin
I am beginner in programming in pyqt. I have been trying to call the same function from multiple events- but each event results in a different instance of the function. I am just unable to figure out how to retrieve the source which calls the function: My source signal declarations are as below: Q

Re: Win32 trouble with threading, signals, and sleep()

2008-08-09 Thread Tim Golden
Lowell Alleman wrote: I'm running into this issue on Windows with the follow exception at the time when the signal handler is called: Traceback (most recent call last): ... self.done.wait(30) File "D:\Python24\lib\threading.py", line 348, in wait self.__cond.wait(timeout) File "D:

Win32 trouble with threading, signals, and sleep()

2008-08-08 Thread Lowell Alleman
I'm trying to track down an issue with a multi-threaded program that is responsible for handling real-time monitoring a business process. Different threads track various aspects of the process and all of the statistics filter back to the main thread for analysis. The program is run as a scheduled

Re: waiting on an event blocks all signals

2008-05-18 Thread Rhamphoryncus
On May 18, 9:05 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > alan schrieb: > > > This ignores CTRL-C on every platform I've tested: > > > python -c "import threading; threading.Event().wait()" > > ^C^C^C^C > > > It

Re: waiting on an event blocks all signals

2008-05-18 Thread Diez B. Roggisch
alan schrieb: This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It looks to me like all signals are masked before entering wait(). Can someone familiar with the internals explain and/or justify this behavior?

Re: waiting on an event blocks all signals

2008-05-17 Thread alan
m I've tested: > > >> python -c "import threading; threading.Event().wait()" > >> ^C^C^C^C > > >> It looks to me like all signals are masked before entering wait(). Can > >> someone familiar with the internals explain and/or justify this &

Re: waiting on an event blocks all signals

2008-05-17 Thread alan grow
On Sat, May 17, 2008 at 2:49 PM, John Schroeder <[EMAIL PROTECTED]> wrote: > ^C only kills the main thread. Use Control-Break to kill all threads. >> >> python -c "import threading; threading.Event().wait()" >> ^C^C^C^C There's a single main thread here though. Or am I missing something? -- http:

Re: waiting on an event blocks all signals

2008-05-17 Thread Jean-Paul Calderone
On Sat, 17 May 2008 12:49:54 -0700, John Schroeder <[EMAIL PROTECTED]> wrote: On Sat, May 17, 2008 at 12:32 PM, alan <[EMAIL PROTECTED]> wrote: This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It l

Re: waiting on an event blocks all signals

2008-05-17 Thread John Schroeder
^C only kills the main thread. Use Control-Break to kill all threads. On Sat, May 17, 2008 at 12:32 PM, alan <[EMAIL PROTECTED]> wrote: > This ignores CTRL-C on every platform I've tested: > > python -c "import threading; threading.Event().wait()" > ^C^C^C^C &g

waiting on an event blocks all signals

2008-05-17 Thread alan
This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It looks to me like all signals are masked before entering wait(). Can someone familiar with the internals explain and/or justify this behavior? Thanks,

Re: Signals/Slots support in Python

2008-05-01 Thread Ivan Illarionov
On Thu, 01 May 2008 08:44:27 -0600, Scott SA wrote: > Did you review this? > > > from what I understand is originally based upon this: > > > and subsequently integrated into this: >

Re: Signals/Slots support in Python

2008-05-01 Thread Scott SA
On 5/1/08, Brian Vanderburg II ([EMAIL PROTECTED]) wrote: >I don't know if any such support is already built in, so I ended up >making my own simple signals/slots like mechanism. If anyone is >interested then here it is, along with a simple test. It can connect to >normal

Signals/Slots support in Python

2008-05-01 Thread Brian Vanderburg II
I don't know if any such support is already built in, so I ended up making my own simple signals/slots like mechanism. If anyone is interested then here it is, along with a simple test. It can connect to normal functions as well as instance methods. It also supports weak connections

PyGTK GUI update without signals from GUI

2008-04-12 Thread Andrew Lapidas
an infinite loop. I need the project code to update the GUI intermittently. I have found, though, that generally it seems that the gtk.main loop is looking for signals from the GUI and I cannot figure out how to give it signals from another application. I have thought spawning a new thread from

[ANN] Scope_Plot, another plot library for real time signals.

2007-11-04 Thread Stef Mientki
hello, I justed finished, another plot library, called Scope_Plot, based on wxPython. Scope_Plot is special meant for displaying real time signals, and therefor has some new functionalities: - signal selection - each signal has it's own scale, - moving erase block - measurement curso

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread fumanchu
On Jun 11, 3:34 am, geoffbache <[EMAIL PROTECTED]> wrote: > I have a Python program (on UNIX) whose main job is to listen on a > socket, for which I use the SocketServer module. However, I would also > like it to be sensitive to signals received, which it isn't if it's

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread geoffbache
ly a network application. It doesn't have clients and servers as such, it just distributes its work via a grid engine and then lets these workers communicate back their results via sockets. > You're half right about this being simple though, and not needing Twisted > to solve the

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread geoffbache
> > You could probably use the Asyncore stuff to do it as well (with a lot > less stuff). This looked interesting. But it seems the asyncore stuff operates at the socket level, whereas I've currently just got a standard synchronous SocketServer and the socket operations themselves are kind of hid

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread Chaz Ginger
geoffbache wrote: >> Twisted *should* be able to do this, as it uses non-blocking IO. >> >> http://twistedmatrix.com/trac/ > > Thanks for the tip. I'll take a look if nobody has any better > suggestions. > > It still seems to me that what I'm trying to do is essentially quite > simple, and should

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread Jean-Paul Calderone
ut it does plenty of other things too. Generally speaking, it's useful for any network application, plus some other stuff. You're half right about this being simple though, and not needing Twisted to solve the problem. The only thing you need to do to solve the problem is avoid using ei

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread geoffbache
> Twisted *should* be able to do this, as it uses non-blocking IO. > > http://twistedmatrix.com/trac/ Thanks for the tip. I'll take a look if nobody has any better suggestions. It still seems to me that what I'm trying to do is essentially quite simple, and shouldn't require as large a tool as T

Re: Threads, signals and sockets (on UNIX)

2007-06-11 Thread Stefan Behnel
geoffbache wrote: > I have a Python program (on UNIX) whose main job is to listen on a > socket, for which I use the SocketServer module. However, I would also > like it to be sensitive to signals received, which it isn't if it's > listening on the socket. ("signals c

Threads, signals and sockets (on UNIX)

2007-06-11 Thread geoffbache
Hi all, I have a Python program (on UNIX) whose main job is to listen on a socket, for which I use the SocketServer module. However, I would also like it to be sensitive to signals received, which it isn't if it's listening on the socket. ("signals can only be received between at

RE: Signals

2007-04-18 Thread Robert Rawlins - Think Blue
Thanks Carsten, Sorry for not mentioning the dbus before, I thought that the signals were a general python thing, I didn’t realize it was a specific dbus thing. I've now modified the code so it looks like this. #!/usr/bin/python import dbus from gobject import MainLoop, idle_add

Re: Signals

2007-04-18 Thread Carsten Haese
produces singals when particular events > occur, but i have no idea how to list for events, I’ve tried all sorts > of combinations using the signal module but haven’t been able to get > it working. > [...] > import dbus, signal > [...] > > Now here is a copy of the API documentati

Signals

2007-04-18 Thread Robert Rawlins - Think Blue
27;/org/bluez/hci0') adapter = dbus.Interface(obj, 'org.bluez.Adapter') adapter.DiscoverDevices() Now here is a copy of the API documentation that lists the signals thrown by the API, this is the one I'm trying to listen for. void RemoteDeviceFound(string address, uint32 cla

Re: Queue and signals

2007-01-16 Thread hg
[EMAIL PROTECTED] wrote: > > >> Is it legal to use Queue.put in a signal handle and Queue.get in > >> the main process (no thread) > > hg> PS: and if not is there a way to share data between a "main" and > its hg> signal in a safe way (write in signal and read in main) > > The Q

Re: Queue and signals

2007-01-16 Thread skip
>> Is it legal to use Queue.put in a signal handle and Queue.get in the >> main process (no thread) hg> PS: and if not is there a way to share data between a "main" and its hg> signal in a safe way (write in signal and read in main) The Queue module was designed to work in multit

Re: Queue and signals

2007-01-16 Thread hg
hg wrote: > Hi, > > Is it legal to use Queue.put in a signal handle and Queue.get in the main > process (no thread) > > Thanks, > > hg PS: and if not is there a way to share data between a "main" and its signal in a safe way (write in signal and read in main) Thanks, hg -- http://mail.pyt

Queue and signals

2007-01-16 Thread hg
Hi, Is it legal to use Queue.put in a signal handle and Queue.get in the main process (no thread) Thanks, hg -- http://mail.python.org/mailman/listinfo/python-list

Re: catching signals in an object

2007-01-15 Thread robert
hg wrote: > Hi, > > I need to catch a signal "SIGUSR1" in an object ... and I need the signal > def that traps is to access the object context ... is that possible ? > (*nix and windows) > > ex: > > class test: > def __init__(self): > self.Set_Signal() > > def S

catching signals in an object

2007-01-15 Thread hg
Hi, I need to catch a signal "SIGUSR1" in an object ... and I need the signal def that traps is to access the object context ... is that possible ? (*nix and windows) ex: class test: def __init__(self): self.Set_Signal() def Set_Signal(self): imp

Re: Joining threads but allowing signals to main thread?

2007-01-11 Thread Lloyd Zusman
Gabriel Genellina <[EMAIL PROTECTED]> writes: > At Thursday 11/1/2007 03:43, Lloyd Zusman wrote: > >> while threading.activeCount() > 1: >> time.sleep(0.001) >> >> sys.exit(0) >> >>Is there any way to allow my program to respond t

Re: Joining threads but allowing signals to main thread?

2007-01-10 Thread Gabriel Genellina
At Thursday 11/1/2007 03:43, Lloyd Zusman wrote: while threading.activeCount() > 1: time.sleep(0.001) sys.exit(0) Is there any way to allow my program to respond to signals without having to busy-wait in the main thread? Don't worry too much, this is *not* a busy wait, bec

Joining threads but allowing signals to main thread?

2007-01-10 Thread Lloyd Zusman
do it as follows, the main thread doesn't respond to signals: import sys, time, signal, threading signaled = False class Signaled(Exception): pass def sighandler(signum, frame): global signaled print 'aborted!' signaled = True def sigtest(

Re: Threads and signals

2006-11-16 Thread Chad J. Schroeder
t;opportunity" in a Python application using threads > and signals. Basically, there is a main process that spawns off a child > thread that loops forever. In between iterations, the child > thread sleeps for X seconds. All the while, the main thread loops > forever doing its thing and

Threads and signals

2006-11-15 Thread Chad J. Schroeder
I've run into an "opportunity" in a Python application using threads and signals. Basically, there is a main process that spawns off a child thread that loops forever. In between iterations, the child thread sleeps for X seconds. All the while, the main thread loops forever doin

Re: Signals and threads again

2006-10-13 Thread Mitko Haralanov
invoked. > > I know that Python masks signals in threads but they should be fine in > the main thread and that is where they should get delivered. OK. I did an experiment where instead of creating a spinning thread, I just call that function. Now, the signal gets delivered to the main progra

  1   2   >