Re: Making the case for repeat

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 19:32:31 -0700, Tim Roberts wrote: > Steven D'Aprano wrote: >> >>Why is it that it's (almost) always newbies with about five minutes' >>worth of experience with Python that come up with these grandiose plans >>to replace entire modules with a single function? > > Well, many g

Re: Making the case for repeat

2009-06-06 Thread Terry Reedy
Tim Roberts wrote: Steven D'Aprano wrote: Why is it that it's (almost) always newbies with about five minutes' worth of experience with Python that come up with these grandiose plans to replace entire modules with a single function? Well, many great innovations in history have come from peop

Re: multi-core software

2009-06-06 Thread Jeff M.
On Jun 6, 9:58 pm, Paul Rubin wrote: > George Neuner writes: > > Even the lightest weight > > user space ("green") threads need a few hundred instructions, minimum, > > to amortize the cost of context switching. > > I thought the definition of green threads was that

Re: Making the case for repeat

2009-06-06 Thread Tim Roberts
Steven D'Aprano wrote: > >Why is it that it's (almost) always newbies with about five minutes' >worth of experience with Python that come up with these grandiose plans >to replace entire modules with a single function? Well, many great innovations in history have come from people who did not ha

Re: #! to two different pythons?

2009-06-06 Thread mh
Cameron Simpson wrote: > - Keep the "#!/usr/bin/env python" and then: > ln -s /usr/anim/menv/bin/pypix /usr/local/bin/python Ah, that's a good idea. The pypix is a company-wide maintained python, but ln -s python pypix on my local Mac laptop python install makes the env work quite nicel

Re: #! to two different pythons?

2009-06-06 Thread Cameron Simpson
On 06Jun2009 23:46, m...@pixar.com wrote: | Benjamin Peterson wrote: | > #!/usr/bin/env python | | But how can I handle this with two differently named pythons? | | #!/usr/anim/menv/bin/pypix | #!/Users/mh/py/bin/python Well, it depends _why_ you have a python named "pypix", but two so

Re: #! to two different pythons?

2009-06-06 Thread mh
Benjamin Peterson wrote: > #!/usr/bin/env python But how can I handle this with two differently named pythons? #!/usr/anim/menv/bin/pypix #!/Users/mh/py/bin/python Thanks! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd closure issue for generators

2009-06-06 Thread Aahz
In article , Terry Reedy wrote: > >(1) Calling the first and rest methods 'car' and 'cdr' convinces me that >schemers really do not want scheme to be popular, but prefer it to >remain a small cult language. What, you don't get a warm, fuzzy feeling from saying, "Today is the car of the cdr of

Re: Error in linalg.inv ??

2009-06-06 Thread Robert Kern
On 2009-06-06 18:08, Carl Banks wrote: On Jun 6, 3:31 pm, Robert Kern wrote: On 2009-06-06 17:09, John Machin wrote: Robert Kerngmail.com>writes: You have a very singular matrix (2*a[1] - a[0] == a[2]). You cannot invert it numerically and expect sensible results. Is raising an excep

Re: Error in linalg.inv ??

