資源簡介
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
評論
共有 條評論