How to add new python encodings?

Asked

Viewed 57 times

0

I’m trying to install the pybraces but I can’t. How do I install it ?

I’m using python 2.7 and windows 10

1 answer

3


you should not install "pybraces" - if you want to learn Python, I recommend learning Python and not installing a modification to the language that will change it to non-standard. If you realemtne use Pybraces will use something that is not equal to Python for who knows Python, and is not equal to languages derived from "C" with java and Javascript, which use "{" and "}" to delimit blocks.

In fact, as it is not an extensively tested project it will hardly even have syntactic support to statements that use Python keys as dictionaries, sets, Dict comprehensions and set comprehensions.

Also, no example of Python you find on the internet (or stack overflow) will work.

If "{" and "}".

That being said, the instructions for installation are in README, in the very link you placed:

You'll need to copy or symlink braces.py into your Python lib/encodings
directory, and ensure that your user has rights to create the .pyc or .pyo
file there.

That is, simply put the file braces.py in the briefcase lib/encodings of your Python installation - and declare the encoding of each file with # coding: braces in the first line.

Pybraces' own project warns that it is "Silly": a way to put "{" and "}" into languages

  • I just want to install to see how it is (curiosity).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.