Re: Who are the "spacists"?

2017-03-20 Thread Marko Rauhamaa
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? Pretty much. Try printing out your program with lpr, or sending it to the terminal with cat, or opening it with

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Mon, Mar 20, 2017 at 6:01 PM, Marko Rauhamaa wrote: > 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? > > Pretty much. Try printing out your program

Re: cryptography default_backend is "hazmat"?

2017-03-20 Thread Ian Pilcher
On 03/19/2017 05:46 PM, Paul Moore wrote: 1. Fernet symmetric encryption, which is fine, but needs me to manage the key safely (and offers no help in doing that) 2. X509, whose docs are a reference (that you need to understand X509 to follow) and a couple of tutorials on generating/requesting key

Re: Who are the "spacists"?

2017-03-20 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Mar 20, 2017 at 6:01 PM, Marko Rauhamaa wrote: >> Pretty much. Try printing out your program with lpr, or sending it to >> the terminal with cat, or opening it with with Firefox. > > I don't use paper, but I tried cat and Firefox. In each case, the tab > characters show

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Mon, Mar 20, 2017 at 6:37 PM, Marko Rauhamaa wrote: >> I don't use paper, but I tried cat and Firefox. In each case, the tab >> characters showed precisely as they should: as indentation. Was it the >> exact same amount of indentation that showed when I originally wrote >> the text in my editor

Python BBS (and more)

2017-03-20 Thread Avon
Hi all. Just a FYI that a new Wiki has been started at wiki.bbs.geek.nz which aims to provide helpful information to bulletin board system (BBS) developers and users. It's a work in progress with a growing number of contributors that include tutorials related to coding a BBS using Python and anot

Re: Who are the "spacists"?

