Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Bob Martin
in 773391 20170418 141627 "Mario R. Osorio" wrote: >Feels like this is something personal against Steven. You should probably t= >ake this to court. I'd rather read Steven's insightful answers and rants th= >an you crying. None here is meant to sugar coat anything, a

Re: Import name conflicts

2017-04-18 Thread Tim Johnson
* Steve D'Aprano [170418 16:08]: > On Wed, 19 Apr 2017 04:28 am, Tim Johnson wrote: > > > Using python 2.7~ > > > > For testing and edification purposes: > > > > I have a project which has a controllers package at the directory > > level just below the root. > > Do you mean the root of the fil

Re: Test if Script Already Running

2017-04-18 Thread Jon Ribbens
On 2017-04-19, Matt wrote: > I have a number of simple scripts I run with cron hourly on Centos > linux. I want the script to check first thing if its already running > and if so exit. > > In perl I did it with this at the start of every script: > > use Fcntl ':flock'; > INIT { >

Re: Test if Script Already Running

2017-04-18 Thread Erik
On 19/04/17 01:31, Matt wrote: In perl I did it with this at the start of every script: use Fcntl ':flock'; [snip] How can I do something like this in Python? >>> import fcntl >>> help(fcntl.flock) E. -- https://mail.python.org/mailman/listinfo/python-list

Test if Script Already Running

2017-04-18 Thread Matt
I have a number of simple scripts I run with cron hourly on Centos linux. I want the script to check first thing if its already running and if so exit. In perl I did it with this at the start of every script: use Fcntl ':flock'; INIT { open LH, $0 or die "Can't open $0 for lockin

Re: Python and the need for speed

2017-04-18 Thread Erik
On 19/04/17 00:33, bartc wrote: So that's 'label-pointers' which I assume must correspond to computed goto. Yes - just different terminology. Being able to take the address of a label and "goto address" rather than "goto label". (I don't know why they should be faster than a switch; they ju

Re: Import name conflicts

2017-04-18 Thread Steve D'Aprano
On Wed, 19 Apr 2017 04:28 am, Tim Johnson wrote: > Using python 2.7~ > > For testing and edification purposes: > > I have a project which has a controllers package at the directory > level just below the root. Do you mean the root of the file system? >>From the top-level (root) of the project

Re: Import name conflicts

2017-04-18 Thread Tim Johnson
* Ben Finney [170418 14:58]: > Tim Johnson writes: > > > Using python 2.7~ > > In Python 2, you should turn on the “default import is absolute” by > issuing the statement:: > > from __future__ import absolute_import > > as one of the first statements in each module. > > When you migrate

Re: Python and the need for speed

2017-04-18 Thread bartc
On 19/04/2017 00:19, Gregory Ewing wrote: bartc wrote: Another optimisation for something like ADD, was to to check for very common types such as INT, and deal with those locally. And then you're on the path to writing a JIT compiler. If you can identify such cases, you might as well generat

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Wildman via Python-list
On Wed, 19 Apr 2017 08:34:03 +1000, Chris Angelico wrote: > On Wed, Apr 19, 2017 at 8:28 AM, Ben Finney > wrote: >> Chris Angelico writes: >> >>> The charge has been examined and dropped. Steven did not violate the >>> CoC. Please stop talking as if he has. He *was accused of* violating >>> it,

Re: Static typing [was Re: Python and the need for speed]

2017-04-18 Thread Gregory Ewing
Steve D'Aprano wrote: You seem to be describing a *tracing JIT* compiler. Well, yes, but it seems to me that a JIT compiler that *doesn't* use tracing is just an AOT compiler that you happen to run immediately before executing the program. Cython doesn't do any of that -- it's just a plain,

Re: Python and the need for speed

2017-04-18 Thread bartc
On 18/04/2017 23:33, Erik wrote: On 18/04/17 11:30, bartc wrote: On 18/04/2017 10:32, Erik wrote: the improvements over the original huge switch() to dispatch the bytecodes to the correct handler appear to have made this type of optimization less effective. What did they do to it, and on whi

Re: Python and the need for speed

2017-04-18 Thread Erik
On 19/04/17 00:08, Gregory Ewing wrote: Erik wrote: When considering special-casing this opcode sequence, remember that in-place operations can be performed on anonymous objects (i.e., those referenced by a collection and not bound directly to a namespace): I think this means you would want mu

Re: Decode email subjects into unicode

2017-04-18 Thread akomack100
On Wednesday, March 19, 2008 at 3:24:45 AM UTC-7, Laszlo Nagy wrote: > Gertjan Klein wrote: > > Laszlo Nagy wrote: > > > > > >> However, there are malformed emails and I have to put them into the > >> database. What should I do with this: > >> > > [...] > > > >> There is no encoding giv

Re: Python and the need for speed

2017-04-18 Thread bartc
On 19/04/2017 00:08, Gregory Ewing wrote: Erik wrote: When considering special-casing this opcode sequence, remember that in-place operations can be performed on anonymous objects (i.e., those referenced by a collection and not bound directly to a namespace): I think this means you would want

Re: Python and the need for speed

2017-04-18 Thread Gregory Ewing
bartc wrote: But another problem was, there /are/ no simple byte-codes in CPython! Yes, that's the crux of the whole thing. It's the reason it's so hard to compile Python to anything that runs significantly faster than interpreted code. Another optimisation for something like ADD, was to to c

Re: Python and the need for speed

2017-04-18 Thread Gregory Ewing
Erik wrote: When considering special-casing this opcode sequence, remember that in-place operations can be performed on anonymous objects (i.e., those referenced by a collection and not bound directly to a namespace): I think this means you would want multiple versions of the +=1 opcode: ADD_O

Re: Looping [was Re: Python and the need for speed]

2017-04-18 Thread Gregory Ewing
Ben Bacarisse wrote: I fond the proportion on while True: loops surprising. Is there something about Python that encourages that kind of loop? Maybe because for-loops take care of most of the ordinary cases in Python, leaving while-loops to cover the weird ones, many of which need one or more

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 8:47 AM, Ben Finney wrote: > Chris Angelico writes: > >> I was referring to your post, in which a fairly solid argument was >> made for there being no guilt. Maybe you don't have any specific >> authority > > I definitely don't, and I hope no one reads my words on this top

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Ben Finney
Chris Angelico writes: > I was referring to your post, in which a fairly solid argument was > made for there being no guilt. Maybe you don't have any specific > authority I definitely don't, and I hope no one reads my words on this topic as having special authority beyond their content :-) > bu

Re: Import name conflicts

2017-04-18 Thread Ben Finney
Tim Johnson writes: > Using python 2.7~ In Python 2, you should turn on the “default import is absolute” by issuing the statement:: from __future__ import absolute_import as one of the first statements in each module. When you migrate your code to PYthon 3, that will be the default behavi

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 8:28 AM, Ben Finney wrote: > Chris Angelico writes: > >> The charge has been examined and dropped. Steven did not violate the >> CoC. Please stop talking as if he has. He *was accused of* violating >> it, and then found innocent. > > Which post are you referring to (can yo

Re: Python and the need for speed

2017-04-18 Thread Erik
On 18/04/17 11:30, bartc wrote: On 18/04/2017 10:32, Erik wrote: the improvements over the original huge switch() to dispatch the bytecodes to the correct handler appear to have made this type of optimization less effective. What did they do to it, and on which version? It's the computed 'g

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Ben Finney
Chris Angelico writes: > The charge has been examined and dropped. Steven did not violate the > CoC. Please stop talking as if he has. He *was accused of* violating > it, and then found innocent. Which post are you referring to (can you provide a URL)? I'd like to see who came to that conclusion

Import name conflicts

2017-04-18 Thread Tim Johnson
Using python 2.7~ For testing and edification purposes: I have a project which has a controllers package at the directory level just below the root. >From the top-level (root) of the project, I start my python interpreter. The packages is called 'controllers' and has a submodule named 'imp' I

Re: Moderation and off-topic discussion [was Re: Bigotry and hate speech...]

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 1:35 AM, Steve D'Aprano wrote: > In the meantime, people can help by posting their own new threads. If you > don't have a question to ask, you could always post an observation. What's > the coolest feature of Python you use? Got some good stories of brilliant > Python code

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Rurpy via Python-list
On 04/18/2017 09:35 AM, Wildman via Python-list wrote: > On Tue, 18 Apr 2017 03:28:32 +, Rurpy wrote: >> On 04/17/2017 08:19 PM, Wildman via Python-list wrote: >>> [...] >>> Your words remind me of this: >>> >>> "The seriousness of the charge mandates that we investigate >>> this. Even though t

Re: Buffers and pointers (Py3.4)

2017-04-18 Thread Rob Gaddi
On 04/17/2017 11:47 AM, Chris Angelico wrote: On Tue, Apr 18, 2017 at 3:58 AM, Rob Gaddi wrote: If I were writing this as a C extension, getting that information from any buffer object would be trivial, but that changes my project from a pure Python wrapper using ctypes to a mixed language proj

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Marko Rauhamaa
Andre Müller : > Humans from USA should think about it, why the whole world hates them. I have yet to meet somebody who hates Americans. > Hm, what could be the cause? Hating an ethnicity has no justifiable cause. Marko -- https://mail.python.org/mailman/listinfo/python-list

OFFTOPIC Secularism [was Re: Bigotry and hate speech on the python mailing list]

2017-04-18 Thread Steve D'Aprano
On Tue, 18 Apr 2017 03:19 pm, Marko Rauhamaa wrote: > Rustom Mody : > >> On Tuesday, April 18, 2017 at 6:18:06 AM UTC+5:30, Ethan Furman wrote: >>> You mean all the non-religious people? >>> >>> Because some of your signatures don't feel welcoming to people of >>> faith: >> >> Thanks Ethan for b

Re: HOT LIST

2017-04-18 Thread Rob Gaddi
On 04/18/2017 06:37 AM, j...@nichesoftsolutions.com wrote: Hi Hope you doing great! Greeting from Niche Soft Solutions. I would like to present our topnotch consultants currently available. Please have a look at the below hot list of Niche Soft Solutions and mail your Direct Client requirements

Re: Pressing dot and show sub command in IPython

2017-04-18 Thread Steve D'Aprano
On Wed, 19 Apr 2017 12:37 am, breamore...@gmail.com wrote: > On Tuesday, April 18, 2017 at 2:17:12 PM UTC+1, David Shi wrote: >> Hi, Matt, >> How to make IPython work more interactively? >> As I remember, pressing dot and sub command shows up suggestively in >> IPython. But, now, after re-installi

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Rurpy via Python-list
On 04/18/2017 09:29 AM, Chris Angelico wrote: > On Wed, Apr 19, 2017 at 1:03 AM, Rurpy via > Python-list wrote: >> On 04/18/2017 08:19 AM, Chris Angelico wrote: >>> On Wed, Apr 19, 2017 at 12:01 AM, Rurpy via >>> Python-list wrote: I have nothing personal against Steven. He called someone o

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Wildman via Python-list
On Wed, 19 Apr 2017 00:19:10 +1000, Chris Angelico wrote: > On Wed, Apr 19, 2017 at 12:01 AM, Rurpy via Python-list > wrote: >> Whether you like it or not this list has a CoC governing it. >> Discussions about appropriate posts ARE on-topic. >> If you want a list where anyone can say any vile rac

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Wildman via Python-list
On Tue, 18 Apr 2017 03:28:32 +, Rurpy wrote: > On 04/17/2017 08:19 PM, Wildman via Python-list wrote: >> On Tue, 18 Apr 2017 08:23:34 +1000, Ben Finney wrote: >>> Paul Rubin writes: Rurpy writes: > A couple weeks ago a frequent poster here (Steve D'Aprano > ) called another part

Moderation and off-topic discussion [was Re: Bigotry and hate speech...]

2017-04-18 Thread Steve D'Aprano
On Tue, 18 Apr 2017 07:30 pm, James McMahon wrote: > Can the moderators please get involved here and remind people to address > python related topics and questions on the python mailing list? This isn't just a mailing list, it is also a newsgroup (Usenet). The newsgroup is unmoderated, and the m

Re: Static typing [was Re: Python and the need for speed]

2017-04-18 Thread Steve D'Aprano
On Tue, 18 Apr 2017 03:43 pm, Gregory Ewing wrote: > Steve D'Aprano wrote: >> I'm not sure why the Cython devs maintain this is not a JIT compiler. >> Perhaps I misunderstand something. > > A JIT compiler works by observing the actual values taken on > by variables at run time, and if it notices

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 1:03 AM, Rurpy via Python-list wrote: > On 04/18/2017 08:19 AM, Chris Angelico wrote: >> On Wed, Apr 19, 2017 at 12:01 AM, Rurpy via >> Python-list wrote: >>> I have nothing personal against Steven. He called someone out >>> for being bigoted, then repeated the exact same

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Andre Müller
Hello list, Why are you fighting against symptoms? Just to say: "Hate Speech is not allowed in this list and is bad", doesn't solve the problem. Humans from USA should think about it, why the whole world hates them. Hm, what could be the cause? You should think about the behavior of your governm

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Rurpy via Python-list
On 04/18/2017 08:19 AM, Chris Angelico wrote: > On Wed, Apr 19, 2017 at 12:01 AM, Rurpy via > Python-list wrote: >> I have nothing personal against Steven. He called someone out >> for being bigoted, then repeated the exact same offense himself. > > The charge has been examined and dropped. Stev

Re: PYhton Mercator projection

2017-04-18 Thread Vincent Vande Vyvre
Le 18/04/17 à 16:04, jorge.conr...@cptec.inpe.br a écrit : Hi, I copy the script merc.py from: https://matplotlib.org/basemap/users/merc.html then I did: python merc.py and I had: Segmentation fault Please can someone help me. Conrado Add some print() to see where the code

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 12:01 AM, Rurpy via Python-list wrote: > Whether you like it or not this list has a CoC governing it. > Discussions about appropriate posts ARE on-topic. > If you want a list where anyone can say any vile racist thing > they want, there are plenty of them on the internet, y

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Chris Angelico
On Wed, Apr 19, 2017 at 12:07 AM, Jussi Piitulainen wrote: > I agree with Steven that it's a highly offensive thing to say that ASCII > is good enough to "most people". Interesting that this gets mentioned in a thread on bigotry. You could quite reasonably argue that supporting only ASCII (or one

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Rurpy via Python-list
On 04/18/2017 07:16 AM, Mario R. Osorio wrote: > Feels like this is something personal against Steven. You should > probably take this to court. I'd rather read Steven's insightful > answers and rants than you crying. None here is meant to sugar coat > anything, and if that is what you are looking

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Jussi Piitulainen
Joel Goldstick writes: > On Tue, Apr 18, 2017 at 5:30 AM, James McMahon wrote: >> Can the moderators please get involved here and remind people to >> address python related topics and questions on the python mailing >> list? While I can only speak to my interest when joining this list, >> isn't py

PYhton Mercator projection

2017-04-18 Thread jorge . conrado
Hi, I copy the script merc.py from: https://matplotlib.org/basemap/users/merc.html then I did: python merc.py and I had: Segmentation fault Please can someone help me. Conrado -- https://mail.python.org/mailman/listinfo/python-list

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Wildman via Python-list
On Tue, 18 Apr 2017 15:54:17 +1000, Ben Finney wrote: > Wildman via Python-list writes: > >> "The seriousness of the charge mandates that we investigate >> this. Even though there is no evidence, the seriousness of >> the charge is what matters." >> --Tom Foley (D) Speaker of the House > > Th

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Joel Goldstick
On Tue, Apr 18, 2017 at 5:30 AM, James McMahon wrote: > Can the moderators please get involved here and remind people to address > python related topics and questions on the python mailing list? While I can > only speak to my interest when joining this list, isn't python why > most people joined t

HOT LIST

2017-04-18 Thread Jack
Hi Hope you doing great! Greeting from Niche Soft Solutions. I would like to present our topnotch consultants currently available. Please have a look at the below hot list of Niche Soft Solutions an

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Mario R. Osorio
On Monday, April 17, 2017 at 10:27:50 PM UTC-4, Rurpy wrote: > On 04/17/2017 04:38 AM, Ben Finney wrote: > > Rurpy via Python-list writes: > > > >> A couple weeks ago a frequent poster here (Steve D'Aprano > >> ) called another participant an "ugly > >> american" [*1]. > > > > He gave no explici

Pressing dot and show sub command in IPython

2017-04-18 Thread David Shi via Python-list
Hi, Matt, How to make IPython work more interactively? As I remember, pressing dot and sub command shows up suggestively in IPython. But, now, after re-installing IPython notebook, it does not do so any more. Looking forward to hearing from you. Regards. David -- https://mail.python.org/mailman/li

Re: Buffers and pointers (Py3.4)

2017-04-18 Thread Neal Becker
When I worked on talking to some hardware in the past, the hardware was directly mapped to memory, and then numpy mmap worked great. Maybe not the same hardware interface you have. Rob Gaddi wrote: > So long as we're all feeling so concerned about speed lately... > > I've got a piece of hardw

Re: Python and the need for speed

2017-04-18 Thread bartc
On 18/04/2017 10:32, Erik wrote: FWIW, I spent some time about a year ago looking at things like this (small improvements to the peephole optimizer which allowed certain very common sequences to be folded into a (new) opcode which in turn allowed other optimizations to avoid branching). The chan

Re: How to do pd.read_csv with consecutive spaces or semi-colon as delimiters?

2017-04-18 Thread breamoreboy
On Tuesday, April 18, 2017 at 10:25:51 AM UTC+1, David Shi wrote: > Any way to do that? > The link to a sample dataset is as follows: > http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text > Looking forward to hearing from you

Re: How to do pd.read_csv with consecutive spaces or semi-colon as delimiters?

2017-04-18 Thread Peter Otten
David Shi via Python-list wrote: > Any way to do that? > The link to a sample dataset is as follows: > http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text > Looking forward to hearing from you. > Regards. > David David, pl

Re: Python and the need for speed

2017-04-18 Thread Erik
On 13/04/17 18:50, MRAB wrote: On 2017-04-13 09:08, Steven D'Aprano wrote: On Wed, 12 Apr 2017 16:30:38 -0700, bart4858 wrote: Is it possible to skip the STORE_NAME op-code? If you knew *for sure* that the target (x) was a mutable object which implemented += using an in- place mutation, then you

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread James McMahon
Can the moderators please get involved here and remind people to address python related topics and questions on the python mailing list? While I can only speak to my interest when joining this list, isn't python why most people joined this list? Others have different and polarizing views on many su

How to do pd.read_csv with consecutive spaces or semi-colon as delimiters?

2017-04-18 Thread David Shi via Python-list
Any way to do that? The link to a sample dataset is as follows: http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text Looking forward to hearing from you. Regards. David -- https://mail.python.org/mailman/listinfo/python-lis

Re: Looping [was Re: Python and the need for speed]

2017-04-18 Thread Jussi Piitulainen
Christian Gollwitzer writes: > Am 18.04.17 um 08:21 schrieb Chris Angelico: >> On Tue, Apr 18, 2017 at 4:06 PM, Christian Gollwitzer >> wrote: >>> Am 18.04.17 um 02:18 schrieb Ben Bacarisse: >>> Thanks (and to Grant). IO seems to be the canonical example. Where some languages would f

Re: Looping [was Re: Python and the need for speed]

2017-04-18 Thread Christian Gollwitzer
Am 18.04.17 um 08:21 schrieb Chris Angelico: On Tue, Apr 18, 2017 at 4:06 PM, Christian Gollwitzer wrote: Am 18.04.17 um 02:18 schrieb Ben Bacarisse: Thanks (and to Grant). IO seems to be the canonical example. Where some languages would force one to write c = sys.stdin.read(1) while c