I just wanted to share this function I built for listing the contents of a GDB in ArcPy. First it will print out a list of features in a given GDB, then it'll print out any tables. Simple but useful.
#lists contents of a GDBdef DIRgdb(gdbInput:(arcpy.env.workspace = gdbInputprint "\nfeatures:"featuresInGDB = arcpy.ListFeatureClasses()for feature in featuresInGDB:print "\t- " + featuretablesInGDB = arcpy.ListTables()print "\nTables:"for table in tablesInGDB:print "\t- " + table
A much better place to share your code is on the ESRI code sharing website. That is the place for developers and members of the user community to share tools and code and would be an obvious place to start searching. It is unlikely people would come to a discussion forum in search of specific code... Personally I would move it to there and delete this thread.
But don't just dump it there, you need to describe it, explain any limitations, how you would run it and for what version of ArcMap if you want people to truly find it useful.