I think you should research/ask about writing to a CSV file separately at StackOverflow because the technique you are using to do that is pure Python rather than ArcPy.
For the remainder I think this should work (use a modification of your file geodatabase location where I have used C:\temp\test.gdb):
import arcpy
arcpy.env.workspace = r"C:\temp\test.gdb"
datasetList = arcpy.ListDatasets('*','Feature')
for dataset in datasetList:
# arcpy.env.workspace = dataset
arcpy.env.workspace = r"C:\temp\test.gdb\{0}".format(dataset)
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
print arcpy.env.workspace,fc
The two main issues were:
- using back slashes in your pathname - you need to convert them to double backslashes, change them to forward slashes or simply escape them using the letter r like I have above
- the single quote in your pathname will leave Python looking for the other one to close that string