This file contains 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
arcpy.mapping.ListDataFrames(arcpy.mapping.MapDocument("CURRENT"))[0].extent.JSON |
This file contains 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 time | |
def log(message): | |
print("%s | Python Shutdown | %s"%(time.asctime(),message)) | |
with open(fme.logFileName,"a") as logfile: | |
logfile.write("%s | Python Shutdown | %s\n"%(time.asctime(),message)) |
This file contains 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 arcpy | |
import os.path | |
# define local variables | |
wrkspc = r'C:\data\service_definitions' | |
arcpy.env.workspace = wrkspc | |
con = 'GIS Servers/arcgis on localhost_6080 (admin).ags' | |
for file in arcpy.ListFiles("*.mxd"): | |
file = os.path.join(wrkspc, file) | |
mapDoc = arcpy.mapping.MapDocument(file) |
This file contains 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
try: | |
response = conn.getresponse() # line 244 in original findBadTiles.py | |
except: | |
# re-open connection | |
conn = httplib.HTTPConnection(parsedUrl.netloc) | |
conn.request("GET", partTileURL, headers=txtheaders) | |
response = conn.getresponse() |
This file contains 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 Image | |
import ImageDraw | |
import ImageFont | |
# string according to dokuwiki syntax for a table row | |
data = "| # | 19.11.2011 | DARK TRANQUILLITY, ELUVEITIE, VARG, MERCENARY, GURD, OMNIUM GATHERUM | FZW, Dortmund |" | |
# first band of the line up (to constrain text length) | |
subject = data.split("|")[3].split(',')[0].strip() | |
date = data.split("|")[2].strip() |