From 59b36aa4a696cbb3f4b5eddeebe7b45eb359b283 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Fri, 5 Mar 2021 09:40:02 -0300 Subject: [PATCH] Some trick with Python --- content/research/python.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 content/research/python.md diff --git a/content/research/python.md b/content/research/python.md new file mode 100644 index 0000000..962a4e7 --- /dev/null +++ b/content/research/python.md @@ -0,0 +1,14 @@ ++++ +title = "Python" +date = 2021-03-05 + +[taxonomies] +tags = ["python", "file", "encoding"] ++++ + +## Getting the encoding of a file + +```python +with open('filename') as origin: + return origin.encoding +```