Not sure why that would be truncating the names.
I would do something more simple. Instead of writing to a text file, it just prints the results in the Python interpreter window where you can copy it wherever you want. From my testing in ArcGIS 10.2.2, it successfully prints feature class names longer than 26 characters.
import arcpy
# specify the geodatabase you want to retrieve feature classes from
gdb = r"c:\temp\Tracks.gdb"
# set your environment workspace
arcpy.env.workspace = gdb
# List all of the feature datasets and their feature classes
for ds in arcpy.ListDatasets():
print ds
for fc in arcpy.ListFeatureClasses("","",ds):
print "\t", fc
# List all of the other feature classes outside the feature datasets
for fc in arcpy.ListFeatureClasses():
print fc
EDIT:
Another solution would be this:
import arcpy
# Specify the geodatabase you want to retrieve feature classes from
gdb = r"c:\temp\Tracks.gdb"
# Set environment workspace
arcpy.env.workspace = gdb
# Get list of datasets
datasetList = arcpy.ListDatasets()
datasetList.append("") ##Add blank list item to catch feature classes not in a dataset
for ds in datasetList:
for fc in arcpy.ListFeatureClasses("","",ds):
print "{}\{}".format(ds, fc)