Server Socket in Other Apps #3
Replies: 2 comments
-
Yes the plugin will stringify the entire script as is what it makes more sense from a user standpoint; click run and it will execute the current script. If I understand correctly you want to send only a single command (e.g. socket.write(json.dumps({'text' : my_command})) Let me know if I understood correctly or if you have other questions. BTW I did not know about nxt-dev as it seems pretty cool. Will likely take a look into into soon. |
Beta Was this translation helpful? Give feedback.
-
The reason for the stringified array is it allow for more information to be sent (e.g the current file). Probably it would make sense to accept both simple string and stringified arrays. |
Beta Was this translation helpful? Give feedback.
-
Hey!
There is probably a simple solution but I can't seem to find an elegant fix - I'm trying to get serversocket to work in NXT
https://nxt-dev.github.io/
Basically the integration is working, I'm able to use your sample code and create a blur node, for example.
The issue is that I don't want to pass an entire huge python script as a string every time I send python commands through the socket. Does your Visual Studio plugin "stringify" your entire python script every time you send a script? If I want to write python as python (not stringified), do I need some kind of "wrapper" script which stringifies the entire python script every time I send through the socket?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions