Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Python interface to FlexLib API

Mark Erbaugh
Mark Erbaugh Member ✭✭
edited February 2020 in New Ideas
Is anyone aware of / working on a Python interface to the FlexLib API? This would be quite useful. I'm a competent Python programmer, but haven't dabbled in .NET.
2 votes

Open for Comments · Last Updated


  • N7BCP
    N7BCP Member ✭✭
    edited July 2017
    The Flex libraries should be compatible with IronPython.
  • Bill - K7UOP
    Bill - K7UOP Member ✭✭
    edited October 2014

    I remember when I was working with Python on the Raspberry Pi (uses a variation of Debian Linux) that .NET libraries are available. Don't know how extensive they are but would be worth looking into (maybe you already have (?).

    Python compatibility might open up some apps on those smaller platforms.

  • Mark Erbaugh
    Mark Erbaugh Member ✭✭
    edited February 2020
    I've not worked with .net, but I found a ,net add-on for Python. The examples showed how to interact with Office. I'm guessing it wouldn't be that hard to use the Flexlib API. I assume that the C++ code would have to be compiled into a DLL, or is that DLL already part of SmartSDR? I've not worked with Iron Python, but that's another option. The thing about standard Python is that there are so many add on libraries and some aren't fully compatible with Iron Python. Martin Ewing published a Python based for the Beable **** in a recent QST. It would be nice to be able to integrate that with Flexlib.
  • Mark Erbaugh
    Mark Erbaugh Member ✭✭
    edited February 2020
    Another thought: would it make more sense for The Python library totalk directly to the Flex using. Python TCP/UDP library?
  • James Whiteway
    edited October 2014
    The Flexlib api is written in C#. When I downloaded it, I had to recompile it to use the dll's.
    Once I did that, all was well. Other than I'm still, trying to actually connect to my 6300 and
    have not quite succeeded yet!!! :-)
    But, then again, I'm not a C# guru and have been attempting to do it in VB.Net. Such fun!
  • Mark Erbaugh
    Mark Erbaugh Member ✭✭
    edited February 2020
    Update: I was able to access the FlexLib API .DLLs from C Python 2.7.9 using PythonDotNet at https://github.com/geographika/PythonDotNet. The problem with original Python for .NET at http://pythonnet.sourceforge.net/ is that it seems to be only form 32-bit versions.

    I used the version for WIndow2012 and it works with Windows 7. One gotcha that took me a while to figure out was that for the clr.pyt and PythonRuntime.dll files, you need to open the file properties and click "UNBLOCK" for .NET to allow them, since they were downloaded.

    I just put the clr.pyt, PythonRuntime.dll and the FlexLib API DLLs the DLLs folder of my Python installation.

  • w1smc
    w1smc Member ✭✭

    Does anyone have a completed example of using the API with Python?

    I'm using PyCharm as an IDE and cannot figure out how to use the FLEXAPI.

    Where do I place the DLL's in my Project?

    And what code is used to access the DLL's?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.