Word Wrap Using Python on Source Credits?

597
3
09-30-2013 11:53 AM
Tikvael_Sulaiman
New Contributor
Wondering if there is a way to word wrap the output from the following, assuming I am trying to fit it into a small area and will  like decide how many words per line.  The code and a sample output are attached for your convenience.

Code:

<dyn type="document" property="service layer credits" separator="\n" showLayerNames="false" layerNameSeparator=": "/>


Sample Output:
World_Imagery - Source: Esri, DigitalGlobe, GeoEye, i-cubed, USDA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community

Final goal is to be able to stack/wrap at every 4 or 5 words.  Thanks for the help.

FYI: I have tried implanting "\n" at several intervals with no luck.

Thanks
Tags (2)
0 Kudos
3 Replies
JasonScheirer
Occasional Contributor III
If anything would work, it would be \r\n, not \n.
0 Kudos
Tikvael_Sulaiman
New Contributor
If anything would work, it would be \r\n, not \n.


Tried the "\r\n" and still no difference.
0 Kudos
MattSayler
Occasional Contributor II
There is a module in python that has some methods for wrapping text if you end up needing to do it manually:
http://forums.arcgis.com/threads/92810-Pythn-to-TextWrap
0 Kudos