Re: python time

2011-03-21 Thread Ulrich Eckhardt
ecu_jon wrote: > import time,os,string,getpass,md5,ConfigParser > from time import strftime,localtime You are importing the time module first, then import some symbols from the time module. This seems redundant to me. Note that after the "import time", the name "time" refers to the module you i

Re: python time

2011-03-20 Thread ecu_jon
i see. i was using time as a variable name , messing it all up.im not going to post the whole backup script here, but here are a few lines that i changed to make it work. from datetime import datetime from os.path import join, getsize import time,os,string,getpass,md5,ConfigParser from time import

Re: python time

2011-03-20 Thread Nick Stinemates
You should just use cron (or Windows Scheduled Tasks if that's your thing) for job scheduling, allowing people the flexibility of the environment they already know. Nick On Sun, Mar 20, 2011 at 6:19 PM, ecu_jon wrote: > I'm working on a script that will run all the time. at time specified > in

Re: python time

2011-03-20 Thread eryksun ()
On Monday, March 21, 2011 12:07:13 AM UTC-4, ecu_jon wrote: > so then why does this not work ? > > import time > ... > time = config.get("myvars", "time") > ... > while a>0: > #import time > time.sleep(2) > > if i uncomment the import time line in the while loop it works. > boggle... An i

Re: python time

2011-03-20 Thread ecu_jon
so then why does this not work ? from datetime import datetime from os.path import join, getsize import time,os,string,getpass,md5,ConfigParser from time import strftime,localtime config = ConfigParser.ConfigParser() config.read("config.ini") date = config.get("myvars", "date") time = config.get(

Re: python time

2011-03-20 Thread MRAB
On 21/03/2011 03:29, ecu_jon wrote: On Mar 20, 10:48 pm, ecu_jon wrote: On Mar 20, 10:09 pm, Dave Angel wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: I'm working on a script that will run all the time. at time specified in a config file, will kick-off a backup. problem is, its not ac

Re: python time

2011-03-20 Thread MRAB
On 21/03/2011 02:48, ecu_jon wrote: On Mar 20, 10:09 pm, Dave Angel wrote: On 01/-10/-28163 02:59 PM, ecu_jon wrote: I'm working on a script that will run all the time. at time specified in a config file, will kick-off a backup. problem is, its not actually starting the job. the double whil

Re: python time

2011-03-20 Thread ecu_jon
On Mar 20, 10:48 pm, ecu_jon wrote: > On Mar 20, 10:09 pm, Dave Angel wrote: > > > > > On 01/-10/-28163 02:59 PM, ecu_jon wrote: > > > > I'm working on a script that will run all the time. at time specified > > > in a config file, will kick-off a backup. > > > problem is, its not actually startin

Re: python time

2011-03-20 Thread ecu_jon
On Mar 20, 10:09 pm, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, ecu_jon wrote: > > > > > I'm working on a script that will run all the time. at time specified > > in a config file, will kick-off a backup. > > problem is, its not actually starting the job. the double while loop > > runs, the fi

Re: python time

2011-03-20 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: I'm working on a script that will run all the time. at time specified in a config file, will kick-off a backup. problem is, its not actually starting the job. the double while loop runs, the first comparing date works. the second for hour/min does not. #

python time

2011-03-20 Thread ecu_jon
I'm working on a script that will run all the time. at time specified in a config file, will kick-off a backup. problem is, its not actually starting the job. the double while loop runs, the first comparing date works. the second for hour/min does not. #python file import os,string,,time,getpass,C

Re: Python time measure question (timeit)

2009-02-01 Thread Steve Holden
vedrandeko...@yahoo.com wrote: > On 1 velj, 17:42, Steve Holden wrote: >> vedrandeko...@yahoo.com wrote: >>> Hello, >>> When I run following code with os.popen (for this time measure I'm >>> using python module timeit): >>> for i in range(50): >>> print i >>> I get this result: 0.00246958761

Re: Python time measure question (timeit)

2009-02-01 Thread vedrandekovic
On 1 velj, 17:42, Steve Holden wrote: > vedrandeko...@yahoo.com wrote: > > Hello, > > > When I run following code with os.popen  (for this time measure I'm > > using python module timeit): > > > for i in range(50): > >     print i > > > I get this result:  0.00246958761519 > > > But when I run sam

Re: Python time measure question (timeit)

2009-02-01 Thread Steve Holden
vedrandeko...@yahoo.com wrote: > Hello, > > When I run following code with os.popen (for this time measure I'm > using python module timeit): > > > for i in range(50): > print i > > > I get this result: 0.00246958761519 > > > But when I run same code from IDLE i get this result: > 6.45

Python time measure question (timeit)

2009-02-01 Thread vedrandekovic
Hello, When I run following code with os.popen (for this time measure I'm using python module timeit): for i in range(50): print i I get this result: 0.00246958761519 But when I run same code from IDLE i get this result: 6.4533341528e-005 now, I have two questions: 1) W

Required help on python-time module

2008-08-20 Thread Pradeep Kumar
I am a newbie to python even mobile side also. I am using openmoko device, there I installed stripped down python from feed path's and I need tzset() of time module for my application but when running my application.  time.tzset() at above line getting "no  attribute tzset()  for module" . So