Geographic Information Systems Asked by saeedzali on January 14, 2021
import arcpy
import os
from arcpy import env
env.workspace=r'I:amozeshsamplegdb.gdb'
infeature=r'I:amozeshsamplegdb.gdbblocksclip'
cursor=arcpy.da.SearchCursor(infeature,['layer'])
cursor.next()
output
(u'u0627u0631..........u0631',)
How can I print it out using the Persian language?
As mentioned in my comment, the cursor.next() method returns a tuple of the raw string unicode characters. To print the unicode text, I suggest altering your code to the following:
cursor=arcpy.da.SearchCursor(infeature,['layer'])
for row in cursor:
print(row[0])
or
cursor=arcpy.da.SearchCursor(infeature,['layer'])
for row in cursor:
arcpy.AddMessage(row[0])
Correct answer by Fezter on January 14, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP