Re: Who are the "spacists"?

2017-03-19 Thread Pavol Lisy
On 3/19/17, Pavol Lisy wrote: > On 3/18/17, Nathan Ernst wrote: > PS. I am "spacist" :P but I feel this a little more aggressive than is > necessary too: > >> Feel free to start your own discussion forum for your new programming >> language that forbids spaces for indentation. That language will

About linters and PEP-8

2017-03-19 Thread Pavol Lisy
On 3/19/17, Chris Angelico wrote: > On Sun, Mar 19, 2017 at 4:53 PM, Pavol Lisy wrote: >> In case of spaces there is not discrepancy. pep8 and similar linters >> could work fine without incompatible configurations. > I don't like the pep8 tool; its name implies far more authority than > it actu

Re: Error installing python on Windows

2017-03-19 Thread Mark Summerfield
Windows users (quite reasonably IMO) expect installs to "just work". If Python needs extra bits it should ask the user if it can go get them and if they say Yes it should do just that. (And this should actually work -- unlike maybe, the Python 3.5 Windows installer.) And as for searching Google

Re: About linters and PEP-8

2017-03-19 Thread Chris Angelico
On Sun, Mar 19, 2017 at 7:24 PM, Pavol Lisy wrote: > On 3/19/17, Chris Angelico wrote: >> On Sun, Mar 19, 2017 at 4:53 PM, Pavol Lisy wrote: > >>> In case of spaces there is not discrepancy. pep8 and similar linters >>> could work fine without incompatible configurations. > >> I don't like the p

Re: Who are the "spacists"?

2017-03-19 Thread Grant Edwards
On 2017-03-18, Chris Angelico wrote: > On Sun, Mar 19, 2017 at 8:50 AM, Nathan Ernst wrote: >> My rule of thumb: tabs for indentation, spaces for alignment (i.e. trying >> to line up anything after a non-whitespace character on a single line). > > My rule of thumb: tabs for indentation, and don't

Re: Who are the "spacists"?

2017-03-19 Thread Grant Edwards
On 2017-03-18, Nathan Ernst wrote: > As I said earlier, where tabs are superior in that most code focused > editors (at least those worth using) allow you to adjust the width of the > tab. What about all other other text tools that _aren't_ 'code focused editors'? (e.g. grep, less, cat, awk, se

Re: Who are the "spacists"?

2017-03-19 Thread Mikhail V
On 19 March 2017 at 02:05, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sun, Mar 19, 2017 at 11:39 AM, Steve D'Aprano >> wrote: >>> Is it also ridiculous to use several newlines to space paragraphs >>> vertically? >> >> At least with paragraphs, we don't have eternal debates between people >>

Re: Where to start in the field of AI with Python

2017-03-19 Thread garabik-news-2005-05
Robert O'Shea wrote: > I just want to get into the basics for the moment, eventually getting into > stuff like machine learning and NLP (Natural Language Processing). You cannot do wrong by starting with NLTK (https://www.nltk.org/) and scikit (http://scikit-learn.org/) --

Re: Tabs are a security vulnerabilty [was Re: Who are the "spacists"?]

2017-03-19 Thread Mikhail V
On 19 March 2017 at 01:32, Steve D'Aprano wrote: > On Sun, 19 Mar 2017 03:30 am, Grant Edwards wrote: > >> tabs are a major security vulnerability and should be outlawed >> in all source code. > > > I've heard many arguments both in favour of and against tabs, but I've never > heard them described

Re: Who are the "spacists"?

2017-03-19 Thread Steve D'Aprano
On Mon, 20 Mar 2017 01:27 am, Grant Edwards wrote: > On 2017-03-18, Nathan Ernst wrote: > >> As I said earlier, where tabs are superior in that most code focused >> editors (at least those worth using) allow you to adjust the width of the >> tab. > > What about all other other text tools that _

Re: Who are the "spacists"?

2017-03-19 Thread Alain Ketterlin
Jon Ribbens writes: > On 2017-03-18, Grant Edwards wrote: >> On 2017-03-18, Mikhail V wrote: >>> How would one come to the idea to use spaces for indentation at all? >> >> Because tabs are a major security vulnerability and should be outlawed >> in all source code. > > You forgot to mention tha

