Confluence Retirement

Due to the feedback from stakeholders and our commitment to not adversely impact USGS science activities that Confluence supports, we are extending the migration deadline to January 2023.

In an effort to consolidate USGS hosted Wikis, myUSGS’ Confluence service is targeted for retirement. The official USGS Wiki and collaboration space is now SharePoint. Please migrate existing spaces and content to the SharePoint platform and remove it from Confluence at your earliest convenience. If you need any additional information or have any concerns about this change, please contact myusgs@usgs.gov. Thank you for your prompt attention to this matter.
Skip to end of metadata
Go to start of metadata

This is a little python module to print ArcGIS tables from the Python prompt.

def qprint(tbl, flds="", maxrow=20):
    """quick-print an ArcGIS table view
    """
    #
    # Curtis Price, cprice@usgs.gov
    #
 
    fld_list = [f.name.upper() for f in arcpy.ListFields(tbl) if f.type != "Geometry"]
    print(fld_list)
    if flds:
        flds = [f for f in flds if f.upper() in fld_list]
    else:
        flds = fld_list
    tfmt = "{:>10} " * len(flds)
    fmt = "{:10} " * len(flds)
    print (tfmt.format(*flds))
    k = 1
    with arcpy.da.SearchCursor(tbl, flds) as rows:
        for row in rows:
            print(fmt.format(*row))
            if k >= maxrow:
                break
            else:
                k += 1



  • No labels