"Kent Johnson" <[EMAIL PROTECTED]> wrote
> You can find out where any module is located using its __file__
> attribute. This works for modules written in C, too.
But not on Windoze. If it's built-in there is no __file__ attribute.
But the print trick tells you if it's builtin and if it's not __f
Dick Moores wrote:
> At http://wiki.python.org/moin/SimplePrograms I found this code:
>
>
> import itertools
>
> def iter_primes():
> # an iterator of all numbers between 2 and +infinity
> numbers = itertools.count(2)
>
> # generate pri
At 02:50 PM 7/13/2007, Alan Gauld wrote:
>"Dick Moores" <[EMAIL PROTECTED]> wrote in
>
>
> > import itertools
> >
> > def iter_primes():
> > # an iterator of all numbers between 2 and +infinity
> > numbers = itertools.count(2)
> > ...
>
> > It works for me in Win XP, Python 2.5.
> >
> > Ho
"Dick Moores" <[EMAIL PROTECTED]> wrote in
> import itertools
>
> def iter_primes():
> # an iterator of all numbers between 2 and +infinity
> numbers = itertools.count(2)
> ...
> It works for me in Win XP, Python 2.5.
>
> However, in trying to dig into the code to understand it,
> I
At 07:55 AM 7/13/2007, Eric Brunson wrote:
>Dick Moores wrote:
>>At http://wiki.python.org/moin/SimplePrograms I found this code:
>>
>>
>>import itertools
>>
>>def iter_primes():
>> # an iterator of all numbers between 2 and +infinity
>> numbers
Dick Moores wrote:
> At http://wiki.python.org/moin/SimplePrograms I found this code:
>
>
> import itertools
>
> def iter_primes():
> # an iterator of all numbers between 2 and +infinity
> numbers = itertools.count(2)
>
> # generate primes
At
http://wiki.python.org/moin/SimplePrograms I found this
code:
import itertools
def iter_primes():
# an iterator of all numbers between 2 and
+infinity
numbers = itertools.count(2)
# generate primes forever
while True:
#