Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(27)  |  Call(27)  |  Derive(0)  |  Import(0)

src/d/e/defense-and-intel-analysis-toolbox-HEAD/toolboxes/scripts/FM5-33CCM.py   defense-and-intel-analysis-toolbox(Download)
 
    runVegetation = False
    if inputVegetation != types.NoneType and arcpy.Exists(inputVegetation) == True:
        runVegetation = True
 
    runSoils = False
    if inputSoils != types.NoneType and  arcpy.Exists(inputSoils) == True:
 
    runRoughness = False
    if inputSurfaceRoughness != types.NoneType and  arcpy.Exists(inputSurfaceRoughness) == True:
        runRoughness = True
 
    for i in deleteme:
        if debug == True: arcpy.AddMessage("Removing: " + str(i))
        if arcpy.Exists(i):
            arcpy.Delete_management(i)
    if debug == True: arcpy.AddMessage("Done")

src/a/r/arcapi-HEAD/arcapi.py   arcapi(Download)
 
    mxd = arcpy.mapping.MapDocument(template)
    if not arcpy.Exists(x):
        x = arcpy.CopyFeatures_management(x, arcpy.CreateScratchName('tmp', workspace = 'in_memory')).getOutput(0)
        todel = [x]
    dtype = arcpy.Describe(x).dataType
    df = arcpy.mapping.ListDataFrames(mxd)[0]
 
    lr = "chart" + tstamp(tf = "%H%M%S")
    if arcpy.Exists(lr) and arcpy.Describe(lr).dataType in ('FeatureLayer', 'RasterLayer'):
    """
    deletted = False
    if arcpy.Exists(x):
        arcpy.Delete_management(x)
        deletted = True
            arcpy.env.workspace = ws
    else:
        if ws[-4:].lower() == '.gdb' and not arcpy.Exists(ws):
            import re
            ws = arcpy.management.CreateFileGDB(os.path.dirname(ws), re.sub(".gdb", "", os.path.basename(ws), re.IGNORECASE), "CURRENT").getOutput(0)
            arcpy.env.scratchWorkspace = ws
    else:
        if ws[-4:].lower() == '.gdb' and not arcpy.Exists(ws):
            import re
            ws = arcpy.management.CreateFileGDB(os.path.dirname(ws), re.sub(".gdb", "", os.path.basename(ws), re.IGNORECASE), "CURRENT").getOutput(0)

src/d/e/defense-and-intel-analysis-toolbox-HEAD/toolboxes/scripts/RasterOffRoad.py   defense-and-intel-analysis-toolbox(Download)
 
    #TODO: Need more thorough and complete checks of inputs
    if inputVegetation != types.NoneType and arcpy.Exists(inputVegetation) == True:
        # f3: vegetation
        f3t = os.path.join(scratch,"f3t")
        ccmFactorList.append(f3)
 
    if inputSoils != types.NoneType and  arcpy.Exists(inputSoils) == True:
        # f4: soils
        f4t = os.path.join(scratch,"f4t")
        ccmFactorList.append(f4)
 
    if inputSurfaceRoughness != types.NoneType and  arcpy.Exists(inputSurfaceRoughness) == True:
        # f5: surface roughness
        f5t = os.path.join(scratch,"f5t")
    for i in deleteme:
        if debug == True: arcpy.AddMessage("Removing: " + str(i))
        if arcpy.Exists(i):
            arcpy.Delete_management(i)
            pass

src/d/e/defense-and-intel-analysis-toolbox-HEAD/toolboxes/scripts/Trajectory_Path.py   defense-and-intel-analysis-toolbox(Download)
       if debug == True:
        arcpy.AddMessage("removing: " + str(junk))
       if arcpy.Exists(junk):
        arcpy.Delete_management(junk)
 

src/d/e/defense-and-intel-analysis-toolbox-HEAD/toolboxes/scripts/LLOSProfileGraphAttachments.py   defense-and-intel-analysis-toolbox(Download)
    arcpy.AddMessage("Removing scratch data ...")
    for ds in deleteme:
        if arcpy.Exists(ds):
            arcpy.Delete_management(ds)
            if debug == True: arcpy.AddMessage(str(ds))

src/a/r/arc-open-HEAD/arc_open/export.py   arc-open(Download)
    def kmz(self):
        kmz_file = self.full_path + '.kmz'
        arcpy.MakeFeatureLayer_management(self.shapefile, self.output_name)
        if arcpy.Exists(kmz_file):
            arcpy.Delete_management(kmz_file)

src/l/p/lpfm-HEAD/processing/lpfm_unionag.py   lpfm(Download)
                theList = [str1, str2]
		theOut = theFD + "/c" + str(i)
		if arcpy.Exists(theOut):
                        arcpy.Delete_management(theOut)
                arcpy.Union_analysis(theList, theOut, "NO_FID")
        theList = [theFD + "/c300", theFD + "/usa_wgs"]
        theOut = theFD + "/lpfm_union"
        if arcpy.Exists(theOut):

src/o/p/OpenColorado-Tools-and-Utilities-HEAD/Scripts/ArcGIS/10.0/Python/PublishOpenDataset.py   OpenColorado-Tools-and-Utilities(Download)
    gdb_feature_class = os.path.join(gdb_temp, name)
 
    if not arcpy.Exists(gdb_temp):
        logger.debug('Creating temp file geodatabase v' + args.gdb_version + ' for processing:' + gdb_temp)
 

src/a/r/arc-open-HEAD/arc_open/convert.py   arc-open(Download)
                        'or directory or delete the previously created ' +
                        'shapefile.')
        if arcpy.Exists(shapefile):
            name.setErrorMessage(exists_error)
        else:

src/g/e/geoprocessing-tools-for-hadoop-HEAD/JSONUtil.py   geoprocessing-tools-for-hadoop(Download)
    #create output dataset
    attributeFieldList = _createDataset(output_fc, json_fc, geomType)
    if arcpy.Exists(output_fc) == False :
        raise JUError('Cannot create: ' + output_fc)
 
    #create output dataset
    attributeFieldList = _createDataset(output_fc, json_fc, geomType)
    if arcpy.Exists(output_fc) == False :
        raise JUError('Cannot create: ' + output_fc)
 

  1 | 2  Next