Hi,
you do not use Python from EMC the same way than you write a script running directly on a switch.
as for Python in 8.0.4, you can use the same metadata than TCL, and declare variables the same way too (do not quote them). To let the user modify the variables, you need to use them in the following way:
emc_vars["yourVar"]
You also have access to all the TCL variables:
myVar = emc_vars["deviceIP"]
if you use the port variable, it will prompt the user to select a list of ports.
ports = emc_vars["port"]
to execute CLI command:
cli_results = emc_cli.send("show vlan")
cli_output = cli_results.getOutput()
Hope it helps.