[code.view]

[top] / python / PyMOTW / cgitb / cgitb_local_vars.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2009 Doug Hellmann.  All rights reserved.
     #
     """Local variables lead to an answer
     """
     #end_pymotw_header
     
     import cgitb
     cgitb.enable(format='text')
     
     def func2(a, divisor):
         return a / divisor
     
     def func1(a, b):
         c = b - 5
         return func2(a, c)
     
     func1(1, 5)
     

[top] / python / PyMOTW / cgitb / cgitb_local_vars.py

contact | logmethods.com