Has anyone used a blockly interface to make an offline Python IDE/tool ?

43 views
Skip to first unread message

Alexandre B A Villares

unread,
May 29, 2024, 8:12:03 PMMay 29
to Blockly
Hi!

I've been trying to find a desktop, offline, editor with a blockly-like programming interface that would then let the user execute Python code on a local Python interpreter.

I have no experience with Electron, but I understand it might be able to help one make a desktop application from a web based JavaScript foundation, would that make sense to explore?

best regards,
Alexandre

---





Christopher Allen

unread,
May 30, 2024, 1:45:28 PMMay 30
to blo...@googlegroups.com
Hi Alexandre,
 
I've been trying to find a desktop, offline, editor with a blockly-like programming interface that would then let the user execute Python code on a local Python interpreter.

That is indeed something one could build with Blockly.
 
I have no experience with Electron, but I understand it might be able to help one make a desktop application from a web based JavaScript foundation, would that make sense to explore?

I don't think the Blockly team has any expertise on Electron, but I imagine that someone has tried to build an Electron app that uses Blockly, and with luck they see this thread and share their experiences.

That said:
  • The idea seems plausible and I don't know of any specific reasons it should not be straightforward.
  • It's possible there are some differences between how Blockly runs in a browser and how it would run in an Electron app, and if you discover any that seem like they might be bugs in Blockly we would of course welcome a bug report (with steps to reproduce).
  • If using Electron didn't work for some reason, or if you found that the electron app was too heavyweight (a common complaint in my observation), you could instead have your app fire up the user's browser of choice and point it at a simple HTTP server, provided by the app, that serves the UI as HTML+CCS+JS and takes GET/POST requests for saving and running code.  This server app could itself be written in Python, which might be advantageous since users will need a Python runtime installed in order to run their generated code anyway.

Best wishes,

Christopher

Alexandre B A Villares

unread,
May 30, 2024, 2:21:50 PMMay 30
to Blockly
Thanks for the reply, Christopher!

I really don't want to learn Electron and I've also heard a few complaints about Electron being "heavy".
The browser idea seems cool, and reminds me a bit of the Jupyter Lab strategy :)

I'll keep my ears open!

regards,
Alexandre


Reply all
Reply to author
Forward
0 new messages