Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Anand Balachandran Pillai
strings then you can use something like: > > ~ > import os > help(os) > ~ > > -- > seShadri > > > > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pradeep Kishore > Gowda >

Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Seshadri_N
Kishore Gowda Sent: Thursday, March 13, 2008 2:41 PM To: Bangalore Python Users Group - India Subject: Re: [BangPypers] Finding methods in a python script Ah! i forgot about the function parameter list.. Will look into it. +Pradeep On 3/13/08, Pradeep Kishore Gowda <[EMAIL PROTECTED]> wrote:

Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Chirayu Patel
Heshan, You will find http://docs.python.org/lib/inspect-types.html helpful. "A.__dict__["foo"].func_code.co_varnames" will give you arguments of foo. CP On 3/13/08, Heshan Suriyaarachchi <[EMAIL PROTECTED]> wrote: > > Hi >I am talking about a scenario like this > > class A: > def foo(v

Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Pradeep Kishore Gowda
Ah! i forgot about the function parameter list.. Will look into it. +Pradeep On 3/13/08, Pradeep Kishore Gowda <[EMAIL PROTECTED]> wrote: > On 3/13/08, Heshan Suriyaarachchi <[EMAIL PROTECTED]> wrote: > > Hi > > >I am talking about a scenario like this > > > > class A: > > def foo(var

Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Pradeep Kishore Gowda
On 3/13/08, Heshan Suriyaarachchi <[EMAIL PROTECTED]> wrote: > 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 >

Re: [BangPypers] Finding methods in a python script

2008-03-13 Thread Heshan Suriyaarachchi
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 paramete

Re: [BangPypers] Finding methods in a python script

2008-03-12 Thread Pradeep Kishore Gowda
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 w

Re: [BangPypers] Finding methods in a python script

2008-03-12 Thread Akash
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 som

[BangPypers] Finding methods in a python script

2008-03-12 Thread Heshan Suriyaarachchi
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