1

Gedit has two options for syntax highlighting for Python:

  • Python
  • Python2

Is the "Python" option for:

  1. Older versions of Python less than version 2 (ex. 1.6, 1.5, ...)

    ...or...

  2. Newer versions of Python greater than version 2 (ex. 3.0, 3.1, 3.9, ...)

In other words, to do syntax highlighting for Python 3.9, which of the two options should I select?

I am using Gedit version 40.1-1 in Ubuntu 21.10. Here is a screenshot of Gedit's syntax highlighting options menu:

Gedit Syntax Highlighting Options Menu

1
  • 1
    "Python" option will work for you (I am using it from a lot of time I don't think that there is a problem)
    – Error404
    Nov 12, 2021 at 15:35

1 Answer 1

2

Aside from Python 1.x being completely irrelevant these days (do you expect the "Python console" in gedit to run Python 1?), if you need confirmation, here's the defining line for "Python" in the GtkSourceView source code:

<language id="python3" name="Python" version="2.0" _section="Script">

GtkSourceView is the library used by gedit for syntax highlighting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .