Re: time module

2015-11-08 Thread Marko Rauhamaa
input/ldompel...@casema.nl: > Yes, I would like seconds since start of program. > Can I not doing something like time()=0 only this gives an error. Here: class MyReckoning: def __init__(self): self.the_beginning = time.time() def time(self): return ti

Re: time module

2015-11-08 Thread input/ldompeling
> Ambiguous requirement: any normal counter starts from zero... But what > "zero" represents may differ... Seconds since Jan 1 1970? Seconds since > midnight? Seconds since start of program? Thanks for the reply Yes, I would like seconds since start of program. Can I not doing something like tim

Re: time module

2015-11-07 Thread Cameron Simpson
On 07Nov2015 21:27, input/ldompel...@casema.nl wrote: I like to have a function that prints time in seconds. I am looking for something for example that seconds count from zero. I search the internet for time module in python but could not found anathing usefull. Here: https://docs.python.

Re: time module vs. datetime module: plain language for beginners

2015-03-27 Thread Ian Kelly
On Fri, Mar 27, 2015 at 6:31 PM, Jinghui Niu wrote: > On Wednesday, March 25, 2015 at 2:17:03 PM UTC-7, Jinghui Niu wrote: >> I am learning python programming. One thing that gives me a lot of confusion >> is the division of labours between the time module and the datetime module. >> >> As it tur

Re: time module vs. datetime module: plain language for beginners

2015-03-27 Thread Jinghui Niu
On Wednesday, March 25, 2015 at 2:17:03 PM UTC-7, Jinghui Niu wrote: > I am learning python programming. One thing that gives me a lot of confusion > is the division of labours between the time module and the datetime module. > > As it turns out to be, time module is not only about time, it's abo

Re: time module vs. datetime module: plain language for beginners

2015-03-25 Thread Mark Lawrence
On 25/03/2015 23:49, Ian Kelly wrote: On Wed, Mar 25, 2015 at 3:16 PM, Jinghui Niu wrote: I am learning python programming. One thing that gives me a lot of confusion is the division of labours between the time module and the datetime module. As it turns out to be, time module is not only abo

Re: time module vs. datetime module: plain language for beginners

2015-03-25 Thread Ian Kelly
On Wed, Mar 25, 2015 at 3:16 PM, Jinghui Niu wrote: > I am learning python programming. One thing that gives me a lot of confusion > is the division of labours between the time module and the datetime module. > > As it turns out to be, time module is not only about time, it's about date > too. A

Re: time module vs. datetime module: plain language for beginners

2015-03-25 Thread Steven D'Aprano
On Thu, 26 Mar 2015 08:16 am, Jinghui Niu wrote: > I am learning python programming. One thing that gives me a lot of > confusion is the division of labours between the time module and the > datetime module. > > As it turns out to be, time module is not only about time, it's about date > too. And

Re: time module methods give an am or pm value ?

2008-06-09 Thread dj
On Jun 7, 9:40 am, Scott David Daniels <[EMAIL PROTECTED]> wrote: > dj wrote: > > Hello again, > > > Does anyone know which method in the time module will generate and am > > or pm ? > > If none of the method will do this for me. Can I produce the value on > > my own ? > > Any suggestions ? > > Rea

Re: time module methods give an am or pm value ?

2008-06-09 Thread dj
On Jun 7, 9:24 am, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > "dj" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Hello again, > > > Does anyone know which method in the time module will generate and am > > or pm ? > > If none of the method will do this for me. Can I produce

Re: time module methods give an am or pm value ?

2008-06-07 Thread Scott David Daniels
dj wrote: Hello again, Does anyone know which method in the time module will generate and am or pm ? If none of the method will do this for me. Can I produce the value on my own ? Any suggestions ? Read up about strftime (a function, not a method). Generally, if you know you'll be using somet

Re: time module methods give an am or pm value ?

2008-06-07 Thread Mark Tolonen
"dj" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello again, Does anyone know which method in the time module will generate and am or pm ? If none of the method will do this for me. Can I produce the value on my own ? Any suggestions ? from time import * strftime('%I:%M:%S

Re: time module methods give an am or pm value ?

2008-06-07 Thread dj
Hello again, Does anyone know which method in the time module will generate and am or pm ? If none of the method will do this for me. Can I produce the value on my own ? Any suggestions ? -- http://mail.python.org/mailman/listinfo/python-list

Re: time module question - time zones

2008-05-21 Thread Eric Wertman
Sorry, my time zone is +4, not minus 4, which means that something else is causing my source data to be in the future. I still do need to understand where the time routines determine the time zone offset, so I can be sure I'm passing around the neutral value. Thanks! On Wed, May 21, 2008 at 12:

Re: Time module is not behaving.

2008-03-26 Thread Jeff Lofaro
Yep that does it. Thanks Gary. - Original Message From: Gary Herron <[EMAIL PROTECTED]> To: jjlofaro <[EMAIL PROTECTED]> Cc: python-list@python.org Sent: Wednesday, 26 March, 2008 2:49:55 AM Subject: Re: Time module is not behaving. jjlofaro wrote: > Hi > > I&

Re: Time module is not behaving.

2008-03-25 Thread Gary Herron
jjlofaro wrote: > Hi > > I'm just getting myself going again on Python and would appreciate any > help. > > My install of Python seems to have some difficulty loading and using > the time module in a script. Strange thing is that if I start another > instance of Python I can type in my program

Re: time module precision

2005-01-10 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Peter Hansen wrote: _Why_ do you want to wait such brief amounts of time? What I am trying to do is sending binary data to a serial port. Since the device attached to the port cannot handle a continous in-flow of data, I need to make an artificial tiny delay in-between data

Re: time module precision

2005-01-10 Thread janeaustine50
Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > > So the problem (waiting tens to hundreds of us without busy looping) > > still remains... > > That's actually not a "problem", it's your solution > to a problem. Can you describe the _real_ problem, what > you are trying to do? _Why_ do you want

Re: time module precision

2005-01-09 Thread Bengt Richter
On 9 Jan 2005 03:09:27 -0800, [EMAIL PROTECTED] wrote: [...] > >What I want to do is waiting(not busy-delaying) for a few tens to >hundreds of microseconds in some threads. The closet solution I got is >using windows QueryPerformanceCounter (in Python, time.clock) with busy >looping checking if we

Re: time module precision

2005-01-09 Thread Tim Peters
[Tim Peters] >> Python's time.sleep() calls the Win32 API Sleep() function on >> Windows. All behavior is inherited from the latter. See MS's docs: >> >> >> [EMAIL PROTECTED] > Oh, after a short research, I

Re: time module precision

2005-01-09 Thread Peter Hansen
[EMAIL PROTECTED] wrote: So the problem (waiting tens to hundreds of us without busy looping) still remains... That's actually not a "problem", it's your solution to a problem. Can you describe the _real_ problem, what you are trying to do? _Why_ do you want to wait such brief amounts of time? I

Re: time module precision

2005-01-09 Thread janeaustine50
Tim Peters wrote: [snip] > Python's time.sleep() calls the Win32 API Sleep() function on Windows. > All behavior is inherited from the latter. See MS's docs: > > Oh, after a short research, I found that tim

Re: time module precision

2005-01-08 Thread Tim Peters
[Jane Austine] > What is the precision (and accuracy) of time module on a Windows XP > machine? There are many functions in the time module. You shouldn't assume that any two have similar behavior (because, in fact, they may not). > threading module depends on time module so it's precision(and >