python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
hello i have create a python script when read some files using paths and do something with that files. if that paths for files is in english likes this "c:/my_path/english " then python script working but if that paths is in my main language or the path have some blank character then not workin

Re: Who are the "spacists"?

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 4:29 AM, Steve D'Aprano wrote: > I wonder whether the tabs versus spaces divide is closely aligned to the > Windows versus Unix/Linux divide? > > It seems to me that Unix users are typically going to be using Unix tools > which often assume spaces are used for indentation,

Re: python script Non-ASCII character

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 4:38 AM, Xristos Xristoou wrote: > hello i have create a python script when read some files using paths and do > something with that files. > if that paths for files is in english likes this "c:/my_path/english " then > python script working but if that paths is in my ma

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: how to define my script with encoding of ISO-8859-7 or UTF-8?and for the blanks ? -- https://mail.python.org/mailman/listinfo/python-list

Re: About linters and PEP-8

2017-03-19 Thread Terry Reedy
On 3/19/2017 7:20 AM, Chris Angelico wrote: The tool "pep8" is inappropriately named. No linter should use this name. It implies a level of authority by linking with a very specific document. At Guido's request, the name was changed to 'pycodestyle'. See the note at the top of https://pep8.

Re: python script Non-ASCII character

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 6:48 AM, Xristos Xristoou wrote: > Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou > έγραψε: > > how to define my script with encoding of ISO-8859-7 or UTF-8?and for the > blanks ? First, try using Python 3. Most of the time, that will be t

Re: About linters and PEP-8

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 6:50 AM, Terry Reedy wrote: > On 3/19/2017 7:20 AM, Chris Angelico wrote: > >> The tool "pep8" is inappropriately named. No linter should use this >> name. It implies a level of authority by linking with a very specific >> document. > > > At Guido's request, the name was ch

Re: python script Non-ASCII character

2017-03-19 Thread Terry Reedy
On 3/19/2017 1:38 PM, Xristos Xristoou wrote: hello i have create a python script when read some files using paths and do something with that files. if that paths for files is in english likes this "c:/my_path/english " then python script working but if that paths is in my main language Non-

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: yes that i know but i need python 2.7 for my task -- https://mail.python.org/mailman/listinfo/python-list

Re: Who are the "spacists"?

2017-03-19 Thread Mikhail V
On 18 March 2017 at 22:50, Nathan Ernst wrote: > My issue with using spaces instead of tabs, is that, as mentioned earlier in > the thread, everyone has their own preferences on indentation. I've worked > on teams where different developers used 2, 3 & 4 spaces as indentation. > Obviously, if you'

Re: python script Non-ASCII character

2017-03-19 Thread Xristos Xristoou
Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: @Terry non-ascii in pathnames i need for ex :var1="C:\Users\username\Desktop\my language\mylanguage\myfile" and for the blank ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Who are the "spacists"?

2017-03-19 Thread Gregory Ewing
Steve D'Aprano wrote: Unix tools which often assume spaces are used for indentation, and consequently cope badly with tabs. I maintain that makes them "broken" tools, They're not broken in the context of Unix, where there is a long-standing convention of assuming tab stops every 8 columns. From

Re: Who are the "spacists"?

2017-03-19 Thread Gregory Ewing
Mikhail V wrote: Monospaced text rendering is an artifact, which exist on a very short time period in history. At best, one should just imagine it should not exist, and is just a temporary inconvinience. Actually it lasts already much longer than I would expect. The fact that it *has* lasted so

Re: Who are the "spacists"?

2017-03-19 Thread Larry Hudson via Python-list
On 03/18/2017 05:01 PM, Nathan Ernst wrote: [...] Personally, I dislike any editor that, by default, changes my input to something else. If I hit tab, I want a tab to be inserted, by default. If I want something else, I'll change the configuration. A trivial point (and irrelevant)... The thing

Re: Who are the "spacists"?

