[Tutor] printing out the definition of a func

lonetwin lonetwin@yahoo.com
Sat, 22 Dec 2001 13:22:22 +0530

Hi Blake, Danny,
        Thanx !! ....thanx a lot.....I simply love this language !!! :)
(...and this list)

Blake replied :
> > the idea is, I fire up the intepreter as a sub process to
> > my program, connect the stdin/stdout to the sub-process,
> > with the stdin/stdout of my program
> Oh, that sounds really complicated...

     Oh yeah....I realised that today morn, after returning to do what I 
wanted to (btw, that "I won't get sleep" was all just to grab some attention 
and replies....I slept soundly :)).

> Why don't you use something like the "code" module to
> process the Python lines?
> http://www.python.org/doc/current/lib/module-code.html
        That looks nice ........but could someone post an example ...I just 
can't figure the "how" or rather the "what-is-it-for" of it.

> I wrote something similar for Jython.  You can find my
> code at: http://tor.dhs.org/~bwinton/Jython.jar
      Never used Jython.......but I will check what it's all about 
........sometime  ;o)

And finally Danny :
> Wait, wait, I spoke too soon.  It is possible!  Take a look at:
>    http://www.python.org/doc/lib/inspect-source.html
      U cool mann !! ......I mean although I'm using python 2.0, I guess even 
if I was using 2.1, I'm sure I wouldn't have found it without help, you sure 
do go out of your way to help. 

> Hope this helps,
> Blake & Danny
Sure does, not what I was hoping to do....but I learned a lot !!!


I get up each morning, gather my wits.
Pick up the paper, read the obits.
If I'm not there I know I'm not dead.
So I eat a good breakfast and go back to bed.

Oh, how do I know my youth is all spent?
My get-up-and-go has got-up-and-went.
But in spite of it all, I'm able to grin,
And think of the places my get-up has been.
                -- Pete Seeger