[Tutor] if os.path.exists() or if not os.path.exists()?
Tom Zych
freethinker at pobox.com
Thu Mar 24 16:41:57 CET 2011
On Thu, 24 Mar 2011 09:22 -0600, "Susana Iraiis Delgado Rodriguez"
<susana.delgado_s at utzmg.edu.mx> wrote:
> #This block is wrong, I think here is the problem
> if os.path.exists(shx):
> print 'El archivo ' +shx +' existe'
> else:
> log.write('No existe el archivo ' +shx + "\n")
> if os.path.exists(dbf):
> print 'El archivo ' +dbf +' existe'
> log.write('No existe el archivo ' +dbf + "\n")
I don't know about the rest, but you're missing an "else:" between the
last two lines.
--
Tom Zych / freethinker at pobox.com
"Because if they didn't vote for a lizard," said Ford, "the wrong lizard
might get in." -- DNA
More information about the Tutor
mailing list