Size of hard drive and Mp3 tags functions

John Hicken john.hicken at gmail.com
Sun Jul 9 17:40:28 EDT 2006


Dennis Lee Bieber wrote:
> On 9 Jul 2006 11:14:25 -0700, "John Hicken" <john.hicken at gmail.com>
> declaimed the following in comp.lang.python:
>
>
> > Anyway, there are two sorts of functions that could be useful.
> > 1) A function that gives the size of a hard drive (or other drive, in
> > this case the mp3 player itself), and/or the space remaining.
>
> 	Presuming the device shows up as a disk device in Windows... From
> the win32api (ActiveState) help file:
>
> win32file.GetDiskFreeSpaceEx
> long, long, long = GetDiskFreeSpaceEx(rootPathName)
>
> Determines the free space on a device.
>
>
> Parameters
>
> rootPathName : PyUnicode
>
> address of root path
>
> Return Value
> The result is a tuple of long integers:
>
> Items
>
> [0] long integer : freeBytes
>
> The total number of free bytes on the disk that are available to the
> user associated with the calling thread.
>
> [1] long integer : totalBytes
>
> The total number of bytes on the disk that are available to the user
> associated with the calling thread. Windows 2000: If per-user quotas are
> in use, this value may be less than the total number of bytes on the
> disk.
>
> [2] long integer : totalFreeBytes
>
> The total number of free bytes on the disk.
>
>
> > 2)A function/functions to read the ID tags of an MP3 file.
> >
> http://www.google.com/search?hl=en&q=python+mp3+ID+tag&btnG=Google+Search
> --
> 	Wulfraed	Dennis Lee Bieber		KD6MOG
> 	wlfraed at ix.netcom.com		wulfraed at bestiaria.com
> 		HTTP://wlfraed.home.netcom.com/
> 	(Bestiaria Support Staff:		web-asst at bestiaria.com)
> 		HTTP://www.bestiaria.com/

Thanks for the help.  As you gathered, the mp3 player just appears as a
hard drive, and the GetDiskFreeSpaceEx function does exactly what I
want.  Also, the first id tag program for python from the google seach,
id3reader, seems to match what I want, as I won't need to alter the ID3
tags.

Thanks
John Hicken




More information about the Python-list mailing list