Journey to JSR223 Python 2 of 9

That is what got me into trouble. That is what I did the first time around (see JSR223 Python: Timer in dict doesn't work). Scott’s recommendation was that I had to promote the Timer to a global and I couldn’t do that by assigning it to the dict directly.

When I do, I get a _Timer type which doesn’t have the getStatus() and stop() functions, the latter of which is required for my use case (I gotta be able to stop the Timer). The Timer did still work though. I just couldn’t see it’s status nor stop it.

I don’t remember. Either I got an error or that was what an example I found used and I followed it. Or it was part of some blind flailing about trying to figure out why something wasn’t working. I just tried it without the str and indeed it is not needed. I’ll update the OP.

Yep, I just caught that when I looked into the unnecessary str check you just pointed out. The name line was completly broken

And if this is the only thing I’m doing that is not Pythonic I’m not doing too bad. It takes awhile to learn the “proper” way of doing things in a new language. While not as bad as Perl, Python seems to have a lot of ways to do something with one “proper” way.

1 Like