About the Python Help category

General help/discussion forum for the Python programming language. All welcome.

Please format your pasted code using Markdown backticks like this:

```python
# YOUR CODE GOES HERE
if me.is_hungry:
   me.bake("bagel")
```

This will look like this:

# YOUR CODE GOES HERE
if me.is_hungry:
   me.bake("bagel")

That’s nicely colored and keeps indentation intact! :sunglasses:

If you make a mistake, don’t worry: you can always edit your post later to fix it.

18 Likes

3 posts were split to a new topic: IDLE not showing File menu

Evidently the code formatting used to be nicely colored from using ***py3. I get nice coloring from using…

```python

as the first fencing line as Carol Willing recommended in this helpful post.

Example:

    # YOUR CODE GOES HERE
    if me.is_hungry:
       me.bake("bagel")

UPDATE: I no longer have to use ```python to get full color for code (well, not full IDE color, but it’s still pretty good). HOWEVER, If I paste another code block right below the first one, one of them will use block quoting until I append the ````python.

4 Likes

[UPDATED]
A full treatment of the Commonmark markdown used by Discourse (and other platforms, like WhatsApp) CAN BE FOUND HERE.

AND ALSO HERE

Thankfully, this forum uses DiscoURSE not DiscoRD. Discourse is
free/libre open source software. Discord is a proprietary service
designed to profit by selling your personal data and conversations
(but don’t just take my word for it, read their privacy policy if
you’re interested).

For the Markdown-it engine used by Discourse, their documentation
recommends you just refer to the CommonMark Specification:

https://commonmark.org/help/
https://spec.commonmark.org/current/
2 Likes

Thank you for pointing that out. I was surprised when it looked like we were using it here on an installation at the python.org web server. Am relieved that we aren’t.

I’ve updated my post.