2017-03-19 Thread Jon Ribbens
On 2017-03-19, breamore...@gmail.com wrote: > On Sunday, March 19, 2017 at 9:54:52 PM UTC, Larry Hudson wrote: >> A trivial point (and irrelevant)... The thing I find annoying >> about an editor set to expand tabs to spaces is that it takes one >> keypress to indent but four (or whatever) to unin

Re: Who are the "spacists"?

2017-03-19 Thread Mikhail V
On 19 March 2017 at 22:54, Gregory Ewing wrote: > Mikhail V wrote: >> >> Monospaced text rendering is an artifact, >> which exist on a very short time period in history. >> At best, one should just imagine it should not exist, and is >> just a temporary inconvinience. Actually it lasts already muc

Re: cryptography default_backend is "hazmat"?

2017-03-19 Thread Paul Moore
On Sunday, 19 March 2017 03:16:17 UTC, Arthur Darcet wrote: > On Sat, 18 Mar 2017 at 23:29, Ian Pilcher wrote: > > > On 03/18/2017 05:15 PM, Chris Angelico wrote: > > > So the question is: How well do you trust the examples? Are they > > > likely to be instructing you in a safe way to use this >

Re: Who are the "spacists"?

2017-03-19 Thread Marko Rauhamaa
Gregory Ewing : > Steve D'Aprano wrote: >> Unix tools which often assume spaces are used for indentation, and >> consequently cope badly with tabs. I maintain that makes them >> "broken" tools, > > They're not broken in the context of Unix, where there is a > long-standing convention of assuming t

Re: About linters and PEP-8

2017-03-19 Thread Terry Reedy
On 3/19/2017 3:57 PM, Chris Angelico wrote: On Mon, Mar 20, 2017 at 6:50 AM, Terry Reedy wrote: On 3/19/2017 7:20 AM, Chris Angelico wrote: The tool "pep8" is inappropriately named. No linter should use this name. It implies a level of authority by linking with a very specific document. At

Re: Who are the "spacists"?

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 9:48 AM, Mikhail V wrote: > [regarding monospaced text] > Or, for example collision detection, which is part > of mouse text selection algorithm is much simpler, etc. > These are IMO main reasons why it still often used. I work extensively with MUDs, where traditionally AS

Re: Who are the "spacists"?

2017-03-19 Thread Erik
On 19/03/17 22:29, Jon Ribbens wrote: On 2017-03-19, breamore...@gmail.com wrote: On Sunday, March 19, 2017 at 9:54:52 PM UTC, Larry Hudson wrote: A trivial point (and irrelevant)... The thing I find annoying about an editor set to expand tabs to spaces is that it takes one keypress to indent

Re: Who are the "spacists"?

2017-03-19 Thread Marko Rauhamaa
Larry Hudson : > A trivial point (and irrelevant)... The thing I find annoying about an > editor set to expand tabs to spaces is that it takes one keypress to > indent but four (or whatever) to unindent. In emacs' Python mode, if I have entered: ===

Re: python script Non-ASCII character

2017-03-19 Thread MRAB
On 2017-03-19 20:10, Xristos Xristoou wrote: Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: @Terry non-ascii in pathnames i need for ex :var1="C:\Users\username\Desktop\my language\mylanguage\myfile" and for the blank ? Your choices are: 1. Raw string li

Re: python script Non-ASCII character

2017-03-19 Thread Steve D'Aprano
On Mon, 20 Mar 2017 06:48 am, Xristos Xristoou wrote: > Τη Κυριακή, 19 Μαρτίου 2017 - 7:38:19 μ.μ. UTC+2, ο χρήστης Xristos > Xristoou έγραψε: > > how to define my script with encoding of ISO-8859-7 or UTF-8?and for the > blanks ? First you need to know whether your editor is saving the file

Re: About linters and PEP-8

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 10:01 AM, Terry Reedy wrote: >>> At Guido's request, the name was changed to 'pycodestyle'. See the note >>> at >>> the top of >>> https://pep8.readthedocs.io/en/release-1.7.x/ >>> >>> This really should be noted also at the top of >>> https://pypi.python.org/pypi/pep8/1.7

Re: Who are the "spacists"?

