Steven D. Arnold ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
plpython: sys module doesn't know about _getframe

Long Description
I have a module which I import and use in plpython functions.  One function in this 
module imports sys and then uses sys._getframe().  When it tries to do this, plpython 
says:

exceptions.AttributeError: 'sys' module has no attribute '_getframe'

The same function using Python directly works fine.  Does plpython use a specialized 
version of Python or a specialized sys module?

Sample Code
create function foo() returns integer as '
    import data_handler
    result = data_handler.qse("""SELECT * FROM users""")
    return 1
' language 'plpython';

[In module data_handler]
import sys
def qse(s, layers=1):
    loc = sys._getframe(layers).f_locals
    glb = sys._getframe(layers).f_globals
    [...]
    return s


No file was uploaded with this report


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to