Hi
I am talking about a scenario like this
class A:
def foo(var1,var2):
return 'Hello'
def echo():
return 'testing'
class B:
def bar(car):
val = car
return car
What I need is to find out the classes and the methods of each class with
their parameters.
i.e. class A
foo(var,var)
echo()
when using dir() it does not show the methods and the method parameters .
Regards
Heshan Suriyaarachchi
On Thu, Mar 13, 2008 at 12:23 PM, Pradeep Kishore Gowda <[EMAIL PROTECTED]>
wrote:
> You mean something like this: http://dpaste.com/39212/
>
> On 3/13/08, Akash <[EMAIL PROTECTED]> wrote:
> > On Thu, Mar 13, 2008 at 11:39 AM, Heshan Suriyaarachchi
> > <[EMAIL PROTECTED]> wrote:
> > > Hi ,
> > > I am having a python script which is having a class and some
> methods. I
> > > need to know whether there is a way to find out which methods are
> there in
> > > this script from another python script. Is there something like
> reflection
> > > in python which could help me in this process. If someone can direct
> me to a
> > > code sample doing this I will be grateful.
> >
> >
> > How about creating an object of that class and using dir() on that?
> > _______________________________________________
> > BangPypers mailing list
> > [email protected]
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
>
>
> --
> Home - http://btbytes.com
> Heart - http://sampada.net
> Yummy! - http://konkanirecipes.com
> _______________________________________________
> BangPypers mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/bangpypers
>
_______________________________________________
BangPypers mailing list
[email protected]
http://mail.python.org/mailman/listinfo/bangpypers