2009-06-06 Thread Carl Banks
On Jun 6, 3:31 pm, Robert Kern wrote: > On 2009-06-06 17:09, John Machin wrote: > > Robert Kern  gmail.com>  writes: > >> You have a very singular matrix (2*a[1] - a[0] == a[2]). You cannot invert > >> it > >> numerically and expect sensible results. > > > Is raising an exception (as documented >

Re: #! to two different pythons?

2009-06-06 Thread Benjamin Peterson
pixar.com> writes: > What's the best way to handle this? #!/usr/bin/env python -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k printing generators -- not!

2009-06-06 Thread Terry Reedy
samwyse wrote: The one thing that's killing me in Python 3000 py3.0 or py3.1, but the 'problem' you complain about has nothing to do with those versions in particular. is that every time I try to print something, it seems like I get at 0x01BAF508>. Nor does it have anything is particular

#! to two different pythons?

2009-06-06 Thread mh
I've got a bunch of python programs on linux that start with: #!/usr/anim/menv/bin/pypix Now I'm moving some to the mac, where I'm changing that to: #!/Users/mh/py/bin/python What's the best way to handle this? I've got an install script that rewrites the first line, but if I could eli

Re: Is it possible to use multidimensional arrays ?

2009-06-06 Thread bearophileHUGS
pdlem...@earthlink.net, if you are using Psyco and you aren't using NumPy and you want max speed you may use: NROWS = 24 NCOLS = 75 screen = array("H", [0]) * (NROWS * NCOLS) and then you can use items like this: screen[r * NCOLS + c] (If NCOLS is equal or a bit lower than a power of 2 it's bette

Re: Error in linalg.inv ??

2009-06-06 Thread Robert Kern
On 2009-06-06 17:09, John Machin wrote: Robert Kern gmail.com> writes: On 2009-06-06 00:34, Ajith Kumar wrote: from numpy import * Please ask numpy questions on the numpy mailing list, not here: http://www.scipy.org/Mailing_Lists a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.

Re: can it be shorter?

2009-06-06 Thread Scott David Daniels
kj wrote: ... And actually, if speed is the criterion, then one should also avoid endswith: from timeit import Timer min(Timer("if s[-1] != '/': s += '/'", "s = 'abcd/efgh'").repeat()) 0.18654584884643555 min(Timer("if not s.endswith('/'): s += '/'", "s = 'abcd/efgh'").repeat()) 0.433951139

Re: can it be shorter?

2009-06-06 Thread MRAB
kj wrote: In kj writes: In <023a8d04$0$20636$c3e8...@news.astraweb.com> Steven D'Aprano writes: On Sat, 06 Jun 2009 15:59:37 +, kj wrote: In "tsangpo" writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' els

Re: Error in linalg.inv ??

2009-06-06 Thread John Machin
Robert Kern gmail.com> writes: > > On 2009-06-06 00:34, Ajith Kumar wrote: > > from numpy import * > > Please ask numpy questions on the numpy mailing list, not here: > >http://www.scipy.org/Mailing_Lists > > > a = arange(1.,10.) > > b = reshape(a, [3,3]) > > c = linalg.inv(b) > > > > An

Re: Error in linalg.inv ??

2009-06-06 Thread Terry Reedy
Ajith Kumar wrote: [[ 1. 2. 3.] [ 4. 5. 6.] [ 7. 8. 9.]] Another way to see that this is singular is notice or calculate that (1,2,3) - 2*(4,5,6) + (7,8,9) = (0,0,0) Same is true for the columns. -- http://mail.python.org/mailman/listinfo/python-list

Re: can it be shorter?

2009-06-06 Thread kj
In kj writes: >In <023a8d04$0$20636$c3e8...@news.astraweb.com> Steven D'Aprano > writes: >>On Sat, 06 Jun 2009 15:59:37 +, kj wrote: >>> In "tsangpo" >>> writes: >>> I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1]

Re: Odd closure issue for generators

2009-06-06 Thread Terry Reedy
Michele Simionato wrote: Yes, most functional languages have the concept of streams. You can even define a stream-comprehension that looks like Python generator comprehension but it is an essentially different thing. See for instance http://www.artima.com/weblogs/viewpost.jsp?thread=251159 I

Re: Is it possible to use multidimensional arrays ?

2009-06-06 Thread Robert Kern
On 2009-06-06 14:48, pdlem...@earthlink.net wrote: All attempts have failed. import WConio import array screen = array.array('H',[0]*75,[0]*24) ERR array takes at most 2 arguments screen = array.array('H',[0]*75[0]*24)

Re: Error in linalg.inv ??

2009-06-06 Thread Robert Kern
On 2009-06-06 00:34, Ajith Kumar wrote: Hello, I ran the following code (Using Debian 5.0) from numpy import * Please ask numpy questions on the numpy mailing list, not here: http://www.scipy.org/Mailing_Lists a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c prin

Re: Is it possible to use multidimensional arrays ?

2009-06-06 Thread kj
In pdlem...@earthlink.net writes: >All attempts have failed. >import WConio >import array >screen = array.array('H',[0]*75,[0]*24) > ERR array takes at most 2 arguments >screen = array.array('H',[0]*75[0]*24) >T

Servizio aziende : messaggio per python-list@python.org

2009-06-06 Thread v . donati
Offriamo : Servizi di consulenza  per :  marketing ,  informatica , traduzioni Assistenza nazionale ed internazionale Per maggiori informazioni e preventivi mailto:sm...@woomail.com"; ;>clicca qui Per reclami inviare mail a mailto:matteoro...@gawab.com"; ;>SMINI Se non vuoi ricevere altri

Re: multi-core software

2009-06-06 Thread John Thingstad
På Sat, 06 Jun 2009 21:46:51 +0200, skrev George Neuner : On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green Add to that the fact that programmers have shown themselves, on average, to be remarkably bad at figuring out what _should_ be done in parallel - as opposed to what _can_ be done - and yo

Is it possible to use multidimensional arrays ?

2009-06-06 Thread pdlemper
All attempts have failed. import WConio import array screen = array.array('H',[0]*75,[0]*24) ERR array takes at most 2 arguments screen = array.array('H',[0]*75[0]*24) TypeErr int object is unsubscriptable

Re: multi-core software

2009-06-06 Thread George Neuner
On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green wrote: >On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku > wrote, quoted or indirectly quoted someone who >said : > >>Even for problems where it appears trivial, there can be hidden >>issues, like false cache coherency communication where no act

Re: can it be shorter?

2009-06-06 Thread Nick Craig-Wood
tsangpo wrote: > > "kj" 写入消息 news:h0e3p9$85...@reader1.panix.com... > > In "tsangpo" > > writes: > > > >>I want to ensure that the url ends with a '/', now I have to do thisa like > >>below. > >>url = url + '' if url[-1] == '/' else '/' > > > >>Is there a better way? > > > > It's a pity that

Re: openhook

2009-06-06 Thread Nick Craig-Wood
Gaudha wrote: > Can anybody tell me what is meant by 'openhook' ? http://docs.python.org/library/fileinput.html?highlight=openhook Maybe ;-) -- Nick Craig-Wood -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list

Re: python repository?

2009-06-06 Thread Benjamin Kaplan
On Saturday, June 6, 2009, wrote: > Hi, > > I've written a large body of my work in MATLAB over the years. But it > looks like I'll need to move to Python soon. Is there a common > resource where people can post files for others to use such as the > MATLAB central file exchange? > > Thanks, > Joh

Re: can it be shorter?

2009-06-06 Thread kj
In <023a8d04$0$20636$c3e8...@news.astraweb.com> Steven D'Aprano writes: >On Sat, 06 Jun 2009 15:59:37 +, kj wrote: >> In "tsangpo" >> writes: >> >>>I want to ensure that the url ends with a '/', now I have to do thisa >>>like below. >>>url = url + '' if url[-1] == '/' else '/' >> >>>Is

Re: Programming language comparison examples?

2009-06-06 Thread Simon Brunning
2009/6/5 : > someone: >> I thought there was a website which demonstrated how to program a bunch of >> small problems in a number of different languages. > > http://www.rosettacode.org/wiki/Main_Page > http://en.literateprograms.org/LiteratePrograms:Welcome > http://www.codecodex.com/wiki/index.ph

ANN: pyTenjin 0.8.0 - much faster template engine than Django

2009-06-06 Thread kwatch
I have released pyTenjin 0.8.0 http://www.kuwata-lab.com/tenjin/ pyTenjin is the fastest template engine for Python. * Very fast (about 10 times faster than Django template engine) * Easy to learn (no need to learn template-original language) * Full-featured (layout template, partial template, pr

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sun, 07 Jun 2009 00:21:45 +0800, tsangpo wrote: > "kj" 写入消息 news:h0e3p9$85t $...@reader1.panix.com... >> In "tsangpo" >> writes: >> >>>I want to ensure that the url ends with a '/', now I have to do thisa >>>like below. >>>url = url + '' if url[-1] == '/' else '/' >> >>>Is there a better way

Re: openhook

2009-06-06 Thread Emile van Sebille
On 6/6/2009 6:47 AM Scott David Daniels said... Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. OK -- kidding aside, the only python related reference I find is in a proposal and patch [1] made by Anthony Roy for changes to the fileinput module. It's

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 15:59:37 +, kj wrote: > In "tsangpo" > writes: > >>I want to ensure that the url ends with a '/', now I have to do thisa >>like below. >>url = url + '' if url[-1] == '/' else '/' > >>Is there a better way? > > It's a pity that in python regexes are an "extra", as it we

python repository?

2009-06-06 Thread woodchips
Hi, I've written a large body of my work in MATLAB over the years. But it looks like I'll need to move to Python soon. Is there a common resource where people can post files for others to use such as the MATLAB central file exchange? Thanks, John -- http://mail.python.org/mailman/listinfo/python

Re: py3k printing generators -- not!

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 05:28:30 -0700, samwyse wrote: > The one thing that's killing me in Python 3000 Python 3000 was vapourware. When the vapour condensed into liquid, it was renamed Python 3. Right now, the only vapourware is Python4000, which may or may not be created by Guido's heir some tim

Re: can it be shorter?

2009-06-06 Thread tsangpo
"kj" 写入消息 news:h0e3p9$85...@reader1.panix.com... In "tsangpo" writes: I want to ensure that the url ends with a '/', now I have to do thisa like below. url = url + '' if url[-1] == '/' else '/' Is there a better way? It's a pity that in python regexes are an "extra", as it were. Other

Re: openhook

2009-06-06 Thread Martin P. Hellwig
Steven D'Aprano wrote: On Sat, 06 Jun 2009 06:47:34 -0700, Scott David Daniels wrote: Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. It's just like closehook, only different. Just like the flipflophook, the quantumhook and captain hook. -- MPH ht

Re: Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread bearophileHUGS
akindo: > So, it seems I want the best of both worlds: specific indexing using   > my own IDs/keys (not just by list element location), sorting and the   > ability to start iterating from a specific location. A sorted associative map may be fit. A data structure based on a search tree, like a red-

Re: can it be shorter?

2009-06-06 Thread kj
In "tsangpo" writes: >I want to ensure that the url ends with a '/', now I have to do thisa like >below. >url = url + '' if url[-1] == '/' else '/' >Is there a better way? It's a pity that in python regexes are an "extra", as it were. Otherwise I'd propose: url = re.sub("/?$", "/", url) k

Re: Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread Diez B. Roggisch
akindo schrieb: Hi all. I am new to Python and have a problem regarding data structures. In my application I will be having several messages and my own type of IDs (Lamport clocks) to go with these messages. I will need to frequently ask for specific messages based on the ID. Hence a dictionar

Re: PyQt icon problem

2009-06-06 Thread Pieter Provoost
Correction: when using py2exe, no icon, empty space or message is visible (the app is running though). On Ubuntu, there is an empty space but messages are not displayed. 2009/6/6 Pieter Provoost > Hi, > > My application has a QSystemTrayIcon, which needs to be changed once in a > while. The PNG

Re: openhook

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 06:47:34 -0700, Scott David Daniels wrote: > Gaudha wrote: >> Can anybody tell me what is meant by 'openhook' ? > Certainly someone can. It's just like closehook, only different. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: can it be shorter?

2009-06-06 Thread Steven D'Aprano
On Sat, 06 Jun 2009 23:07:58 +0800, tsangpo wrote: > I want to ensure that the url ends with a '/', now I have to do thisa > like below. > url = url + '' if url[-1] == '/' else '/' > > Is there a better way? if not url.endswith('/'): url += '/' -- Steven -- http://mail.python.org/mailma

Iterating Over Dictionary From Arbitrary Location

2009-06-06 Thread akindo
Hi all. I am new to Python and have a problem regarding data structures. In my application I will be having several messages and my own type of IDs (Lamport clocks) to go with these messages. I will need to frequently ask for specific messages based on the ID. Hence a dictionary seems a bet

Re: py3k printing generators -- not!

2009-06-06 Thread samwyse
On Jun 6, 7:58 am, Carl Banks wrote: > On Jun 6, 5:28 am, samwyse wrote: > > Always saying "print(','.join(x))" gets tiresome in a hurry.   > > What about print(list(x)) Yeah, I like that. Or, to save some typing: prnt = lambda x: print(list(x)) > Interestingly, the fact that it wasn't in b

Re: openhook

2009-06-06 Thread Scott David Daniels
Gaudha wrote: Can anybody tell me what is meant by 'openhook' ? Certainly someone can. -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k printing generators -- not!

2009-06-06 Thread bearophileHUGS
Carl Banks: > What about print(list(x)) Right, better than mine :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

PyQt icon problem

2009-06-06 Thread Pieter Provoost
Hi, My application has a QSystemTrayIcon, which needs to be changed once in a while. The PNG icons are converted into a module using pyrcc4. When I run the Python script on my Windows system everything works fine, but when run it on Ubuntu or when I use py2exe, the icons are not visible (there's o

Re: py3k printing generators -- not!

2009-06-06 Thread bearophileHUGS
samwyse: > Always saying "print(','.join(x))" gets tiresome in a hurry.  I've > thought about defining my own function "prnt" that wraps print and > fixes generators, but that requires me to get their type, Why do you need to know their type? Isn't something like this enough? def pr(it): txt

Re: py3k printing generators -- not!

2009-06-06 Thread Carl Banks
On Jun 6, 5:28 am, samwyse wrote: > The one thing that's killing me in Python 3000 is that every time I > try to print something, it seems like I get at 0x01BAF508>.  Googling only found one reference, a > posting elsewhere by one Carl Johnson (aka > carlj7,http://www.artima.com/forums/flat.jsp

Re: MD6 in Python

2009-06-06 Thread Aahz
In article , Terry Reedy wrote: >Aahz wrote: >> >> Um, what? You mean 3.1rc1, right? Nevertheless, my understanding is >> that 2.7 is mostly restricted to code landed in 3.1, so your second >> statement is roughly correct. > >My understanding is that 2.7 will come out about the same time as 3.2

py3k printing generators -- not!

2009-06-06 Thread samwyse
The one thing that's killing me in Python 3000 is that every time I try to print something, it seems like I get at 0x01BAF508>. Googling only found one reference, a posting elsewhere by one Carl Johnson (aka carlj7, http://www.artima.com/forums/flat.jsp?forum=106&thread=211200#275387), which appa

interval arithmetic libraries

2009-06-06 Thread srepmub
Hi all, I'm looking for libraries that allow one to calculate with sets of (date) intervals. So for example, I'd like to be able to calculate the overlap between two sets of intervals, the union etc. Preferrably, this works with datetime objects, is written in pure Python, and has reasonably good

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
"Miles Kaufmann" wrote: > On Jun 4, 2009, at 3:25 AM, Hendrik van Rooyen wrote: > > > A can is like a pickle, in that it is a string, but anything > > can be canned. > > Unlike a pickle, a can cannot leave the process, though, > > unless the object it points to lives in shared memory. > > > > If

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
"Scott David Daniels" wrote: > I can think of use cases for can, and from that use an alternate > construct. The use case is passing a reference out over a wire > (TCP port?) that will be used later. This will work, provided the thing is still alive and in the same place when the can eventuall

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Hendrik van Rooyen
"Gabriel Genellina" wrote: > From your description of the problem, it seems you are acting upon >messages received from a serial port. You have to process the message >*before* the next one arrives -- but you gain nothing doing that much >faster. In other words, even with a blazingly fast p

Re: Messing up with classes and their namespace

2009-06-06 Thread Dave Angel
Jean-Michel Pichavant wrote: Scott David Daniels wrote: Jean-Michel Pichavant wrote: Hello world, I had recently a very nasty bug in my python application. The context is quite complex, but in the end the problem can be resume as follow: 2 files in the same directory : lib.py: >import fo

Re: Christian Audigier Bikinis

2009-06-06 Thread Lawrence D'Oliveiro
In message , tanvo...@gmail.com wrote: > Please check our web ... Wow, you have a web. I always wanted to have one of those. -- http://mail.python.org/mailman/listinfo/python-list

Re: A simpler logging configuration file format?

2009-06-06 Thread Lawrence D'Oliveiro
In message <30db8a0b-5b19-47e4-9364-54cbd7a7c...@h23g2000vbc.googlegroups.com>, geoff.ba...@gmail.com wrote: > At the moment, if I want to add a new logger "foo" writing to its own > file "foo" to my config file, I have to repeat the name 7(!) times, > editing 3 different sections in the process

Re: Scope objects

2009-06-06 Thread Gabriel Genellina
En Sat, 06 Jun 2009 03:03:34 -0300, escribió: On Jun 5, 8:56 pm, Robert Dailey wrote: Is it possible to create an object in Python that will clean itself up at function exit? I realize destruction of objects may not occur immediately and can be garbage collected, but this functionality would

Re: Winter Madness - Passing Python objects as Strings

2009-06-06 Thread Miles Kaufmann
On Jun 4, 2009, at 3:25 AM, Hendrik van Rooyen wrote: A can is like a pickle, in that it is a string, but anything can be canned. Unlike a pickle, a can cannot leave the process, though, unless the object it points to lives in shared memory. If you have any interest, contact me and I will send

Re: Way to use proxies & login to site?

2009-06-06 Thread Kushal Kumaran
On Fri, Jun 5, 2009 at 10:32 PM, inVINCable wrote: > On May 5, 12:51 pm, Kushal Kumaran wrote: >> On Wed, Apr 29, 2009 at 8:21 AM, inVINCable wrote: >> > On Apr 27, 7:40 pm, inVINCable wrote: >> >> Hello, >> >> >> I have been using ClientForm to log in to sites & ClientCookie so I >> >> can aut

Re: urlretrieve() failing on me

2009-06-06 Thread Peter Otten
Robert Dailey wrote: >> Well I did not post the code because it is fairly complex and its hard >> to give you the whole picture without giving you too much code. But >> here you go, you get what you ask for: >> >> def Download( self ): >> PrintSubStatus( 'Downloading...' ) >> destination = normali

Re: Error in linalg.inv ??

2009-06-06 Thread Nick Craig-Wood
Ajith Kumar wrote: > I ran the following code (Using Debian 5.0) > > from numpy import * > a = arange(1.,10.) > b = reshape(a, [3,3]) > c = linalg.inv(b) > print b > print c > print dot(b,c) > print dot(c,b) > > And the result is > > [[ 1. 2. 3.] > [ 4. 5. 6.] > [ 7. 8. 9.

Re: Error in linalg.inv ??

2009-06-06 Thread John Machin
On Jun 6, 3:34 pm, Ajith Kumar wrote: > Hello, >  I ran the following code (Using Debian 5.0) > > from numpy import * > a = arange(1.,10.) > b = reshape(a, [3,3]) > c = linalg.inv(b) > print b > print c > print dot(b,c) > print dot(c,b) > > And the result is > > [[ 1.  2.  3.] >  [ 4.  5.  6.] >  

Re: __file__ access extremely slow

2009-06-06 Thread Zac Burns
I think I have figured this out, thanks for your input. The time comes from lazy modules related to e-mail importing on attribute access, which is acceptable. Hence of course why ImportError was sometime raised. I originally was thinking that accessing __file__ was triggering some mechanism that