2017-03-20 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Mar 20, 2017 at 6:37 PM, Marko Rauhamaa wrote: >> The tools I mentioned honor the traditional tab stop columns: >> >> 1, 9, 17, 25, 33, 41, 49, 57, 65, 73 > > (Point of clarity: "whitespace" is a general term that covers U+0020 > SPACE, U+0009 CHARACTER TABULATION,

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Mon, Mar 20, 2017 at 8:56 PM, Marko Rauhamaa wrote: > All terminal emulators, editors, text utils etc honor the > convention out of the box. No wonder then that C source code files have > consecutive lines indented randomly: > >HT >SPC HT >SPC SPC SPC SPC HT > > etc. The tools show

EuroPython 2017: We have liftoff!

2017-03-20 Thread M.-A. Lemburg
We are excited to announce the launch of the EuroPython 2017 website: *** http://ep2017.europython.eu/ *** The EuroPython conference will take place in sunny Rimini, Italy, this year, from July 9 - 16. EuroPython 2017 - The European Python Conference --

How to package my project and make it ready to be installed by using pip

2017-03-20 Thread Daiyue Weng
Hi, I using Python 3.5.2 on Linux Mint 18.1, and I am wondering how to package my PyCharm Python project as a module so that it can installed by someone else by using pip. Like what tools and script I need to use or write in order to do that. cheers -- https://mail.python.org/mailman/listinfo/pyt

Re: How to package my project and make it ready to be installed by using pip

2017-03-20 Thread Glenn Hutchings
On Monday, 20 March 2017 11:36:34 UTC, Daiyue Weng wrote: > Hi, I using Python 3.5.2 on Linux Mint 18.1, and I am wondering how to > package my PyCharm Python project as a module so that it can installed by > someone else by using pip. Like what tools and script I need to use or > write in order t

Re: Who are the "spacists"?

2017-03-20 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Mar 20, 2017 at 8:56 PM, Marko Rauhamaa wrote: >> I bet some terminal emulators support ANSI escape sequences to set >> the tab stops to arbitrary columns, but nobody uses that >> type-writer-era mechanism. > > Probably not. Most people would use the tabs(1) command ins

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 12:30 AM, Marko Rauhamaa wrote: >> And in the Unicode specifications, > > Unicode was 25 years late to the game, but please point me to the > paragraph anyway. 3.3, D3 Character semantics: The semantics of a character are determined by its identity, normative properties, a

Re: Who are the "spacists"?

2017-03-20 Thread Steve D'Aprano
On Tue, 21 Mar 2017 12:30 am, Marko Rauhamaa wrote: > Unicode was 25 years late to the game I don't understand that comment. Are you suggesting that the oldest convention wins? The Unix 8-column convention is older than Unicode, so it wins? Well... in that case, there are tab conventions that pr

Re: Who are the "spacists"?

2017-03-20 Thread BartC
On 20/03/2017 08:15, Chris Angelico wrote: On Mon, Mar 20, 2017 at 6:37 PM, Marko Rauhamaa wrote: The tools I mentioned honor the traditional tab stop columns: 1, 9, 17, 25, 33, 41, 49, 57, 65, 73 That means that you were depending, in your source file, on something that isn't actuall

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 1:24 AM, BartC wrote: > But it would be better IMO if tabs were used, with some scheme for > suggesting the tab width (or set of tab stops) that is recommended (eg. a > comment at the top). If you absolutely have to, then sure, put a directive in some machine-readable way

How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex?

2017-03-20 Thread David Shi via Python-list
Hi, there, Can anyone help? How to search out all Zip codes and replace with the first 2 digits, in a Pandas dataframe, with the use of regex? For instance, a ZIP code 33132 was found and replaced with 33. Looking forward to hearing from you. Regards. David -- https://mail.python.org/mailman/lis

Re: Who are the "spacists"?

2017-03-20 Thread BartC
On 20/03/2017 14:32, Chris Angelico wrote: On Tue, Mar 21, 2017 at 1:24 AM, BartC wrote: But it would be better IMO if tabs were used, with some scheme for suggesting the tab width (or set of tab stops) that is recommended (eg. a comment at the top). If you absolutely have to, then sure, put

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 2:19 AM, BartC wrote: > But tabs are also used after statements, before comments for example, or to > line up elements in tables. Then it doesn't work, because tabs may represent > 1 to N spaces: > > Using N=4, with 1 tab before each number: > > (one, 1), #com

Re: Who are the "spacists"?

2017-03-20 Thread Tobiah
> 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, and consequently cope > badly with tabs. I can't thin

Re: Who are the "spacists"?

2017-03-20 Thread Random832
On Sun, Mar 19, 2017, at 18:48, Mikhail V wrote: > Sadly, many people believe that a code editor > should be monospaced, but generally that does not > have any sense. It's also a bit self-reinforcing because there aren't many good coding fonts that are proportional. And in fact there are issues fo

Re: How to package my project and make it ready to be installed by using pip

2017-03-20 Thread Daiyue Weng
I have been Python Packaging User Guide , and I created a setup.py in my PyCharm project root, from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) packages = find_packages(exclude=['contrib', 'docs', 'tests*']

cross python version randomness

2017-03-20 Thread Robin Becker
Is there a way to get the same sequences of random numbers in python 2.7 and python >= 3.3? I notice that this simple script produces different values in python 2.7 and >=3.3 C:\code\hg-repos\reportlab>cat s.py import sys, random print(sys.version) random.seed(103) for i in range(5): print

relative paths connect using python

2017-03-20 Thread Xristos Xristoou
i have a little confused problem. i want to store some paths from images using python 2.7 in windows 10. i have some relative path like this var1='C:/my/store/path' and in the final folder where in my example is the name 'path' inside that folder i have some images like this : -path -myimage_

Re: Who are the "spacists"?

2017-03-20 Thread jladasky
On Sunday, March 19, 2017 at 1:11:45 PM UTC-7, Mikhail V wrote: > Trying to line up things after a non-whitespace character, e.g. like this? > > myList = [ > ["a", "b", "c"], > ["mess up your alignment", "b", "c"], > ["a", "b", "c"]

Re: How to package my project and make it ready to be installed by using pip

2017-03-20 Thread Daiyue Weng
If I tried pip3 install git+https://user_n...@bitbucket.org/user_name/project_name.git the package would get installed, but there are no python files that have been installed in /usr/local/lib/python3.5/dist-packages/project_name Hence I couldn't import any class in the package in python. I am

Re: relative paths connect using python

2017-03-20 Thread Steve D'Aprano
On Tue, 21 Mar 2017 04:05 am, Xristos Xristoou wrote: > i have a little confused problem. i want to store some paths from images > using python 2.7 in windows 10. i have some relative path like this > var1='C:/my/store/path' That's not a relative path, that's an absolute path. > and in the fin

Re: Who are the "spacists"?

2017-03-20 Thread Steve D'Aprano
On Tue, 21 Mar 2017 02:40 am, Tobiah 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, and c

Re: relative paths connect using python

2017-03-20 Thread jladasky
On Monday, March 20, 2017 at 10:05:33 AM UTC-7, Xristos Xristoou wrote: > i have a little confused problem. i want to store some paths from images > using python 2.7 in windows 10. > i have some relative path like this var1='C:/my/store/path' and in the final > folder where in my example is the n

Re: relative paths connect using python

2017-03-20 Thread Xristos Xristoou
Τη Δευτέρα, 20 Μαρτίου 2017 - 7:05:33 μ.μ. UTC+2, ο χρήστης Xristos Xristoou έγραψε: > i have a little confused problem. i want to store some paths from images > using python 2.7 in windows 10. > i have some relative path like this var1='C:/my/store/path' and in the final > folder where in my ex

Re: __del__ is not called after creating a new reference

2017-03-20 Thread Steve D'Aprano
On Sat, 18 Mar 2017 01:54 am, Oleg Nesterov wrote: [...] > However, this trivial test-case > > class C: > def __del__(self): > print("DEL") > global X > X = self > C() > print(X) > X = 0 > print(X) > > shows that __del__ is called only once, it is not called again after "X = > 0": > > DEL > <__

Re: __del__ is not called after creating a new reference

2017-03-20 Thread Steve D'Aprano
On Tue, 21 Mar 2017 04:51 am, Steve D'Aprano wrote: > On Sat, 18 Mar 2017 01:54 am, Oleg Nesterov wrote: > > [...] >> However, this trivial test-case [...] > I cannot confirm that test case. When I try it, I get NameError: Ah, never mind! I was running this in the interactive interpreter, and f

Re: relative paths connect using python

2017-03-20 Thread Michael Torrie
On 03/20/2017 11:49 AM, Xristos Xristoou wrote: > and the path i need full absolute path like this : > var1='C:/my/store/path/myimage_1010_im.png' > > in my first code i dont have error but i take wrong for me path not full Since you have not provided any sample output from your program, there'

Re: relative paths connect using python

2017-03-20 Thread alister
On Mon, 20 Mar 2017 10:49:39 -0700, Xristos Xristoou wrote: > Τη Δευτέρα, 20 Μαρτίου 2017 - 7:05:33 μ.μ. UTC+2, ο χρήστης Xristos > Xristoou έγραψε: >> i have a little confused problem. i want to store some paths from >> images using python 2.7 in windows 10. >> i have some relative path like this

Re: Who are the "spacists"?

2017-03-20 Thread Joel Goldstick
On Mon, Mar 20, 2017 at 1:39 PM, Steve D'Aprano wrote: > On Tue, 21 Mar 2017 02:40 am, Tobiah 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 tool

Re: Who are the "spacists"?

2017-03-20 Thread alister
On Sun, 19 Mar 2017 23:01:22 +, Erik wrote: > 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

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 4:39 AM, Steve D'Aprano wrote: > And yet I'm forever being told by my Linux sys admin work mates "don't use > tabs, because they break everything". For another example, see JMZ's essay > (its already been linked to twice in this thread, look it up). > > We've had a similar

Re: Who are the "spacists"?

2017-03-20 Thread Marko Rauhamaa
Steve D'Aprano : > On Tue, 21 Mar 2017 12:30 am, Marko Rauhamaa wrote: > >> Unicode was 25 years late to the game > > I don't understand that comment. Are you suggesting that the oldest > convention wins? The Unix 8-column convention is older than Unicode, so it > wins? The 8-column convention is

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 5:57 AM, alister wrote: > I have just tested this with geany & it works a charm, > > personally I prefer tabs for setting my indent levels, it feels more > logical & breaks nothing if the font or tab size is changed but votes > have been counted & the jury has returned a ve

Re: Who are the "spacists"?

2017-03-20 Thread alister
On Tue, 21 Mar 2017 06:04:12 +1100, Chris Angelico wrote: > On Tue, Mar 21, 2017 at 5:57 AM, alister > wrote: >> I have just tested this with geany & it works a charm, >> >> personally I prefer tabs for setting my indent levels, it feels more >> logical & breaks nothing if the font or tab size is

Re: Who are the "spacists"?

2017-03-20 Thread Chris Angelico
On Tue, Mar 21, 2017 at 8:19 AM, alister wrote: > On Tue, 21 Mar 2017 06:04:12 +1100, Chris Angelico wrote: > >> On Tue, Mar 21, 2017 at 5:57 AM, alister >> wrote: >>> I have just tested this with geany & it works a charm, >>> >>> personally I prefer tabs for setting my indent levels, it feels mo

Re: Who are the "spacists"?

2017-03-20 Thread Gregory Ewing
Steve D'Aprano wrote: But wait... before there was COBOL, there were *typewriters*. Its been many years since I've had my hands on a manual typewriter, but if I remember correctly the standard default tab setting was 1 inch. I haven't used many manual typewriters, but on the ones I have used, t

Re: Who are the "spacists"?

2017-03-20 Thread Mikhail V
On 20 March 2017 at 16:19, BartC wrote: > On 20/03/2017 14:32, Chris Angelico wrote: >> >> On Tue, Mar 21, 2017 at 1:24 AM, BartC wrote: >>> >>> But it would be better IMO if tabs were used, with some scheme for >>> suggesting the tab width (or set of tab stops) that is recommended (eg. a >>> com

Re: cross python version randomness

2017-03-20 Thread Kev Dwyer
Robin Becker wrote: > Is there a way to get the same sequences of random numbers in python 2.7 > and python >= 3.3? > > I notice that this simple script produces different values in python 2.7 > and >=3.3 > > C:\code\hg-repos\reportlab>cat s.py > import sys, random > print(sys.version) > random.