Le Mon, 26 Jan 2009 22:38:24 -,
"Alan Gauld" a écrit :
> "spir" wrote
>
> > Here are some ideas around import. I wish to receive comments
>
> > The module attribute __all__ allows defining names to be exported.
> > I always use it for my own modules, and also sometimes define it in
> > ext
"spir" wrote
"Secure import" means that I, as client of the imported module,
know that this module defines __all__. I can then safely import all.
I still don;t agree that simply defining __all__ means you can
"safely"
import all. all restricts what the module exposes it does nothing to
pre
Hai Denis,
spir wrote:
"Secure import" means that I, as client of the imported module, know that
this module defines __all__. I can then safely import all. I can even
precisely know which names are defined simply by reading __all__. The common
practice of defining __all__ on top of a module hel
On Tue, Jan 27, 2009 at 12:34 AM, Alexei Vinidiktov
wrote:
> Hello,
>
> Since yesterday I've been having problems running Python. I've been
> getting the error "import site failed; use -v for traceback". IDLE
> won't start either.
>
> The traceback seems to sugget that Python "cannot import name a
Kent, you are absolutely correct. I did not need the line number 5 at
all. This was my first program that addressed a "real life"
scenario. I am excited that it worked.
Thank you,
Tonu
Kent Johnson wrote:
On Mon, Jan 26, 2009 at 4:53 PM, Tonu Mikk wrote:
I now have a new question re
On Tue, Jan 27, 2009 at 11:24 AM, Alexei Vinidiktov
wrote:
> 2009/1/27 Kent Johnson :
>> My best guess is that somehow Python is finding the wrong
>> encodings\aliases.py.
>
> I can't find an aliases.py file within the encodings folder. Should it be
> there?
Yes, you should have a file
C:\Pytho
Forwarding to the list
-- Forwarded message --
From: Alexei Vinidiktov
Date: Tue, Jan 27, 2009 at 11:24 AM
Subject: Re: [Tutor] import site failed (WinXP)
To: Kent Johnson
2009/1/27 Kent Johnson :
> On Tue, Jan 27, 2009 at 12:34 AM, Alexei Vinidiktov
> wrote:
>> Hello,
>>
>>
2009/1/27 Kent Johnson :
> On Tue, Jan 27, 2009 at 11:24 AM, Alexei Vinidiktov
> wrote:
>> 2009/1/27 Kent Johnson :
>
>>> My best guess is that somehow Python is finding the wrong
>>> encodings\aliases.py.
>>
>> I can't find an aliases.py file within the encodings folder. Should it be
>> there?
>
On Tue, Jan 27, 2009 at 11:43 AM, Alexei Vinidiktov
wrote:
> 2009/1/27 Kent Johnson :
>> On Tue, Jan 27, 2009 at 11:24 AM, Alexei Vinidiktov
>> wrote:
>>> 2009/1/27 Kent Johnson :
>>
My best guess is that somehow Python is finding the wrong
encodings\aliases.py.
>>>
>>> I can't find an
I neglected to mention that we'd like you to always reply-all so a copy
goes to the list. All of us participate and learn.
Donna Ibarra wrote:
The numbers that are outputted are not exactly correct as they should
be for Newtons Method:
OK - thanks - now please give us a few sample numbers, th
2009/1/28 Kent Johnson :
> On Tue, Jan 27, 2009 at 11:43 AM, Alexei Vinidiktov
> wrote:
>> 2009/1/27 Kent Johnson :
>>> On Tue, Jan 27, 2009 at 11:24 AM, Alexei Vinidiktov
>>> wrote:
2009/1/27 Kent Johnson :
>>>
> My best guess is that somehow Python is finding the wrong
> encodings\
"Alexei Vinidiktov" wrote
I've conducted another experiment. I created several text files with
a
Notepad that contained text 'alia' in their names and none of them
were visible after I had saved them to the disc.
Now that is strange! Does "alia" mean something in your local language
(assumi
2009/1/28 Alan Gauld :
>
> "Alexei Vinidiktov" wrote
>
>> I've conducted another experiment. I created several text files with a
>> Notepad that contained text 'alia' in their names and none of them
>> were visible after I had saved them to the disc.
>
> Now that is strange! Does "alia" mean somet
As I think more about how to best do this, I wonder if/how python
script would import File A with search values, File B to be searched,
and write each full line containing any of those results to File C.
The code could be set to look for the same input file (A, with the
search values), and the same
"Scott Stueben" wrote
As I think more about how to best do this, I wonder if/how python
script would import File A with search values, File B to be
searched,
and write each full line containing any of those results to File C.
The code could be set to look for the same input file (A, with the
Hello there,
I got the following function while googling:
def totient(n):
"""calculate Euler's totient function.
If [[p_0,m_0], [p_1,m_1], ... ] is a prime factorization of 'n',
then the totient function phi(n) is given by:
(p_0 - 1)*p_0**(m_0-1) * (p_1 - 1)*p_1**(m_1-1) * .
2009/1/28 col speed :
> Hello there,
> I got the following function while googling:
>
> def totient(n):
> """calculate Euler's totient function.
>
> If [[p_0,m_0], [p_1,m_1], ... ] is a prime factorization of 'n',
> then the totient function phi(n) is given by:
>
> (p_0 - 1)*p_
That's what I thought , but I tried it to no avail. Plus the syntax is
wrong.
Thanks anyway
Colin
2009/1/28 John Fouhy
> 2009/1/28 col speed :
> > Hello there,
> > I got the following function while googling:
> >
> > def totient(n):
> > """calculate Euler's totient function.
> >
> > If
2009/1/28 Alexei Vinidiktov :
> 2009/1/28 Alan Gauld :
>>
>> "Alexei Vinidiktov" wrote
>>
>>> I've conducted another experiment. I created several text files with a
>>> Notepad that contained text 'alia' in their names and none of them
>>> were visible after I had saved them to the disc.
>>
>> Now
19 matches
Mail list logo