C macros in Python.
Olivier Dagenais
olivierS.dagenaisP at canadaA.comM
Fri Oct 13 15:09:20 EDT 2000
More information about the Python-list mailing list
Fri Oct 13 15:09:20 EDT 2000
- Previous message (by thread): SQL server module??????
- Next message (by thread): C macros in Python.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You should be able to print out or inspect a traceback, if you catch an exception. Search on http://python.faqts.com for "CGI" (I think..) and one of the topics deals with printing out (to the browser) the traceback from a CGI script that failed. It's got an example on how to retrieve the traceback, which contains file names (if appropriate) and line numbers. -- ---------------------------------------------------------------------- Olivier A. Dagenais - Software Architect and Developer "Someone called 'Type your name here' is impersonating me on the internet and is posting exactly the same things I am posting!" "Steve Juranich" <sjuranic at condor.ee.washington.edu> wrote in message news:Pine.SOL.3.96.1001013105150.14155A-100000 at condor.ee.washington.edu... > I was just wondering if there was anything available in Python like the > __FILE__ and __LINE__ macros in C. I know about the __name__ attribute, but > I'm not sure that does exactly what I'm looking to do. > > What I'd like to do is write some code that will tell me _exactly_ on which > file and while line things went wrong. > > Thanks for the help. > > ---------------------------------------------------------------------- > Stephen W. Juranich sjuranic at ee.washington.edu > Electrical Engineering http://students.washington.edu/sjuranic > University of Washington http://rcs.ee.washington.edu/ssli > >
- Previous message (by thread): SQL server module??????
- Next message (by thread): C macros in Python.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list