I need Stata to recognize that it's using Python code in a loop. Precisely, I want it to simply print "moo" and "oink"
When I try this though, Stata simply reports the error code "Break". Why? How might I solve this? The below, however, works
Code:
cls
loc sounds moo oink
foreach i of loc sounds {
python:
from sfi import Macro
ansound = Macro.getLocal('i')
print(ansound)
end
}
Code:
loc i moo
python:
from sfi import Macro
ansound = Macro.getLocal('i')
print(ansound)
end

Comment