get Windows file type
Roger Upole
rupole at hotmail.com
Mon May 8 21:49:20 EDT 2006
If you have pywin32 installed, you can use the shell module.
from win32com.shell import shell, shellcon
shell.SHGetFileInfo(filename ,0, shellcon.SHGFI_TYPENAME)
Roger
"BartlebyScrivener" <rpdooling at gmail.com> wrote in message news:1147089470.336984.173510 at u72g2000cwu.googlegroups.com...
> Using Python on Windows XP, I am able to get almost all file and path
> info using os.path or stat, but I don't see a way to retrieve the file
> type? E.g. Microsoft Word file, HTML file, etc, the equivalent of what
> is listed in the "Type" column in the Windows Explorer box.
>
> Thanks,
>
> rick
>
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
More information about the Python-list
mailing list