This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
['ArgImagePlugin', | |
'BaseHTTPServer', | |
'Bastion', | |
'BdfFontFile', | |
'BmpImagePlugin', | |
'BufrStubImagePlugin', | |
'CGIHTTPServer', | |
'Canvas', | |
'ConfigParser', | |
'ContainerIO', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rows_as_update_dicts(cursor): | |
colnames = cursor.fields | |
for row in cursor: | |
row_object = dict(zip(colnames, row)) | |
yield row_object | |
cursor.updateRow([row_object[colname] for colname in colnames]) | |
with arcpy.da.UpdateCursor(r'c:\data\world.gdb\world_cities', ['CITY_NAME']) as sc: | |
for row in rows_as_update_dicts(sc): | |
row['CITY_NAME'] = row['CITY_NAME'].title() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
def rows_as_namedtuples(cursor): | |
col_tuple = collections.namedtuple('Row', cursor.fields) | |
for row in cursor: | |
yield col_tuple(*row) | |
with arcpy.da.SearchCursor(r'c:\data\world.gdb\world_cities', '*') as sc: | |
for row in rows_as_namedtuples(sc): | |
print sc.CITY_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rows_as_dicts(cursor): | |
colnames = cursor.fields | |
for row in cursor: | |
yield dict(zip(colnames, row)) | |
with arcpy.da.SearchCursor(r'c:\data\world.gdb\world_cities', '*') as sc: | |
for row in rows_as_dicts(sc): | |
print row['CITY_NAME'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import ctypes.wintypes | |
class Constants(object): | |
"Container for constants found in win32 headers" | |
WS_OVERLAPPED = 0x00000000L | |
WS_POPUP = 0x80000000L | |
WS_CHILD = 0x40000000L | |
WS_MINIMIZE = 0x20000000L | |
WS_VISIBLE = 0x10000000L |
NewerOlder