[Tutor] getopts question

Rikard Bosnjakovic rikard.bosnjakovic at gmail.com
Sat Mar 31 10:20:19 CEST 2007


On 30 Mar 2007 20:23:00 -0400, Greg Perry <gregp at liveammo.com> wrote:
> Yeah I figured that.  I am trying to find a way to have the program detect if the user input is a file or directory, which is easy enough with os.path.  However, os.path makes no distinction between a regular file and a mask, eg filename.txt or *.txt.  I guess I'll have to have a second set of tests to see if the filename contains any wildcards..?

Or use the glob-module.

-- 
- Rikard - http://bos.hack.org/cv/


More information about the Tutor mailing list