César Leonardo Blum Silveira wrote: > Hello all, I'm new to this list. > > How can I detect if a file is a directory or not? > > Thanks > > César
The os module contains many helpful tools for working with files, directories, links and so forth. Check out the docs and marvel. The following snippet answers your specific question: <code> import os.path if os.path.isdir("/some/path/here"): print "It's a directory!" </code> -- Website: www DOT jarmania FULLSTOP com -- http://mail.python.org/mailman/listinfo/python-list