Re: Finding file details...

2008-05-30 Thread Kalibr
On May 30, 3:03 pm, Kam-Hung Soh <[EMAIL PROTECTED]> wrote: > Kalibr wrote: > > On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: > >> You can use the shell COM objects to access media properties > >> as shown by Explorer. > > >> import win32com.client > >> sh=win32com.client.Dispatch('S

Re: Finding file details...

2008-05-29 Thread Kam-Hung Soh
Kalibr wrote: On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: You can use the shell COM objects to access media properties as shown by Explorer. import win32com.client sh=win32com.client.Dispatch('Shell.Application') folder= r'M:\Music\Bob Dylan\Highway 61 Revisited' ns=sh.NameSpa

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: > On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: >> >> You can use the shell COM objects to access media properties >> as shown by Explorer. >> >> import win32com.client >> sh=win32com.client.Dispatch('Shell.Application') >> >> folder= r'M:\Music\Bob Dylan\Highway 61 Rev

Re: Finding file details...

2008-05-29 Thread Kam-Hung Soh
Roger Upole wrote: Kalibr wrote: I've been trying to figure out how to find the details of files (specifically music for now) for a little sorting script I'm making, My aim is to get details on the artist, album, and genre for mp3 and wma files (possibly more in the future). My closest match was

Re: Finding file details...

2008-05-29 Thread Kalibr
On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: > > You can use the shell COM objects to access media properties > as shown by Explorer. > > import win32com.client > sh=win32com.client.Dispatch('Shell.Application') > > folder= r'M:\Music\Bob Dylan\Highway 61 Revisited' > ns=sh.NameSpac

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: > I've been trying to figure out how to find the details of files > (specifically music for now) for a little sorting script I'm making, > My aim is to get details on the artist, album, and genre for mp3 and > wma files (possibly more in the future). My closest match was when I > stu

Re: Finding file details...

2008-05-29 Thread Mike Driscoll
On May 29, 5:26 am, Kalibr <[EMAIL PROTECTED]> wrote: > On May 29, 7:55 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > > > > > > You don't say, but I assume you're on Windows since you mention > > GetFileVersionInfo (which doesn't have anything to do with media > > files, by the way) and WMA. There

Re: Finding file details...

2008-05-29 Thread Tim Golden
Kalibr wrote: On May 29, 7:55 pm, Tim Golden <[EMAIL PROTECTED]> wrote: You don't say, but I assume you're on Windows since you mention GetFileVersionInfo (which doesn't have anything to do with media files, by the way) and WMA. There may be packages out there to do all this already but if not y

Re: Finding file details...

2008-05-29 Thread Kalibr
On May 29, 7:55 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > You don't say, but I assume you're on Windows since you mention > GetFileVersionInfo (which doesn't have anything to do with media > files, by the way) and WMA. There may be packages out there > to do all this already but if not you'll n

Re: Finding file details...

2008-05-29 Thread Tim Golden
Kalibr wrote: I've been trying to figure out how to find the details of files (specifically music for now) for a little sorting script I'm making, My aim is to get details on the artist, album, and genre for mp3 and wma files (possibly more in the future). My closest match was when I stumbled acc

Finding file details...

2008-05-29 Thread Kalibr
I've been trying to figure out how to find the details of files (specifically music for now) for a little sorting script I'm making, My aim is to get details on the artist, album, and genre for mp3 and wma files (possibly more in the future). My closest match was when I stumbled accross PyMedia, bu

Re: finding file

2006-06-05 Thread K.S.Sreeram
K.S.Sreeram wrote: > filepaths = [os.path.join(os.getcwd(),f) for f in filenames] you can use os.path.abspath filepaths = [os.path.abspath(f) for f in filenames] signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: finding file

2006-06-05 Thread K.S.Sreeram
su wrote: > import os, os.path > import re > def core_finder(arg, dir, files): > for file in files: > path = os.path.join (dir, file) > if re.search("core.*", path): >print "found" >print path > > > os.path.walk('.', core_finder, 0) Here's a simpler so

Re: finding file

2006-06-05 Thread Christoph Zwerschke
su wrote: > could someone help me on how can i restrict > my code to search the file in the current dir only Use os.listdir(). -- Christoph -- http://mail.python.org/mailman/listinfo/python-list

finding file

2006-06-05 Thread su
Hi , I am trying to understand myself with some basic programs in python, I have written a small script to search for core files in the current dir. but when i tried to execute, it is searching the core files in the subdir also. could someone help me on how can i restrict my code to search the file