Re: sys.modules

2019-02-21 Thread Terry Reedy
On 2/21/2019 11:40 AM, ast wrote: Hello Is it normal to have 151 entries in dictionary sys.modules just after starting IDLE or something goes wrong ? The is the right number. When Python starts, it imports around 50 modules. When it runs IDLE, most of idlelib modules are imported, plus abo

Re: sys.modules

2019-02-21 Thread DL Neil
Hello, On 22/02/19 5:40 AM, ast wrote: Is it normal to have 151 entries in dictionary sys.modules just after starting IDLE or something goes wrong ? >>> import sys >>> len(sys.modules) 151 I don't use Idle. Written in python, doesn't it require various packages to run before it even talks

Re: sys.modules

2019-02-21 Thread Chris Angelico
On Fri, Feb 22, 2019 at 6:03 AM Chris Warrick wrote: > > On Thu, 21 Feb 2019 at 18:57, ast wrote: > > > > Hello > > > > Is it normal to have 151 entries in dictionary sys.modules > > just after starting IDLE or something goes wrong ? > > > > >>> import sys > > >>> len(sys.modules) > > 151 > > >

Re: sys.modules

2019-02-21 Thread Chris Warrick
On Thu, 21 Feb 2019 at 18:57, ast wrote: > > Hello > > Is it normal to have 151 entries in dictionary sys.modules > just after starting IDLE or something goes wrong ? > > >>> import sys > >>> len(sys.modules) > 151 > > Most of common modules seems to be already there, > os, itertools, random ...

Re: sys.modules and __main__ obscureness

2006-07-16 Thread K.S.Sreeram
Fuzzyman wrote: > That was a quick response. :-) > > Thanks very much. Sigh.. When I'm drowning in arcane win32 c++ crap, I tend to jump on anything interesting on python-list. It feels like a breath of fresh air! [sreeram;] signature.asc Description: OpenPGP digital signature -- http://mail

Re: sys.modules and __main__ obscureness

2006-07-16 Thread Fuzzyman
K.S.Sreeram wrote: > Fuzzyman wrote: > > This code behaves differently when entered into an interactive > > interpreter session. When run as a program you will see that module and > > namespace have both become None !! > > Thats because the reference count to the current '__main__' module goes > t

Re: sys.modules and __main__ obscureness

2006-07-16 Thread K.S.Sreeram
Fuzzyman wrote: > This code behaves differently when entered into an interactive > interpreter session. When run as a program you will see that module and > namespace have both become None !! Thats because the reference count to the current '__main__' module goes to 0, and the module object gets d