Scoping bugs in an embedded Python interpreter - Wizards please

2006-09-29 Thread morris . slutsky
So every now and then I like to mess around with hobby projects - I often end up trying to write an OpenGL video game. My last attempt aborted due to the difficulty of automating game elements and creating a good level editor - I basically needed a scripting language to control the C modules of th

the actual C code - Re: Scoping bugs in an embedded Python interpreter - Wizards please

2006-09-29 Thread morris . slutsky
Fredrik Lundh wrote: > [EMAIL PROTECTED] wrote: > > > But I'm suffering from serious scoping bugs. I hope someone here > > can help me with them. > > > > First of all, if I type in something like; > > > > def f(x): > > if x==1: > > return x > > else: > > return

Re: the actual C code - Re: Scoping bugs in an embedded Python interpreter - Wizards please

2006-10-01 Thread morris . slutsky
FOUND IT! http://mail.python.org/pipermail/python-list/1999-June/005833.html So I'm supposed to only have ONE dictionary, 'glb', and forget the 'loc' for locals. Just call PyRun(...glb,glb) Seeing as this was a topic of discussion 7 years ago, maybe it ought to be in the "extending and embe