pyatcron-devel-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pyatcron-devel-list] Cron parser code ready


From: Julien Olivier
Subject: Re: [Pyatcron-devel-list] Cron parser code ready
Date: Fri, 09 Apr 2004 11:23:10 +0100

On Fri, 2004-04-09 at 10:51, Xavier Nicolovici wrote:
> Hi Everyone,
> 
> I've uploaded the crontab parser code into CVS last evening. You could
> test it using the following code:
> 
> from lib.schedulelist import ScheduleList
>  
> list = ScheduleList()
> for entry in list:
>         entry.prettyPrint()
> I've use the following crontab file to make test. See how fine it
> works ;-)
> # This is a comment
>  
>    # This is a comment with leading spaces
>  
> envvar = environment var
>  
> envar = environment var with leading spaces
>  
> */10 */3 1,2,3 * /bin/false
>  
>     10-30/3,50-56/2 1-5,8-10 1 1 mon /bin/false
> I let you make some test with it.
> 

Using the example you provide just above, it doesn't work because the
line "*/10 */3 1,2,3 * /bin/false" lacks 1 parameter. Modifying it to
"*/10 */3 1,2,3 * * /bin/false" works though.

Apart from that, it seems to work very well. I couldn't make it behave
abnormally yet :)

The only "problem" is that you always set the id to 0...

> I will spend some time this week to think about a roadmap (what is
> expecting to do each version of the software). This will let us know
> where we are going.
> I've also planed to write an functionnal spec overview of the
> software. I've though about some nice tricks and would like to write
> them down in order to discuss with you.
> 

Great.

> In the meantime, could someone modify the actual GUI we have to
> display the Scheduler objects stored in a ScheduleList object? This
> will certainly require adding some methods to both ScheduleList and
> SchedulerClass (and certainly *Task classes).
> 

I will take care of it.

Now, I'd like to discuss what  think is an important topic. I have
noticed, in your recent code, that you use 4 space characters for the
indentation. In the files I created before, I used tabs... I'm not sure
what's the best when programming in python, but I'm pretty sure that you
can't mix tabs and spaces.

I wouldn't mind using 4 space characters indentation, but I'd like it to
be discussed now, and fixed forever, so that we don't have problems
later.

Personally, I prefer tabs because each one can set the length of the
tabs in text editors, while space characters are fixed. That said, 4
characters seems like a good default anyway.

Another thing is that we currently use "#!/usr/bin/python2.2" in both
confg.py and pyatcron.py. I'm currently using Fedora Core 2 and I have
the following executables:
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.3

Is there any specific reason to specify the version of python to be used
? Is not, I think it would be better to just use "#!/usr/bin/python", or
"#!/usr/bin/python2".

> Have a nice week-end, and good Easter Eggs ;-)
> 

Thanks. And the same for you. Don't eat too much chocolate :)

-- 
Julien Olivier <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]