# Python syntax highlighting

**URL:** <https://discourse.processing.org/t/python-syntax-highlighting/22173>\
**Category:** Site Feedback\
**Created:** [June 26, 2020, 5:09am UTC](https://discourse.processing.org/t/python-syntax-highlighting/22173 "2020-06-26T05:09:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [June 26, 2020, 5:09am UTC](https://discourse.processing.org/t/python-syntax-highlighting/22173/1 "2020-06-26T05:09:27Z")

</div>

I suspect that some recent update to the forum has thrown-off the Python syntax highlighting. It seems to more often ‘default’ to Java (or some other language?). You can get it to highlight Python by coaxing it – writing a comment here or there, or adjusting your code formatting slightly.

Perhaps there’s some way to set the default highlighting to Python for the Processing.py section?

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [November 22, 2020, 11:45pm UTC](https://discourse.processing.org/t/python-syntax-highlighting/22173/2 "2020-11-22T23:45:07Z")

</div>

Okay –

So it turns out you can use a language identifier, al a [Github Flavored Markdown](https://docs.github.com/en/free-pro-team@latest/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting), to control the highlighting. That’s a language name that immediately follows your opening pair of triple-quotes (that define a code block). For example:

``` java

```java
void hello(){}

```

``` pyhton

```python
def hello():
void hello(){}

```

``` javascript

```javascript
function hello(){}
def hello():
void hello(){}

```
