Finding out if layer exsists in file geodatabase

Discussion created by ScottB on Oct 17, 2011
Latest reply on Oct 17, 2011 by mzcoyle
Is there an easy way to check if a layer exsist in a file geodatabase with python?

I need to run multiple processes on a series of layers and as some point the layer may not exsists (i.e. no file created) but need to check before running the next process.

Example:  First step is geocoding but if table contains no data I skip the geocode. However, the next step is to add fields to the layer but if it does not exsist I need to skip this step. 

I know how to find a file on the system

if os.path.exists(filepath\name):

but not sure about stuff within geodatabase