简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM