Re: [Tutor] list dll functions ?

2010-09-15 Thread patrice laporte
Dependdencyy walker is a good tool, but as you have seen it doesn't give you function's signature. If you explore a MS dll, you should to have a look at MSDN and read about the function description. A bit out of subject : There is no way to find the function's signature only from exploring the bin

Re: [Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-15 Thread patrice laporte
2010/2/14 Steven D'Aprano > > > If the file do esn't exist, bing ! I got an exception "I/O Error n°2 > > : file doesn't exist". > > Are you sure? What version of Python are you using? I get a completely > different error message: > > Yes I'm not sure when I wrote : *I got an exception "I/O E

Re: [Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-15 Thread patrice laporte
2010/2/15 Dave Angel > > This makes lots of sense. If the message doesn't make sense to the user, > there's no point. But why then is your thread titled "Getting caller name" > ? Why does the user care about the caller (function) name? When you > started the thread, it seemed clear that your

Re: [Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-15 Thread patrice laporte
2010/2/14 Luke Paireepinart > I see why you would want the error messages but why is the default error > message not enough, that is why I am curious, and typically introspection on > objects is not necessary (for example, people often want to convert a string > into a variable name to store a va

Re: [Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-14 Thread patrice laporte
2010/2/13 Luke Paireepinart > > > On Sat, Feb 13, 2010 at 9:56 AM, patrice laporte wrote: > >> >> Hi, >> >> Being in an exeption of my own, I want to print the name of the caller, >> and I'm looking for a way to have it. >> >> Could you

Re: [Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-13 Thread patrice laporte
2010/2/13 Kent Johnson > > > >Here is a way to do it using the traceback module. Under the hood it > >is still using implementation details contained in traceback and stack > >frame objects but the public interface in the traceback module should > >be stable. > > >import sys, traceback > > >def w

[Tutor] Getting caller name without the help of "sys._getframe(1).f_code.co_name" ?

2010-02-13 Thread patrice laporte
Hi, Being in an exeption of my own, I want to print the name of the caller, and I'm looking for a way to have it. I've found a lot of recipe all of them using what seems to be, according to me, a not so good trick : all those recipe make use of sys._getframe(1).f_code.co_name, such as in this exe