Import python module in UIFlow project



  • Hello,
    I would like to use a Python class from this project in order to send commands directly to my X-Plane flight simulator.
    Is there a way to import a python class to a UIFlow project?
    I guess I could use a custom block but for now it doesn't work (when I click on create *.m5b file, a window shows a 502 bad Gateway error on both UIFlowDesktop and online)

    Thanks,

    Nicolas



  • Try using the Execute block in uiFlow to import the module and also for any custom commands.



  • thanks @world101
    I've seen this block but I can't manage to paste anything in it, it looks like pasteboard doesn't work in UIFlow IDE ... do you know any workaround ? (besides emulating keystrokes ...)

    Edit : Ok I managed to drag and drop the code in the Execute block text field, and I think we can edit it in the Python tab. Will try stuff now, thanks !