Python Programming in Linux Question

Gracey

OSNN Newbie
Joined
2 Mar 2009
Messages
2
Hello,
I was wondering how i catch various signals in nix python so i can exit my programs gracefully? Please tell me

Thanks
 
Last edited:
Re: Linux Question

Hello,
I was wondering how i catch various signals in nix python so i can exit my programs gracefully? Please tell me

Thanks

Simply "import signal", and see documention of that module. But bear in mind that signals are weird with Python.
The atomic unit of Python execution can span a C external function
call, and that can take an indefinitely long time. So delivery of
signals at the Python level can be delayed.
 
Last edited by a moderator:
Re: Linux Question

You should add the fact that your looking for Python help in the title as it's not really a "Linux" question but more of a programming one. ;)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back