![]() ![]() |
||
![]() |
![]() |
|
![]() |
[wingide-users] bug? :: inconsistency in environmentStephan R.A. Deibel sdeibel@archaeopteryx.comWed, 12 Sep 2001 14:36:11 -0400 (EDT)
Hi, On Wed, 12 Sep 2001, Nigel Head wrote: > I just ran into a small inconsistency between what Wing (1.1b7) sets up and > running under pure python (2.1) : > > type(__builtins__) shows dictionary under Wing and pure python gives this as > a module. > > I only noticed because I have one script that patches the builtin str() to > replace it with something else and the code for doing the patching needs to > be different: (__builtins__.str=newstr vs. __builtins['str']=newstr). > > Is this difference intentional? Am I just displaying my Python novicehood? > Or what? No, you're absolutely correct and it's not intentional. There should be no difference between running under Wing and running in pure python. The problem was in the way we were launching with a globals space that was missing an entry for __builtins__. Python would supply the value internally but apparently behaves differently in some ways when this is missing (true also in 1.5.2 and 2.0.x). A work-around is to use wingdbstub.py instead of launching from within Wing. Or, apply patch #2 for 1.1b7, which fixes the bug: ftp://wingide.com/pub/wingide/prerelease/1.1b7/builtins-not-dict-bugfix.tar Just unpack into your Wing installation to replace existing files. - Stephan
Run by Mailman v 2.0.8 |
|
|
Copyright (c) 2000-2002, Archaeopteryx Software, Inc. Legal Statements | ||