Using C#, a simple web server, and Docker, I’ve been putting together an example of one approach for how to create a “Fiddle” web app to run Python (or other script languages) in a Docker container.
The source code can be found on GitHub, but beware that at the time of this writing, the implementation isn’t complete (only “Run on Docker” and “Run on Host” buttons do anything) and I’m in the midst of writing the article on how I put this together (also in that repo – watch the progress as I write the article and finish the web app!)
I’ve added some select DRAKON shapes for creating flowcharts. The Python code in the lower right editor is generated from the flowchart, and the output from the run is shown on the left.
PyLint is also now integrated into FlowSharpCode’s PythonCompilerService. This really improves the development process as many syntactical errors are detected before even running the code.
Also, the code generator creates an execution tree which independent of the language syntax, which means that support for other languages is easily added. Now granted, the code itself in each of the DRAKON shapes is Python code, but I have some ideas of how to make that code agnostic as well.
The built in “left-right” and “up-down” connectors now have a grip in the middle connecting line that can be moved to create “U”, “C” and their mirror, connections. A much needed enhancement!
This my 200th article on the Code Project!
The article is here, on Code Project. It covers install Debian, the various Windows and BBB software, and of course the Python and C# source code for the project.
Got a fun little project working this weekend. I wired up an L3G4200D gyroscope module to a BeagleBoneBlack, wrote the Python code to read the sensor data and send it over using RabbitMQ to a C# app on Windows displaying a 3D box. Now when I rotate the BeagleBoneBlack, the cube mirrors my movements!
Full article will be posted on Code Project in the next week.
There’s a lot of posts and articles out there about using AppDomain to load and unload assemblies, but I haven’t found one place that puts it all together into something that makes sense as well as exploring the nuances of working with application domains, hence the reason for this article.
The full article is posted on Code Project, here.