Más información acerca de los equivalentes Python a las funciones AML
ABBREVIATIONS |
<no compatible>
AMLPATH |
<no aplicable>
ARGS < var ... var > |
import arcpy arcpy.GetParameterAsText(var)
ATOOL |
<no aplicable>
CALL |
<no aplicable>
CODEPAGE ANSI |
import locale locale.setlocale(locale.LC_ALL, "")
COMMANDS |
import arcpy for tool in arcpy.ListTools(): print tool
CONV_WATCH_TO_AML |
<no aplicable>
DALINES |
<no aplicable>
DATA |
declaraciones de ejec o eval
DATEFORMAT |
Utiliza varias funciones en el módulo de tiempo. Para obtener más información, consulte la función AML DATE -DFMT.
DELVAR < variable ... variable > |
del variable
DESCRIBE < geo_dataset > |
import arcpy desc = arcpy.Describe(geo_dataset) print desc.type
DO &LIST |
for <target> in <list>: <statements>
DO &REPEAT |
while <expression>: <statements>
DO &TO &BY |
for <target> in <list>: <statements>
DO &UNTIL < expresión > |
while not <expression>: <statements>
DO &WHILE < expresión > |
while <expression>: <statements>
DO |
declaraciones para o mientras
ECHO |
<no aplicable>
ENABLE |
<no aplicable>
ENCODE |
<no aplicable>
FLUSHPOINTS |
<no aplicable>
FORMAT |
<no aplicable>
FULLSCREEN |
<no aplicable>
GETLASTPOINT |
<no aplicable>
GETPOINT |
<no aplicable>
GOTO |
<no aplicable>
IACRETURN |
<no aplicable>
IF THEN ELSE |
if <testcase1>: <statements1> elif <testcase2>: <statements2> else: <statements3>
LABEL |
<no aplicable>
LISTCHAR |
<no aplicable>
LISTFILES |
<no aplicable>
LISTGLOBAL |
<no aplicable>
LISTLOCAL |
<no aplicable>
LISTPROGRAM |
<no aplicable>
LISTVAR |
<no aplicable>
MENU |
<no aplicable>
MENUPATH |
<no aplicable>
MESSAGES |
<no aplicable>
RESPONSE < solicitud > &SECONDS < secs > |
import time print prompt time.sleep(secs)
POPUP <archivo> <string_list> |
from Tkinter import * def PopupList(title, list): root = Tk() root.title(title) root.protocol("WM_DELETE_WINDOW", root.quit) frame = Frame(root) vScrollbar = Scrollbar(frame, orient=VERTICAL) hScrollbar = Scrollbar(frame, orient=HORIZONTAL) listbox = Listbox(frame, selectmode=SINGLE, xscrollcommand=hScrollbar.set, yscrollcommand=vScrollbar.set) vScrollbar.config(command=listbox.yview) vScrollbar.pack(side=RIGHT, fill=Y) hScrollbar.config(command=listbox.xview) hScrollbar.pack(side=BOTTOM, fill=Y) listbox.pack(side=LEFT, fill=BOTH, expand=1) frame.pack() for a in list: listbox.insert(END, a) root.mainloop() root.destroy() file = sys.argv[1] string_list = sys.argv[2] # semi-colon delimited string sList = l.split(";") f = open(file, 'r') line = f.readline() while len(line) <> 0: sList.append(line) line = f.readline() PopupList(file, sList)
PT |
<utilizar método GetMessages para obtener tiempo de ejecución de una herramienta>
PUSHPOINT |
<utilizar objetos y cursores de geometría para crear y modificar entidades>
RETURN |
<no aplicable>
ROUTINE |
<no aplicable>
RUN |
<no aplicable>
RUNWATCH |
<no aplicable>
SELECT |
<no aplicable>
SELCHAR |
<no aplicable>
SELVAR |
<no aplicable>
SEVERITY |
<no aplicable>
SHOW |
<no aplicable>
STATION |
<no aplicable>
STOP |
<no aplicable>
SYSTEM < comando > |
import os os.system(command)
TB |
<no aplicable>
TERMINAL |
<no aplicable>
PRUEBA |
<no aplicable>
THREAD |
<no aplicable>
TRANSLATE |
<no aplicable>
TTY |
<no aplicable>
TYPE < mensaje > |
print message
USAGE < comando > |
import arcpy arcpy.Usage(command)
WATCH |
<no aplicable>
WORKSPACE < ruta > |
from arcpy import env arcpy.env.workspace = path