
February 10th, 2004, 04:04 PM
|
 |
Hello World :)
|
|
Join Date: Mar 2003
Location: Hull, UK
|
|
You could have also imported the functions using the "form module import function" form and you're first example would have worked fine  ...
Code:
from os.path import *
path = "test HTML.txt"
if(isfile(path)):
print "It exists!!"
else:
print "It does not exist!"
Also you dont have to import os.path directly, although its perfectly a valid way to get os.path, i just find it much nicer to import os which makes os.path available  .
Mark.
__________________
programming language development: www.netytan.com – Hula
|