Verified Input.

Richard Jones richard at bizarsoftware.com.au
Thu Oct 18 00:06:54 EDT 2001


On Thursday 18 October 2001 13:49, Alec D. Cheah wrote:
> How do verified from input the variable entered is a file or a path
> and how do you check whether it exist or not??
> Help...
> Newbie on Python....

Look up the os.path documentation in the library reference:

import os.path
os.path.exists(path)
os.path.isfile(path)
os.path.isdir(path)



     Richard




More information about the Python-list mailing list