473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Python exception hook simple example needed

Hi !

I wrote some mails to wxPy, and this list about "wxPython and global
exception handling" theme.
I need to port my Delphi apps to wxPy, and I want to use same exception
mechanism like Delphi use.

When any exception get unhandled, the app's main cycle get it, and show
in a dialog (and I can catch it, and I can write it to a log file with
many developer information).

So: I need to create this in wx+Py.

But my computer crashed yesterday, some local emails, files deleted, etc...

If anyone has an idea, how to I catch exceptions globally, please write me.

I think they are wrote about Python exception hook...
If you have a simple example how to use it, write to me !

Thanx for your help: ft
Jul 21 '05 #1
6 1825
Am Tue, 05 Jul 2005 16:07:44 +0200 schrieb fo***********@anonym.hu:
Hi !

I wrote some mails to wxPy, and this list about "wxPython and global
exception handling" theme.
I need to port my Delphi apps to wxPy, and I want to use same exception
mechanism like Delphi use.

When any exception get unhandled, the app's main cycle get it, and show
in a dialog (and I can catch it, and I can write it to a log file with
many developer information).


Hi,

maybe a look at the "cgitb" module helps you. It uses an exception handler
to create a HTML page if an uncaught exception is raised.

HTH,
Thomas
--
Thomas Güttler, http://www.thomas-guettler.de/
Jul 21 '05 #2
Wax has a brilliant prebuilt dialog/handler. It's a wrapper over
wxPython - so you still use wxPython objects, it's jsut all a lot
easier.

http://zephyrfalcon.org/labs

Best Regards,

Fuzzy
http://www.voidspace.org.uk/python

Jul 21 '05 #3
On Jul 6, 2005, at 8:59 AM, Fuzzyman wrote:
Wax has a brilliant prebuilt dialog/handler. It's a wrapper over
wxPython - so you still use wxPython objects, it's jsut all a lot
easier.


And don't forget Dabo, which wraps all of wxPython's dialogs into
simple calls. No need to create/show/destroy; just call the appropriate
function.

I know I'm biased, being one of the authors, but I've used both
extensively, and find Dabo so much easier to work with. And if there's
a part of wxPython that we haven't wrapped yet, let us know, as we are
actively working on Dabo and improving it all the time.

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/

Jul 21 '05 #4
Do you have an exception handling dialog ?

Can you use the UI layer without being tied to the rest of the
framework ? They seemed pretty integrated to me.

Best Regards,

Fuzzy
http://www.voidspace.org.uk/pythonhave an

Jul 21 '05 #5
On Jul 7, 2005, at 7:27 AM, Fuzzyman wrote:
Do you have an exception handling dialog ?
Not per se, as there hasn't been a request for one; we have several
dialogs ranging from simple messages to alerts to interactive dialogs,
much as wxPython offers. But I'll make this offer: give me a spec as to
what you need this "exception handling dialog" to do, and I'll have it
added to the framework within 24 hours. Deal?
Can you use the UI layer without being tied to the rest of the
framework ? They seemed pretty integrated to me.


They are integrated, but nothing forces you to use anything you don't
want. I know of several people who have developed UI-only apps, with no
need for business objects or database connectivity. They started in
plain wxPython, and switched to Dabo because it was so much easier, and
so much more Pythonic.

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/

Jul 21 '05 #6


Ed Leafe wrote:
On Jul 7, 2005, at 7:27 AM, Fuzzyman wrote:
Do you have an exception handling dialog ?


Not per se, as there hasn't been a request for one; we have several
dialogs ranging from simple messages to alerts to interactive dialogs,
much as wxPython offers. But I'll make this offer: give me a spec as to
what you need this "exception handling dialog" to do, and I'll have it
added to the framework within 24 hours. Deal?


Hello Ed,

It's a brilliant offer - and dabo sounds very interesting.
I was responding to someone else's question though ! Next time I need
to code a GUI app I'll take a look at dabo.

Thanks
Fuzzy
http://www.voidspace.org.uk/python

Can you use the UI layer without being tied to the rest of the
framework ? They seemed pretty integrated to me.


They are integrated, but nothing forces you to use anything you don't
want. I know of several people who have developed UI-only apps, with no
need for business objects or database connectivity. They started in
plain wxPython, and switched to Dabo because it was so much easier, and
so much more Pythonic.

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/


Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Paul Moore | last post by:
I hit a problem yesterday with my mail connection. In a desparate attempt to understand what was going on, I wanted to log the connection traffic. After a bit of searching, I found a post on c.l.p...
5
by: Premshree Pillai | last post by:
Hello, I recently wrote a Perl version of pyAlbum.py -- a Python script to create an image album from a given directory -- plAlbum.pl . It made me realize how easy-to-use Python is. ...
4
by: Richard Shea | last post by:
Hi - I'm trying to use ZODB but I'm having trouble getting started. Can anyone point me at a very simple example ? I've had a look at 'ZODB/ZEO Programming Guide'...
2
by: Richard Shea | last post by:
Hi - Anyone out there who has a simple example using pyXLWriter (http://sourceforge.net/projects/pyxlwriter/) they are willing to share with the group ? I'm interested in creating a .XLS which...
13
by: Mtk | last post by:
Hi! Why does the following, simple, example produce such errors? I know it has to do with the two header files including each other and (moreover) the usage of the classes One and Two in the...
0
by: minnie | last post by:
An AJAX Simple Example for PHP Article from http://www.joyistar.com Introduction: AJAX WebShop 3 Beta2 supports PHP programming by integrating PHP5 development environment. Here we will give an...
2
by: dave | last post by:
Hi, I have searched for the answer for this error message without success. I have seen the question many times though:) I create an ASP.NET project (VS 2005, C#), and use a very simple .mdf...
1
by: subramanian100in | last post by:
I am a beginner in C++. I come across the terms data abstraction and encapsulation in C++. I am unable to understand the definitions. Kindly explain these terms with a simple example in C++ ...
0
by: gcharbon | last post by:
Hi guys, I search a simple example in order to use Fault module (with ZSI 1.7). I have a correct WSDL file, all functions work well (client<-> server), but I have to work with Fault module (for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.