I did do a google search i have looking through the one python book i have and there are plenty of references for how to write a function in Python but not as many on how to call a function stored in postgres using python I have tried the conn.execute(cmi_grn_cost(productCode)) and also the conn.callproc(cmi_grn_cost(productCode)) commands where conn is the connection object and cmi_grn_cost() is the the function getting called from Postgres and productCode is the variable to passed.
-- http://mail.python.org/mailman/listinfo/python-list