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
--
BartlebyScrivener enlightened us with:
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
BartlebyScrivener wrote:
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.
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 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
Using Python on Windows XP, I am able to get