[Tutor] Checking file existance

D d@aufbix.org
Fri, 23 Aug 2002 07:59:59 +0200


On Thursday 22 August 2002 23:38, Sean 'Shaleh' Perry wrote:

> import os.path
>
> if os.path.exists(filename):
>   print "found it"

if os.path.exists(filename) =3D=3D 1: # exists
if os.path.exists(filename =3D=3D 0: # does not

alternative: os.path.isfile or os.path.isdir

regards,
damir

--=20

BOFH excuse #195:

We only support a 28000 bps connection.