djordje
September 8, 2026, 8:50pm
1
Hello colleagues,
For the last few years, it was possible to type python code in discourse.mcneel replies like this:
But it seems something changed recently.
Because upper syntax does not work anymore, and discourse automatically makes “Preformated text”, out of upper text:
Does anyone know, how can we add python code to a discourse reply?
Thank you very much for the help.
dale
(Dale Fugier)
September 8, 2026, 9:47pm
2
def hello_world():
print("Hello from Python!")
djordje
September 8, 2026, 10:02pm
3
Thank you Dale. For some reason, it does not work on my side anymore.
I immediately get the “Preformated text”.
jeremy5
(Jeremy)
September 8, 2026, 10:03pm
4
I think you must have toggled into Rick Text Editor mode like this:
You can get back to the standard editor by clicking where marked, taking you back to:
djordje
September 8, 2026, 10:35pm
5
Hi @jeremy5 ,
It worked perfectly!
Thank you very much for the help!
def Addition(a, b):
c = a + b
return c