Re: xml.dom's weirdness?

2008-07-28 Thread Paul Boddie
On 28 Jul, 16:15, Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > Stefan Behnel <[EMAIL PROTECTED]> wrote: > >Blame Ubuntu/Debian. > > I'd be wary about including Debian in that blame. Using 4.0 here, > with a 2.4.4 default and a 2.5.0 straight from the package: [...] I can imagine that some of the

Re: xml.dom's weirdness?

2008-07-28 Thread Sion Arrowsmith
Stefan Behnel <[EMAIL PROTECTED]> wrote: >Using my system Python (2.5.1 on Ubunutu Gutsy): > > $ strace -e open python -c '' 2>&1 | wc -l > 551 > $ strace -e open python -c '<><<' 2>&1 | wc -l > 4631 > >Using a self-built Python I have lying around: > > $ strace -e open python2.3 -c '' 2>&1 |

Re: xml.dom's weirdness?

2008-07-27 Thread Stefan Behnel
Lie wrote: > I'm more concerned about the number of modules imported by making an > error (from 30 on the startup to 187) and the side-effect of making an > error, which makes modules such as xml.*/email.* that previously > doesn't exist get imported out of the blue... Using my system Python (2.5.

Re: xml.dom's weirdness?

2008-07-27 Thread Lie
On Jul 27, 3:48 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Lie wrote: > > Question: Is there a way to list loaded modules, including those that > > aren't in my namespace? > > such as sys.modules? > > Modules are not unloaded automatically just because you do not use them > yourselves. I'm not

Re: xml.dom's weirdness?

2008-07-27 Thread Stefan Behnel
Lie wrote: > Question: Is there a way to list loaded modules, including those that > aren't in my namespace? such as sys.modules? Modules are not unloaded automatically just because you do not use them yourselves. If the module is imported for whatever reason by whatever other module, it stays al

Re: xml.dom's weirdness?

2008-07-26 Thread Lie
On Jul 26, 6:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Lie wrote: > > If you have any idea what black magic is happening in my computer > > right now, I'd appreciate it. > > command completion?  (no ubuntu within reach right now, so I cannot > check how they've set it up). > > try starting

Re: xml.dom's weirdness?

2008-07-26 Thread Fredrik Lundh
Lie wrote: If you have any idea what black magic is happening in my computer right now, I'd appreciate it. command completion? (no ubuntu within reach right now, so I cannot check how they've set it up). try starting python with the "-v" option, so you can see exactly when the import occu

Re: xml.dom's weirdness?

2008-07-26 Thread Lie
On Jul 26, 2:29 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Lie wrote: > > Why this generates AttributeError, then not? > > > Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) > > [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 > > Type "help", "copyright", "credits" or "license" for more informati

Re: xml.dom's weirdness?

2008-07-26 Thread Fredrik Lundh
Lie wrote: Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import xml xml.dom Traceback (most recent call last): File "", line 1

xml.dom's weirdness?

2008-07-25 Thread Lie
Why this generates AttributeError, then not? Python 2.5.2 (r252:60911, Apr 21 2008, 11:17:30) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xml >>> xml.dom Traceback (most recent call last): File "", line 1, in At