Re: analyzing removable media

2006-09-29 Thread glenn
Nick Vatamaniuc wrote: > glenn wrote: > > Hi > > can anyone tell me how given a directory or file path, I can > > pythonically tell if that item is on 'removable media', or sometype of > > vfs, the label of the media (or volume) and perhaps any other details > > about the media itself? > > thanks

Re: analyzing removable media

2006-09-29 Thread glenn
> > As soon as you ask for "cross platform" and something that is > device/OS specific... you have conflict. > > From the win32 extensions: > > win32file.GetDriveType > int = GetDriveType() > > Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, > or network drive. > > R

Re: analyzing removable media

2006-09-29 Thread Jay
Dennis is absolutely right. The reason you won't find a method in the standard libraries for doing this task specifically is because python aims to by cross-platform. If it were to support a method that worked in the way you describe specifically for Windows, that would essentially break python's

Re: analyzing removable media

2006-09-29 Thread Nick Vatamaniuc
glenn wrote: > Hi > can anyone tell me how given a directory or file path, I can > pythonically tell if that item is on 'removable media', or sometype of > vfs, the label of the media (or volume) and perhaps any other details > about the media itself? > thanks > Glenn It won't be trivial because

Re: analyzing removable media

2006-09-28 Thread John Machin
glenn wrote: > Hi Jay > pls excuse top post - Im actually doing this project in linux, but am > wanting it to be cross platform. I definitley have to cater for win32 > also. I was hoping that burried in sys or os or that there'd be some x > platform module that did all that stuff for me > Thin

Re: analyzing removable media

2006-09-28 Thread glenn
Hi Jay pls excuse top post - Im actually doing this project in linux, but am wanting it to be cross platform. I definitley have to cater for win32 also. I was hoping that burried in sys or os or that there'd be some x platform module that did all that stuff for me thnks for reply though glenn J

Re: analyzing removable media

2006-09-28 Thread Jay
Well, in linux you can get a lot of info about where a file is based upon where it lies in the file system. For example, if the folder the file is located in resides in the /media or /mnt directories, then the file is, barring a few rare circumstances, located upon a removable medium of some sort.