Search code examples
pythonwindowsnao-robotchoregraphe

Choregraphe - Define local method


Is it possible to define a local method in Choregraphe which I can use not only in the box / script editor where I defined that method and instaed using it in different boxes.

So far I created a python box with that one special method in it and everytime I used the function of the box I inserted it in my Flow Diagram. But I don't think this is the best way.

Thank you for your help.


Solution

  • No, that isn't the best way indeed.

    Two possibilities:

    • Include that function in a python module that you package with your application and then import from inside choregraphe - see here for how to do that.
    • Have most of your code outside Choregraphe - see here for some discussion of this approach and pros and cons vs others.