4 ms·
I once tried it; well, Expect specifically, which is really an executable wrapper of TCL with a library loaded. I ended up ditching it and using ruby's "expect"
by jolmg 8y ago
I once tried it; well, Expect specifically, which is really an executable wrapper of TCL with a library loaded. I ended up ditching it and using ruby's "expect" library. I remember having issues with scope. Expect functions you call would manipulate the scope of the caller. So when I wrapped some code in a function and called that in its place, things wouldn't work, because state wouldn't be handled in the same scope anymore. That means I wouldn't be able to abstract anything. No reusable units of code. I'd have to keep expect's calls all in the same scope.
TCL and Expect seem pretty cool in concept, but Expect's implementation seems awful.
- Cyph0n 8y agoTcl/Expect are both heavily used at Cisco for router and switch automation. But recently, we've been shifting to Python for testing and automation, which I think is a step in the right direction (e.g., pyATS[1]). [1]: https://developer.cisco.com/site/pyats/ https://developer.cisco.com/site/pyats/