Function calling another function

Satish Chimakurthi skchim0 at engr.uky.edu
Mon Mar 1 23:11:24 CET 2004


Hi all,

My question is surely a basic one, but somehow, I am not able to figure it out. 

I have a python file "satish.py" as follows:


        *satish.py*
def main():
    y()
    x()


def y():
    ..
    ..

def x():
    ...
    ..    
    y()

main()


When I execute satish.py, main() executes. I was expecting y() to execute first and then x() and then y() again. I wanted function x() to be capable of calling function y(). With this form of code, seems like function x() is not recognising function y(). Is there any sort of import or anything else that I can do here ?? 



Thanks in advance for your help

Regards,
Satish


SATISH KUMAR CHIMAKURTHI
Graduate Research Assistant
CFD GROUP
Mechanical Engineering
UNIVERSITY OF KENTUCKY
Lexington
KENTUCKY - 40508
U.S.A

Email: skchim0 at engr.uky.edu
Mobile:859-420-9890
Office: 859-257-6336 X 80691
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040301/1752ae9d/attachment.html>


More information about the Python-list mailing list