Re: [Tutor] Finding prime numbers script runs much faster when run viabash shell than idle

2011-04-02 Thread Jaime Gago
Ok I understand now, thank you very much! On Apr 2, 2011, at 1:05 AM, Alan Gauld wrote: > "Jaime Gago" wrote >> When I run it via IDLE it's taking way more time than if I run it via a >> (bash) shell (on Os X 10.6) while doing $>python -d mypp.py >> I'm really curious from a performance perspec

Re: [Tutor] Finding prime numbers script runs much faster when run viabash shell than idle

2011-04-02 Thread Alan Gauld
"Jaime Gago" wrote When I run it via IDLE it's taking way more time than if I run it via a (bash) shell (on Os X 10.6) while doing $>python -d mypp.py I'm really curious from a performance perspective as to what could cause such a noticeable difference. IDLE is a development environment.

Re: [Tutor] Finding prime numbers script runs much faster when run via bash shell than idle

2011-04-02 Thread Peter Otten
Jaime Gago wrote: > I wrote a simple piece of code as an exercise to an online -free- class > that finds prime numbers. When I run it via IDLE it's taking way more time > than if I run it via a (bash) shell (on Os X 10.6) while doing $>python -d > mypp.py > > I'm really curious from a performance

Re: [Tutor] Finding prime numbers script runs much faster when run via bash shell than idle

2011-04-01 Thread Karim
On 04/02/2011 07:10 AM, Jaime Gago wrote: Hello there, Totally new to python with some *nix scripting knowledge. I wrote a simple piece of code as an exercise to an online -free- class that finds prime numbers. When I run it via IDLE it's taking way more time than if I run it via a (bash) shel

Re: [Tutor] Finding prime numbers script runs much faster when run via bash shell than idle

2011-04-01 Thread Karim
On 04/02/2011 07:10 AM, Jaime Gago wrote: Hello there, Totally new to python with some *nix scripting knowledge. I wrote a simple piece of code as an exercise to an online -free- class that finds prime numbers. When I run it via IDLE it's taking way more time than if I run it via a (bash) shel

[Tutor] Finding prime numbers script runs much faster when run via bash shell than idle

2011-04-01 Thread Jaime Gago
Hello there, Totally new to python with some *nix scripting knowledge. I wrote a simple piece of code as an exercise to an online -free- class that finds prime numbers. When I run it via IDLE it's taking way more time than if I run it via a (bash) shell (on Os X 10.6) while doing $>python -d myp

Re: [Tutor] Finding prime numbers

2007-09-20 Thread Luke Paireepinart
Michael Langford wrote: > Attachments are a bad thing to send to open mailing lists in general. Perhaps in general they are, but specifically, I'd prefer code that's decently long to be attached or pastebinned. e-mail clients and servers are often unfriendly on code. That's the point of attachment

Re: [Tutor] Finding prime numbers

2007-09-19 Thread Boykie Mackay
Thanks.That's solved! On Wed, 2007-09-19 at 13:01 -0400, [EMAIL PROTECTED] wrote: > > > [EMAIL PROTECTED] wrote on 09/19/2007 12:38:49 PM: > > > Sorry about that. > > > > I have posted the code below: > > > > #!/usr/bin/env python > > > > '''A program to generate prime numbers when given 2 n

Re: [Tutor] Finding prime numbers

2007-09-19 Thread christopher . henk
[EMAIL PROTECTED] wrote on 09/19/2007 12:38:49 PM: > Sorry about that. > > I have posted the code below: > > #!/usr/bin/env python > > '''A program to generate prime numbers when given 2 numbers''' > > def isPrime(number): > number=abs(int(number)) > #1 is not considered a prime number

Re: [Tutor] Finding prime numbers

2007-09-19 Thread Boykie Mackay
Sorry about that. I have posted the code below: #!/usr/bin/env python '''A program to generate prime numbers when given 2 numbers''' def isPrime(number): number=abs(int(number)) #1 is not considered a prime number if number<2: return False #2 is the only even prime numbe

Re: [Tutor] Finding prime numbers

2007-09-19 Thread Michael Langford
Attachments are a bad thing to send to open mailing lists in general. In your case, the list appears to have filtered off the code. Please paste it in inline. --Michael On 9/19/07, Boykie Mackay <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > Could you please look over my code 'attached' t

[Tutor] Finding prime numbers

2007-09-19 Thread Boykie Mackay
Hi Guys, Could you please look over my code 'attached' to find and print out prime numbers between to given values.When run it it is showing inaccuracies i.e printing out '49' and '95' as prime numbers. I have been through the code but can't seem to find where I may have gone wrong.I am sure it h