Re: getting object instead of string from dir()

2008-12-17 Thread Andrew Nelis
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

Re: Parse file into array

2005-11-15 Thread Andrew Nelis
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