Re: accessing a classes code

2006-04-20 Thread Bruno Desthuilliers
John Machin a écrit : > On 20/04/2006 6:54 AM, bruno de chez modulix en face wrote: > >>> It turns out that what I want to do can be done using the inspect >>> module which has methods for getsourcecode among other things. >> >> >> I never said that what you wanted to do was impossible (nor even >

Re: accessing a classes code

2006-04-19 Thread John Machin
On 20/04/2006 6:54 AM, bruno de chez modulix en face wrote: >> It turns out that what I want to do can be done using the inspect >> module which has methods for getsourcecode among other things. > > I never said that what you wanted to do was impossible (nor even > difficult, and FWIW, there are s

Re: accessing a classes code

2006-04-19 Thread bruno de chez modulix en face
> It turns out that what I want to do can be done using the inspect > module which has methods for getsourcecode among other things. I never said that what you wanted to do was impossible (nor even difficult, and FWIW, there are simpler alternatives than using inspect - using a templating system l

Re: accessing a classes code

2006-04-19 Thread Ryan Krauss
It turns out that what I want to do can be done using the inspect module which has methods for getsourcecode among other things. Ryan On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote: > Ryan Krauss wrote: > (top-post corrected) > > > > On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote:

Re: accessing a classes code

2006-04-19 Thread bruno at modulix
Ryan Krauss wrote: (top-post corrected) > > On 4/19/06, bruno at modulix <[EMAIL PROTECTED]> wrote: > >>Ryan Krauss wrote: >> >>>I have a set of Python classes that represent elements in a structural >>>model for vibration modeling (sort of like FEA). Some of the >>>parameters of the model are i

Re: accessing a classes code

2006-04-19 Thread rx
"Ryan Krauss" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Is there a way for a Python instance to access its own code (especially the __init__ method)? And if there is, is there a clean way to write the modified code back to a file? I assume that if I can get the code as a lis

Re: accessing a classes code

2006-04-19 Thread Ryan Krauss
Because I want to store the results in one place so that in order to use the code later, all I have to do is import the classes that include the parameters that were previously unknown. I want to make using the results as easy and clean as possible for other users. Ryan On 4/19/06, bruno at modu

Re: accessing a classes code

2006-04-19 Thread bruno at modulix
Ryan Krauss wrote: > I have a set of Python classes that represent elements in a structural > model for vibration modeling (sort of like FEA). Some of the > parameters of the model are initially unknown and I do some system > identification to determine the parameters. After I determine these > u

Re: accessing a classes code

2006-04-19 Thread Ryan Krauss
I think this is a lot like I am planning to do, except that the new classes will be dynamically generated and will have new default values that I want to specify before I write them to a file. But how do I do that? Ryan On 4/19/06, Paul McGuire <[EMAIL PROTECTED]> wrote: > "Ryan Krauss" <[EMAIL

Re: accessing a classes code

2006-04-19 Thread Diez B. Roggisch
Ryan Krauss wrote: > I have a set of Python classes that represent elements in a structural > model for vibration modeling (sort of like FEA). Some of the > parameters of the model are initially unknown and I do some system > identification to determine the parameters. After I determine these >

Re: accessing a classes code

2006-04-19 Thread Paul McGuire
"Ryan Krauss" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] == I have a set of Python classes that represent elements in a structural model for vibration modeling (sort of like FEA). Some of the parameters of the model are initially unknown and I do some system id

accessing a classes code

2006-04-19 Thread Ryan Krauss
I have a set of Python classes that represent elements in a structural model for vibration modeling (sort of like FEA). Some of the parameters of the model are initially unknown and I do some system identification to determine the parameters. After I determine these unknown parameters, I would li