On Dec 17, 5:16 pm, Rominsky wrote:
> I am trying to use dir to generate a list of methods, variables, etc.
> I would like to be able to go through the list and seperate the
> objects by type using the type() command, but the dir command returns
> a list of strings. When I ask for the type of an
If it helps, there's a builtin module for figuring out mimetypes;
http://docs.python.org/lib/module-mimetypes.html
>>> import mimetypes
>>> mimetypes.guess_type('.gif')
('image/gif', None)
Cheers,
Andy.
--
http://mail.python.org/mailman/listinfo/python-list