On Jan 6, 6:35 am, chaouche yacine wrote:
> Hi. In the standard pytohon interpreter and in ipython, __builtins__ is a
> module, but in bpython it's a dictionnary. Was it redefined ?
I'd say it's a result of however bpython works and this:
"By default, when in the __main__ module, __builtins__ i
On Sun, Oct 14, 2012 at 9:36 PM, Juergen Bartholomae
wrote:
> Unfortunately, replacing __builtins__ at import time won't do, because
> external modules (that is, .py) get imported only once when they are
> accessed by the first thread, which includes (of course) setting up of
> __dict__ and __buil
>> One possible solution is to somehow redirect every __builtins__ to a
>> function that returns a different __builtins__ dictionary for each thread
>> (such a function already exists).
>How exactly does the code reference it? If they're simply referring to
>the name __builtins__ at module level,
On 10/11/2012 10:16 AM, Juergen Bartholomae wrote:
> Hello.
> I have quite a peculiar problem.
>
> A little overview of our situation:
> Our program enables our users to write their own python code (which they
> use extensively).
> Unfortunately, (due to us actually encouraging this in an earlier r
On Fri, Oct 12, 2012 at 1:16 AM, Juergen Bartholomae
wrote:
> One possible solution is to somehow redirect every __builtins__ to a
> function that returns a different __builtins__ dictionary for each thread
> (such a function already exists).
How exactly does the code reference it? If they're si
En Sun, 07 Sep 2008 19:30:07 -0300, Steven D'Aprano
<[EMAIL PROTECTED]> escribió:
Gabriel, could I please ask you to configure your news-reader software or
editor to limit the length of each line of your posts to 70 characters
wide, as per the common standard for email and Usenet? Your lines a
Gabriel, could I please ask you to configure your news-reader software or
editor to limit the length of each line of your posts to 70 characters
wide, as per the common standard for email and Usenet? Your lines are
significantly longer than that, including one single line which is 325
character
On Sep 7, 2:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Inside PyFrame_New, there is a shortcut: if the new frame and
> the previous one share the same globals, then the previous
> builtins are copied into the new frame. Only if the globals
> differ the builtins are searched in globals.
En Sun, 07 Sep 2008 14:00:48 -0300, Patrick Maupin <[EMAIL PROTECTED]> escribió:
> __builtins__ in 2.5.2 doesn't seem to behave like I remember it did
> the last time I did some custom stuff with it, a very long time ago.
>
> This isn't surprising, because of ongoing optimization, but it's hard
>
LHB <[EMAIL PROTECTED]> writes:
> Marc 'BlackJack' Rintsch a écrit :
> > `__builtins__` is an implementation detail, and `__builtin__` is a name
> > of a module you can import. You should not use `__builtins__` but import
> > `__builtin__` and inspect that instead of `__builtins__`.
> Ok. Should
Marc 'BlackJack' Rintsch a écrit :
> On Fri, 08 Feb 2008 00:25:14 -0800, loquehumaine wrote:
>
>> I have seen that if I type help() at a prompt, and then 'modules',
>> I'll be given a list of all modules available, thanks to this group..
>> But I have seen the differences between them and the one
On Fri, 08 Feb 2008 00:25:14 -0800, loquehumaine wrote:
> I have seen that if I type help() at a prompt, and then 'modules',
> I'll be given a list of all modules available, thanks to this group..
> But I have seen the differences between them and the one in
> dir(__builtins__).
> Why are some mod
__builtins__ (plural form) is a CPython implementation detail.
if you want to access the __builtin__ module, import it as usual:
import __builtin__
f = __builtin__.open(...)
if you're interested in CPython implementation details, study the CPython
source code.
Ok, I agree. I was an idio
Laszlo Zsolt Nagy wrote:
> Given this module "test.py":
>
> print type(__builtins__)
>
> I ran into a wreid thing.
>
> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> __builtins__
>
> >>>
14 matches
Mail list logo