2017-03-19 Thread Jon Ribbens
On 2017-03-19, Erik wrote: > On 19/03/17 22:29, Jon Ribbens wrote: >> Not to mention plenty of editors (e.g. vim) will unindent when you >> press backspace. > > I don't think that's strictly true. If you have just indented with a tab > character, then backspace will delete that tab character. But

Re: Who are the "spacists"?

2017-03-19 Thread Steve D'Aprano
On Mon, 20 Mar 2017 09:50 am, Marko Rauhamaa wrote: > the 8-column interpretation is the only defensible use for > tabs. Oh, that's a law of physics is it? "8 columns per tab" is one of the fundamental mathematical or physical constants baked into the nature of reality, like π ≈ 3.14159... e ≈

Re: Who are the "spacists"?

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 10:55 AM, Steve D'Aprano wrote: > Oh, that's a law of physics is it? "8 columns per tab" is one of the > fundamental mathematical or physical constants baked into the nature of > reality, like > > π ≈ 3.14159... > e ≈ 2.71828... > Feigenbaum constant δ ≈ 4.66920... > gravit

Re: Who are the "spacists"?

2017-03-19 Thread Steve D'Aprano
On Mon, 20 Mar 2017 06:00 am, Chris Angelico wrote: > On Mon, Mar 20, 2017 at 4:29 AM, Steve D'Aprano > wrote: >> I wonder whether the tabs versus spaces divide is closely aligned to the >> Windows versus Unix/Linux divide? >> >> It seems to me that Unix users are typically going to be using Unix

Re: Who are the "spacists"?

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 11:42 AM, Steve D'Aprano wrote: > Or perhaps "just that one guy": here is JMZ, who says it is "impossible" to > do anything with a text file unless you know what a TAB character > represents: > > I just care that two people editing the same file use the same >

Re: Who are the "spacists"?

2017-03-19 Thread Erik
On 19/03/17 23:23, Jon Ribbens wrote: On 2017-03-19, Erik wrote: On 19/03/17 22:29, Jon Ribbens wrote: Not to mention plenty of editors (e.g. vim) will unindent when you press backspace. I don't think that's strictly true. If you have just indented with a tab character, then backspace will d

how to corss-compile azure-iot-sdk-python

2017-03-19 Thread chenchao
Hi: I want to port the 'azure-iot-sdk-python' to my router(arm platform). How can i achieve this? -- https://mail.python.org/mailman/listinfo/python-list

Re: python script Non-ASCII character

2017-03-19 Thread eryk sun
On Sun, Mar 19, 2017 at 11:06 PM, MRAB wrote: > > If you're using Unicode string literals, your choices are: > > 1. Raw string literals: > > var1 = ur"C:\Users\username\Desktop\η γλωσσα μου\mylanguage\myfile" Raw unicode literals are practically useless in Python 2. They're not actually raw b

Re: About linters and PEP-8

2017-03-19 Thread Terry Reedy
On 3/19/2017 7:26 PM, Chris Angelico wrote: In the docs link you posted, scroll down a bit: https://pep8.readthedocs.io/en/release-1.7.x/intro.html#installation Or maybe that's outdated and also needs to be fixed? It is up to date for the latest outdated 'pep8'. It is needed for someone re

Re: About linters and PEP-8

2017-03-19 Thread Chris Angelico
On Mon, Mar 20, 2017 at 1:52 PM, Terry Reedy wrote: > On 3/19/2017 7:26 PM, Chris Angelico wrote: > >> In the docs link you posted, scroll down a bit: >> >> https://pep8.readthedocs.io/en/release-1.7.x/intro.html#installation >> >> Or maybe that's outdated and also needs to be fixed? > > > It is u

Re: python script Non-ASCII character

2017-03-19 Thread MRAB
On 2017-03-20 02:50, eryk sun wrote: On Sun, Mar 19, 2017 at 11:06 PM, MRAB wrote: If you're using Unicode string literals, your choices are: 1. Raw string literals: var1 = ur"C:\Users\username\Desktop\η γλωσσα μου\mylanguage\myfile" Raw unicode literals are practically useless in Pyth