Getting module path string from a class instance

2012-11-12 Thread Some Developer
I'm trying to find a way to get a string of the module path of a class. So for instance say I have class Foo and it is in a module called my.module. I want to be able to get a string that is equal to this: "my.module.Foo". I'm aware of the __repr__ method but it does not do what I want it to d

Re: Getting module path string from a class instance

2012-11-12 Thread Some Developer
On 13/11/2012 07:19, Steven D'Aprano wrote: On Tue, 13 Nov 2012 06:38:31 +0000, Some Developer wrote: I'm trying to find a way to get a string of the module path of a class. So for instance say I have class Foo and it is in a module called my.module. I want to be able to get a stri

Re: Getting module path string from a class instance

2012-11-13 Thread Some Developer
On 13/11/2012 08:49, Steven D'Aprano wrote: On Tue, 13 Nov 2012 07:54:32 +0000, Some Developer wrote: On 13/11/2012 07:19, Steven D'Aprano wrote: On Tue, 13 Nov 2012 06:38:31 +0000, Some Developer wrote: I'm trying to find a way to get a string of the module path of a

Re: Getting module path string from a class instance

2012-11-13 Thread Some Developer
On 13/11/2012 09:36, Dave Angel wrote: On 11/13/2012 01:38 AM, Some Developer wrote: I'm trying to find a way to get a string of the module path of a class. So for instance say I have class Foo and it is in a module called my.module. I want to be able to get a string that is equal to