资源简介
publishHelper.py
代码片段和文件信息
# Publishes a service to machine myserver using USA.mxd
# A connection to ArcGIS Server must be established in the
# Catalog window of ArcMap before running this script
# Import arcpy module
import sys
import time
import arcpy
def generate_time_stamp():
time_now = int(time.time())
time_local = time.localtime(time_now)
dt = time.strftime(“%Y%m%d%H%M%S“ time_local)
return dt
def main(mxdurlmxdnm):
# Define local variables
wrkspc = mxdurl
mapDoc = arcpy.mapping.MapDocument(wrkspc + mxdnm)
# Provide path to connection file
# To create this file right-click a folder in the Catalog window and
# click New > ArcGIS Server Connection
out_folder_path = wrkspc
con_Filename = “connection.ags“
server_url = “http:/
- 上一篇:sendInfo.py
- 下一篇:《疯狂Python讲义》习题答案.rar
评论
共有 条评论