Closed dnajd closed 11 years ago
So I didn't notice that this memory module example states
"Run inside a behavior environment (ie. choregraphe box) or inside a self created broker."
This makes it more difficult to use in naoscript or in a interactive python shell I think. Can we just pass naoenv to this and have it work off that?
In an interactive python shell I can understand. Although with naoutil.broker module it is not that difficult anymore. Run your code like:
with naoutil.broker.create('naoscript'):
your_code()
or
naoscript_broker = naoutil.broker.Broker('naoscript')
your_code()
naoscript_broker.shutdown()
But in naoscript I don't see why it's a problem? You kind of have to run your naoscript executer somewhere. If it is executed in a behaviour (like the .crg file available in naoscript project page) it should work, no? How are you running your naoscript executer then?
Passing a naoenv will do nothing. Naoenv does not ensure it runs in a broker or a behaviour actally.
I'm going to close this issue since, as Axel says it's trivial to create a broker.
I just saw you actually solved the issue yourself here: https://github.com/dnajd/FluentNao/blob/master/bootstrap.py#L10
:)
Two comments though:
I was trying to use the memory callbacks and even with the README.md example you have:
I get this error: