本文整理汇总了Python中win32com.client.Dispatch.overwriteoutput方法的典型用法代码示例。如果您正苦于以下问题:Python Dispatch.overwriteoutput方法的具体用法?Python Dispatch.overwriteoutput怎么用?Python Dispatch.overwriteoutput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类win32com.client.Dispatch
的用法示例。
在下文中一共展示了Dispatch.overwriteoutput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: dbf_to_list
# 需要导入模块: from win32com.client import Dispatch [as 别名]
# 或者: from win32com.client.Dispatch import overwriteoutput [as 别名]
from dbfpy import dbf
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Check out any necessary licenses
gp.CheckOutExtension("spatial")
gp.CheckOutExtension("3D")
# Load required toolboxes...
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx")
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/3D Analyst Tools.tbx")
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")
# Set environments
gp.overwriteoutput = 1
else:
print 'Must have Python 2.4 or 2.5 installed in order to run this program. Please download from www.Python.org'
print''
raw_input('!!!Press enter to continue!!!')
####################################################################################
########################################################################################
#Function to convert a specified column from a specified dbf file into a list
#e.g. dbf_to_list(some_dbf_file, integer_column_number)
def dbf_to_list(dbf_file, field_name):
if os.path.splitext(dbf_file)[1] == '.shp':
dbf_file = os.path.splitext(dbf_file)[0] + '.dbf'
#The next exception that is handled is handled within an if loop
#This exception would occur if a non .dbf file was entered
#First it finds wither the extension is not a .dbf by splitting the extension out
开发者ID:ihousman,项目名称:RSAC-Valley-Bottom-Logistic-Regression-Tool,代码行数:33,代码来源:RSAC_valley_bottom_logistic_model.py
示例2: Dispatch
# 需要导入模块: from win32com.client import Dispatch [as 别名]
# 或者: from win32com.client.Dispatch import overwriteoutput [as 别名]
# cru_combine.py
# Description: Add together a large number of rasters, summarizing values
# Author: scw, [email protected]
# Date: 6.24.2005
# Import COM Dispatch module
from win32com.client import Dispatch
GP = Dispatch("esriGeoprocessing.GPDispatch.1") # Create the geoprocessor object
GP.CheckOutExtension("Spatial") # Check out the required license
GP.overwriteoutput = 1 # Overwrite existing files
ws = 'f:/dev/cru_precip/' # Set the workspace
decades = ['196', '197', '198', '199', '200']
GP.Workspace = ws
count = 0
rlist = ''
try:
for dec in decades:
fcs = GP.ListRasters('prn_' + dec + '*')
fcs.reset()
fc = fcs.next()
inputs = ws + fc
# Get the next name and start the loop
fc = fcs.next()
count = count + 1
while fc: # While the fc name is not empty
inputs = inputs + ";" + ws + fc