Re: [Tutor] Unit testing

2006-06-28 Thread Tino Dai
On 6/27/06, Kent Johnson [EMAIL PROTECTED] wrote: Tino Dai wrote: How I have it now: semaA = threading.semaphore() class nameA:def __init__(self): do some stuffdef run(self): do some stuffsemaA.release() class nameB:def __init__(self): do some stuffdef run(self): semaA.acquire()do some stuff Does

Re: [Tutor] How to check a files size

2006-06-28 Thread Andrew Robert
Perhaps this? stat = os.stat(self.file_name) file_size = stat[6] Thank you, Andrew Robert ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] How to check a files size

2006-06-28 Thread Magnus Wirström
Hi everyone. I would like to ask what is the best way to get the file size on a large file. the operation i'm trying to preform is to copy a large file to another drive using python file I/O commands. perhaps there is a better solution or a module that is doing this more easy? Thanks Magnus

Re: [Tutor] How to check a files size

2006-06-28 Thread Terry Carroll
On Thu, 29 Jun 2006, [ISO-8859-1] Magnus Wirstr?m wrote: I would like to ask what is the best way to get the file size on a large file. filesize = os.stat(filename).st_size ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Unit testing

2006-06-28 Thread Terry Carroll
On Wed, 28 Jun 2006, Tino Dai wrote: Ok, I think I'm going to back up and explain what I'm am heading towards. I'm working on an app that fire off a bunch of threads. Each one of these threads in connected via queues to another thread in a sequence like a chain. And how I tell the next stage

Re: [Tutor] How to check a files size

2006-06-28 Thread Kent Johnson
From: Magnus Wirström [EMAIL PROTECTED] Hi everyone. I would like to ask what is the best way to get the file size on a large file. the operation i'm trying to preform is to copy a large file to another drive using python file I/O commands. perhaps there is a better solution or a

Re: [Tutor] How to check a files size

2006-06-28 Thread John Fouhy
On 29/06/06, Kent Johnson [EMAIL PROTECTED] wrote: See shutil.copyfile() Why isn't this function in the os module with the other file commands? -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Threading

2006-06-28 Thread Øyvind
Hello. I am trying to learn threading, and found a good example at: http://effbot.org/librarybook/queue.htm (Using the Queue module with a maximum size). It works like a dream as is. But, I added it to a downloading-script I have made before. The difference is that in my version it has a

Re: [Tutor] Threading

2006-06-28 Thread Kent Johnson
Øyvind wrote: And, does anyone know of some great sites where I can learn more about threads? I have found a lot, but they are not basic enough. I have no idea what a 'lock' is, as most all sites assumes one should. So, the simpler the better... The Little Book of Semaphores is a good

[Tutor] treelistctrl help!

2006-06-28 Thread Jeff Peery
hello, I'm having some trouble with treelistctrl in wx python and I was wondering if there is someone who would share their code as an example. thanks!Jeff Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta.___ Tutor

[Tutor] NumPy

2006-06-28 Thread michel maho
To all, Can somebody tell me from where to download NumPy easely. Thank you Michel Maho ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] NumPy

2006-06-28 Thread Dave Kuhlman
On Wed, Jun 28, 2006 at 04:35:15PM +0200, michel maho wrote: To all, Can somebody tell me from where to download NumPy easely. Thank you Michel Maho Well, you probably want SciPy, which is the latest in scientific programming for Python. It's here: http://scipy.org/ There is also a NumPy

Re: [Tutor] File compression

2006-06-28 Thread Dave Kuhlman
On Tue, Jun 27, 2006 at 03:27:47PM -0700, Matthew White wrote: 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! Also look at the following: - http://docs.python.org/lib/module-zipfile.html

Re: [Tutor] Unit testing

2006-06-28 Thread Roel Schroeven
Tino Dai schreef: How I have it now: semaA = threading.semaphore() class nameA: def __init__(self): do some stuff def run(self): do some stuff semaA.release() class nameB: def __init__(self): do some stuff def run(self):

Re: [Tutor] Unit testing

2006-06-28 Thread Tino Dai
Then where you create instances of those classes:sema = threading.semaphore() a = nameA(sema)b = nameB(sema)Maybe you don't even need the semaphore at all: have a look atQueue.Queue, it might do exactly what you need.Ok, I think I'm going to back up and explain what I'm am heading towards. I'm