Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-06-2008, 02:03 AM   #1
LQ Newbie
Registered: May 2006
Posts: 7

Rep: Reputation: 1
wxPython Catch System Shutdown

Hi All,
I have an application that needs to clean up on user logout, and system shutdown, i use the following code:

class MyApp(wx.App):
    def OnInit(self):
        self.frame_1 = MyFrame(None, -1, "")

        self.Bind(wx.EVT_QUERY_END_SESSION, self.evt_system_shutdown)
        self.Bind(wx.EVT_END_SESSION, self.evt_system_shutdown)
        return 1

    def evt_system_shutdown(self, event):
But the messagebox is never displayed, nor my frames close method. Can anyone tell me what I'm missing?
Old 02-07-2008, 02:28 PM   #2
LQ Newbie
Registered: Aug 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 29

Rep: Reputation: 15
You might want to ask on the wxWidgets forum
Old 02-10-2008, 04:04 PM   #3
LQ Newbie
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 1

Done, Thanks.


wxpython, wxwidgets

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
System shutdown on its own.........? M$ISBS Linux - Security 3 05-14-2006 09:56 PM
Why can't my system shutdown? naihe2010 Linux - Software 1 11-27-2005 04:50 PM
reason for system shutdown manjushp Linux - Security 1 06-03-2005 01:06 PM
WxPython install help 64 bit system MarkLinux222 Linux - Software 0 02-08-2005 02:59 PM
System Halting while shutdown system. LiloAma Linux - Software 15 01-02-2005 08:30 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration