What is preferable method to debug and execute python code in Mac? I do not like the cmd/terminal execution. Thank you.
> On Aug 26, 2014, at 6:00 AM, tutor-requ...@python.org wrote: > > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to > tutor-requ...@python.org > > You can reach the person managing the list at > tutor-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." > > > Today's Topics: > > 1. time vs. timeit (diliup gabadamudalige) > 2. Re: time vs. timeit (Chris ?Kwpolska? Warrick) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 26 Aug 2014 09:56:55 +0530 > From: diliup gabadamudalige <dili...@gmail.com> > To: "tutor@python.org" <tutor@python.org> > Subject: [Tutor] time vs. timeit > Message-ID: > <camxbqsngq3jse0n2hvjhkpofcr21egh3n5b0vygx7-0kot3...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi all, > > 1. why do some say that the time module is more accurate than the timeit > module? > s = time.time() > or > s = timeit.timeit() > > 2. Why is it that both modules never return the same answer on each run? > > Thank you for your response. > > -- > Diliup Gabadamudalige > > http://www.diliupg.com > http://soft.diliupg.com/ > > ********************************************************************************************** > This e-mail is confidential. It may also be legally privileged. If you are > not the intended recipient or have received it in error, please delete it > and all copies from your system and notify the sender immediately by return > e-mail. Any unauthorized reading, reproducing, printing or further > dissemination of this e-mail or its contents is strictly prohibited and may > be unlawful. Internet communications cannot be guaranteed to be timely, > secure, error or virus-free. The sender does not accept liability for any > errors or omissions. > ********************************************************************************************** > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://mail.python.org/pipermail/tutor/attachments/20140826/0cf26987/attachment-0001.html> > > ------------------------------ > > Message: 2 > Date: Tue, 26 Aug 2014 10:34:15 +0200 > From: Chris ?Kwpolska? Warrick <kwpol...@gmail.com> > To: diliup gabadamudalige <dili...@gmail.com> > Cc: "tutor@python.org" <tutor@python.org> > Subject: Re: [Tutor] time vs. timeit > Message-ID: > <CAMw+j7JVtusUJa7ZK=qam8b6yxz6l5z0ynqedwtso2t357y...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > On Tue, Aug 26, 2014 at 6:26 AM, diliup gabadamudalige > <dili...@gmail.com> wrote: >> Hi all, >> >> 1. why do some say that the time module is more accurate than the timeit >> module? >> s = time.time() >> or >> s = timeit.timeit() >> >> 2. Why is it that both modules never return the same answer on each run? > > The two functions have completely different uses, and do completely > different things. > >>>> help(time.time) > Help on built-in function time in module time: > > time(...) > time() -> floating point number > > Return the current time in seconds since the Epoch. > Fractions of a second may be present if the system clock provides them. > > > In other words, return this: http://en.wikipedia.org/wiki/Unix_time > > >>>> help(timeit) > NAME > timeit - Tool for measuring execution time of small code snippets. > > [?] > | timeit(self, number=1000000) > | Time 'number' executions of the main statement. > | > | To be precise, this executes the setup statement once, and > | then returns the time it takes to execute the main statement > | a number of times, as a float measured in seconds. The > | argument is the number of times through the loop, defaulting > | to one million. The main statement, the setup statement and > | the timer function to be used are passed to the constructor. > > -- > Chris ?Kwpolska? Warrick <http://chriswarrick.com/> > PGP: 5EAAEA16 > stop html mail | always bottom-post | only UTF-8 makes sense > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Tutor maillist - Tutor@python.org > https://mail.python.org/mailman/listinfo/tutor > > > ------------------------------ > > End of Tutor Digest, Vol 126, Issue 64 > ************************************** _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor