Hi
I'm trying to delete some files, but i get an exception error if the
file don't exist.
I can use an {if fileexist(file) then delete}, but it will get cpu
time.
So i catch the exception with:
       try: os.remove(filename)
       except EnvironmentError: error=1
If i just want to avoid the output error, is this the right way to
write the code?
I don't care of get if is in error, but an "except EvironmetError"
without the ":" will give me a sytax error.
Am I too much complicated? :-)

Thanks in advance

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to