Re: [Tutor] File compression

2006-06-27 Thread Matthew White
Hi Magnus, I would check out the python tarfile module: http://docs.python.org/lib/module-tarfile.html Looks like it will compress with bzip too! -mtw On Wed, Jun 28, 2006 at 12:19:19AM +0200, Magnus Wirström ([EMAIL PROTECTED]) wrote: > Hi Everyone > > I'm starting to python and i need to w

[Tutor] File compression

2006-06-27 Thread Carlos Daniel Ruvalcaba Valenzuela
I think this is something that can be easily madded with some shell scripting, i suppose you are using Linux or a Unix derivate. In this case tar + bzip2 is your friend, altough for the volume of files i sugest looking at something like rsync or unison and coupling it with cron for automating the

[Tutor] File compression

2006-06-27 Thread Magnus Wirström
Hi Everyone I'm starting to python and i need to write a program that are able to compress a high amount of files and directories into a single file that is later going to be transfered with ftp to a backup storage server. The data is a quite big amount (over 1.5 gb in 4 files and 1300 d

Re: [Tutor] Unit testing

2006-06-27 Thread Luke Paireepinart
[snip] > class nameB: >def __init__(self, sema): > self.sema = sema > > >def run(self): > self.semaA.acquire() > > I think here Kent meant self.sema.acquire() [snip] ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Unit testing

2006-06-27 Thread Kent Johnson
Tino Dai wrote: > How I have it now: > > semaA = threading.semaphore() > > class nameA: >def __init__(self): > > >def run(self): > > semaA.release() > > class nameB: >def __init__(self): >

Re: [Tutor] Unit testing

2006-06-27 Thread Tino Dai
On 6/27/06, Tino Dai <[EMAIL PROTECTED]> wrote: On 6/27/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Tino Dai wrote:> And there is one caveat, I> will have to make a bunch of semaphores global instead of local to the> classes. While I know that there is no hard and fast rule about using> global var

Re: [Tutor] Unit testing

2006-06-27 Thread Tino Dai
On 6/27/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Tino Dai wrote:> And there is one caveat, I> will have to make a bunch of semaphores global instead of local to the> classes. While I know that there is no hard and fast rule about using> global variables, where can I find or can somebody tell me

Re: [Tutor] Unit testing

2006-06-27 Thread Kent Johnson
Tino Dai wrote: > And there is one caveat, I > will have to make a bunch of semaphores global instead of local to the > classes. While I know that there is no hard and fast rule about using > global variables, where can I find or can somebody tell me where I can > find some guidelines about the

Re: [Tutor] Unit testing

2006-06-27 Thread Tino Dai
On 6/27/06, Baiju M <[EMAIL PROTECTED]> wrote: On 6/26/06, Tino Dai <[EMAIL PROTECTED]> wrote:[...]> How would I unit test python GUIsFew weeks back I wrote a small article,may be helpful, so here it is : http://baijum81.livejournal.com/11598.htmlRegards,Baiju MBaiju, This is extremely useful f

Re: [Tutor] Unit testing

2006-06-27 Thread Tino Dai
On 6/27/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > Ok, that leads me to my next question.  Currently, I have a class> that I> want to unit test, but it contains a semaphore from another class.> Now, I> could make the semaphore a global variable, or I bring in the other > class.> One violates "good