Re: Rewriting a bash script in python

2008-11-08 Thread Chris Jones
On Wed, Nov 05, 2008 at 09:23:02PM EST, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Chris Jones wrote: But then I started thinking .. what if for instance I had to scale my effort from my single system to a large data center with hundred of hosts .. with different backup

Re: Rewriting a bash script in python

2008-11-06 Thread Tim Rowe
2008/11/6 Lawrence D'Oliveiro [EMAIL PROTECTED]: Nothing wrong with rapid prototyping. :) That's one requirements capture methodology, certainly. Actually, there's quite a lot wrong with rapid prototyping, but there's quite a lot wrong with all other requirements capture methodologies too, so

Re: Rewriting a bash script in python

2008-11-06 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Tim Rowe wrote: Actually, there's quite a lot wrong with rapid prototyping, but there's quite a lot wrong with all other requirements capture methodologies too, so rapid prototyping is up there with the rest of them. Sounds like what Churchill said about

Re: Rewriting a bash script in python

2008-11-05 Thread Jorgen Grahn
On Wed, 05 Nov 2008 17:42:43 +1300, Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: In message [EMAIL PROTECTED], Chris Jones wrote: I wrote this in bash and although it's worked w/o a glitch for the last couple of months .. I'm not comfortable with .. the look feel of it. Engineering rule

Re: Rewriting a bash script in python

2008-11-05 Thread Jorgen Grahn
On Tue, 04 Nov 2008 22:11:37 -0500, Chris Jones [EMAIL PROTECTED] wrote: I wrote a trivial backup script that does the following: If tonight is the first day of the month: save last month's archive do a full backup of the system else: save last night's differential backup

Re: Rewriting a bash script in python

2008-11-05 Thread Marc 'BlackJack' Rintsch
On Wed, 05 Nov 2008 17:12:08 +, Jorgen Grahn wrote: On Wed, 05 Nov 2008 17:42:43 +1300, Lawrence D'Oliveiro Engineering rule #1: if it works, don't fix it. Especially if it handles your backups ;-) Well, if it handles your backups it doesn't work. It just pretends until you really

Re: Rewriting a bash script in python

2008-11-05 Thread Chris Jones
On Tue, Nov 04, 2008 at 11:11:17PM EST, Ben Finney wrote: Chris Jones [EMAIL PROTECTED] writes: I am thinking of rewriting it in python using OOP tactics/strategy. Please advise. I advise you not to have the object-oriented programming hammer as your only tool, because it's easy to

Re: Rewriting a bash script in python

2008-11-05 Thread Tim Rowe
2008/11/6 Chris Jones [EMAIL PROTECTED]: Begs the question .. how do I tell what is an object-oriented vs. a procedural problem? Practice, largely, so you're doing the right thing (provided you don't trust your /real/ backup data to a tutorial program). If you find that the program is at its

Re: Rewriting a bash script in python

2008-11-05 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Marc 'BlackJack' Rintsch wrote: Well, if it handles your backups it doesn't work. It just pretends until you really *need* the backed up data. ;-) That's why a backup system needs to be absolutely simple as possible. Avoid complicated formats, a straightforward

Re: Rewriting a bash script in python

2008-11-05 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Chris Jones wrote: But then I started thinking .. what if for instance I had to scale my effort from my single system to a large data center with hundred of hosts .. with different backup policies .. what if I had to take into account time slots where the

Re: Rewriting a bash script in python

2008-11-05 Thread Chris Jones
On Wed, Nov 05, 2008 at 08:12:40PM EST, Tim Rowe wrote: 2008/11/6 Chris Jones [EMAIL PROTECTED]: Begs the question .. how do I tell what is an object-oriented vs. a procedural problem? Practice, largely, so you're doing the right thing (provided you don't trust your /real/ backup data

Re: Rewriting a bash script in python

2008-11-05 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Chris Jones wrote: I'm one of them that need to get their hands dirty a bith .. lack the power of abstraction. Need to do some building before I can specify. Nothing wrong with rapid prototyping. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Rewriting a bash script in python

2008-11-05 Thread Chris Jones
On Wed, Nov 05, 2008 at 09:21:38PM EST, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Marc 'BlackJack' Rintsch wrote: Well, if it handles your backups it doesn't work. It just pretends until you really *need* the backed up data. ;-) That's why a backup system needs to be

Rewriting a bash script in python

2008-11-04 Thread Chris Jones
I wrote a trivial backup script that does the following: If tonight is the first day of the month: save last month's archive do a full backup of the system else: save last night's differential backup back up all changes relative to the current month's full backup endif I

Re: Rewriting a bash script in python

2008-11-04 Thread Ben Finney
Chris Jones [EMAIL PROTECTED] writes: I am thinking of rewriting it in python using OOP tactics/strategy. Please advise. I advise you not to have the object-oriented programming hammer as your only tool, because it's easy to then treat every problem as though it were a nail. What you

Re: Rewriting a bash script in python

2008-11-04 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Chris Jones wrote: I wrote this in bash and although it's worked w/o a glitch for the last couple of months .. I'm not comfortable with .. the look feel of it. Engineering rule #1: if it works, don't fix it. -- http://mail.python.org/mailman/listinfo/python-list