Embedding: How to set globals for PyObject_Call
Michael Hudson
mwh at python.net
Thu Feb 21 11:59:53 EST 2002
More information about the Python-list mailing list
Thu Feb 21 11:59:53 EST 2002
- Previous message (by thread): Embedding: How to set globals for PyObject_Call
- Next message (by thread): Embedding: How to set globals for PyObject_Call
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
xscottgjunk at yahoo.com (Scott Gilbert) writes: > // This one breaks > Var g = VarEval("globals"); > g(); // This causes a segfault Do we get to see the backtrace? > // This one works > Var g = VarEval("globals()"); > > // As you pointed out, This one works too > VarExec("def GLOBALS(): return globals()"); > Var g = VarEval("GLOBALS"); > g(); > > Many other functions in the __builtin__ module work just fine. For > instance: > > Var hex = VarEval("hex"); > VarPrint(hex(1234)); > > So I think it's a little odd that some builtins are different in this > regard than others. I'd agree here. Cheers, M. -- Guido (like us!) is a bit schizophrenic here: he wants to be a benevolent dictator, but also wants to treat people like grownups. This probably worked better before Python got a large American audience <0.9 wink>. -- Tim Peters, 10 Feb 2000
- Previous message (by thread): Embedding: How to set globals for PyObject_Call
- Next message (by thread): Embedding: How to set globals for PyObject_Call
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list