Convention for messages sent with `pycmd`()

I want to use pycmd() from inside a card to communicate a value from the JavaScript side to the add-on code in Python. If I see it correctly, all JavaScript subscribers will receive all messages.

Is there some convention used so that I can signal that a particular message belongs to my add-on? If not, is it safe to prefix the message with X-NNNNNN:, where NNNNNN is my add-on id?

1 Like

Some existing code checks the prefix of commands, so using your add-on as the prefix is the least likely to conflict.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.