Path = os.getcwd() + "\\" FileGDBName = "PSEG_Land_New" FileGDBPath = Path + FileGDBName + ".gdb" OldFileGDBName = "PSEG_Land" OldFileGDBPath = Path + OldFileGDBName + ".gdb" Locator = OldFileGDBPath + "\Dashboard_Locator" refLocator = OldFileGDBPath + "\DM_AdjustedStreet_LN_Geocoding" primTbl = "Primary Table" arcpy.CreateAddressLocator_geocoding("US Address - Dual Ranges", '"' + "'" + refLocator + "' " + "'" + primTbl + "'" + '"', "'Feature ID' OBJECTID VISIBLE NONE;'*From Left' L_F_F_ADD VISIBLE NONE;'*To Left' L_T_F_ADD VISIBLE NONE;'*From Right' R_F_F_ADD VISIBLE NONE;'*To Right' R_T_F_ADD VISIBLE NONE;'Prefix Direction' PREFIX VISIBLE NONE;'Prefix Type' NAMEPREFIX VISIBLE NONE;'*Street Name' NAME VISIBLE NONE;'Suffix Type' TYPE VISIBLE NONE;'Suffix Direction' SUFFIX VISIBLE NONE;'Left City or Place' L_APNAME VISIBLE NONE;'Right City or Place' R_APNAME VISIBLE NONE;'Left ZIP Code' POSTAL_L VISIBLE NONE;'Right ZIP Code' POSTAL_R VISIBLE NONE;'Left State' <None> VISIBLE NONE;'Right State' <None> VISIBLE NONE;'Left Street ID' <None> VISIBLE NONE;'Right Street ID' <None> VISIBLE NONE;'Min X value for extent' <None> VISIBLE NONE;'Max X value for extent' <None> VISIBLE NONE;'Min Y value for extent' <None> VISIBLE NONE;'Max Y value for extent' <None> VISIBLE NONE;'Left Additional Field' <None> VISIBLE NONE;'Right Additional Field' <None> VISIBLE NONE;'Altname JoinID' <None> VISIBLE NONE", Locator, "")
print '"' + "'" + refLocator + "' " + "'" + primTbl + "'" + '"'
print '"' + "'" + refLocator + "' " + "'" + primTbl + "'" + '"' "'C:\Working Folders\GIS\Dashboard_UpdatesPSEG_Land.gdb\DM_AdjustedStreet_LN_Geocoding' 'Primary Table'" x = '"' + "'" + refLocator + "' " + "'" + primTbl + "'" + '"' x '"\'C:\\Working Folders\\GIS\\Dashboard_UpdatesPSEG_Land.gdb\\DM_AdjustedStreet_LN_Geocoding\' \'Primary Table\'"'
xyz = "x\ny\nz" xyz 'x\ny\nz' print xyz x y z
import os old_gdb_name = "PSEG_Land.gdb" old_path = os.path.join(Path, old_gdb_name) old_path 'C:\\Working Folders\\GIS\\Dashboard_Updates\\PSEG_Land.gdb'
old_path + " " + primTbl 'C:\\Working Folders\\GIS\\Dashboard_Updates\\PSEG_Land Primary Table'