python ScriptControl error in Excel while running fine in python

2005-02-01 Thread Sebastien de Menten
I am trying to use ScriptControl under Excel (Windows XP) with the code: Global sc As New MSScriptControl.ScriptControl Public Function os_getcwd() sc.Language = "python" sc.ExecuteStatement ("import os") os_getcwd = sc.Eval("os.getcwd()") End Function When setting the language to py

Re: args attribute of Exception objects

2005-04-11 Thread Sebastien de Menten
Jeremy Bowers <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > On Fri, 08 Apr 2005 09:32:37 +, SÃÂbastien de Menten wrote: > > > Hi, > > > > When I need to make sense of a python exception, I often need to parse the > > string exception in order to retrieve the data. > > W

Re: args attribute of Exception objects

2005-04-12 Thread Sebastien de Menten
Thank you guys for those good advices (and the very interesting example of AST hacking). However, this was an example of use for Exception.args. It does not alleviate my concerns about the fact that the args attribute is poorly designed for standard Exceptions. It is as if the Exception design was

Re: args attribute of Exception objects

2005-04-13 Thread Sebastien de Menten
> Did I misunderstand the problem again? Hmmm, yes ! But I think I am not expressing clearly my concern :-) So my problem is that "default exception" are badly designed in their use of their args attribute. I know it is possible to subclass Exception as every object and add the attributes I want