You should be able to calculate this without using a python codeblock. It should be as simple as putting the path to the shapefile in quotes as follows:
r"C:\Path\To\Shapefile.shp"
I would think that you'd want to first calculate this on all of your shapefiles prior to running the merge tool. This could be done by doing the following:
1. Use the arcpy.da.walk or arcpy.ListFeatureClasses methods to locate the shapefiles on disk.
2. For each shapefile found check to see if it has the field that will be storing the path, if not add this field.
3. In the field calculate pass the path to the feature class surrounded by quotes to persist this information in the field.
Let me know if this helps.