Re: Twitter Client on Terminal by Python

2014-07-14 Thread Omar Abou Mrad
Dear Orakaro, Cool app you have there. Please consider the following comments as feedback in the most positive sense possible: - I didn't care for the figlet, it's noise beyond anything else, if you drop it, you would drop the pyfiglet dependency as well - What's with the SQLAlchemy dependency? I

Re: Python 3 is killing Python

2014-07-14 Thread Steven D'Aprano
On Mon, 14 Jul 2014 21:18:05 -0700, Rick Johnson wrote: > London bombed into the stone age Sigh. How can one even begin to answer a statement of such ignorance? For what little it is worth, if any one country won World War Two, it was the USSR. I don't recall the exact numbers off the top of

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Steven D'Aprano
On Mon, 14 Jul 2014 15:24:26 -0700, Catherine M Moroney wrote: > The problem: I'm writing a large Python program and I have a bunch of > parameters (whose values are static) that I want to make available to > the rest of the code with minimum overhead and duplicate processing. > > I think that t

Re: NaN comparisons - Call For Anecdotes

2014-07-14 Thread Steven D'Aprano
On Mon, 14 Jul 2014 18:44:15 +0200, Anders J. Munch wrote: > alister wrote: >> I don't have time to start this discussion over again on another >> mailing list. >> Don't anyone on those lists read python-list also? >> >> they possibly do, but prefer to keep discussions to the proper forum > > The

Re: Python 3 is killing Python

2014-07-14 Thread Martin S
Yes, we all know that Abu Ghraib, Guantanamo, school shootings and the lack of proper health care for all are the pinnacle of US culture. Or figments of the imagination of Baghdad Bob. Now, maybe return to Python? /martin On 15 Jul 2014, Rick Johnson wrote: >On Monday, July 14, 2014 9:11:4

Re: Python 3 is killing Python

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 2:18 PM, Rick Johnson wrote: > On Monday, July 14, 2014 9:11:47 PM UTC-5, Chris Angelico wrote: >> I dunno. It's not like Great Britain, Australia, or New >> Zealand did anything significant in either war, is it. > > Most of Europe occupied, London bombed into the stone age

Re: Python 3 is killing Python

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 1:47 PM, Michael Torrie wrote: > Python 3 uses UTF-4 encoding under the hood, with a > compression optimization that removes leading zeros from binary > representation of each character. Sorry to nitpick, but in the interests of terminological accuracy I have to point out

Re: Python 3 is killing Python

2014-07-14 Thread Rick Johnson
On Monday, July 14, 2014 9:11:47 PM UTC-5, Chris Angelico wrote: > I dunno. It's not like Great Britain, Australia, or New > Zealand did anything significant in either war, is it. Most of Europe occupied, London bombed into the stone age; things were looking grim Chris! Maybe you should read up on

Re: Python 3 is killing Python

2014-07-14 Thread Michael Torrie
On 05/31/2014 09:48 AM, jmf wrote: > Absolutely FALSE. Python 3.3 and up can handle any and all unicode characters you want to throw at it, without surprises such as what you get in javascript. Python 3 uses UTF-4 encoding under the hood, with a compression optimization that removes leading zer

Re: Python 3 is killing Python

2014-07-14 Thread Michael Torrie
On 06/03/2014 12:12 AM, wxjmfa...@gmail.com wrote: > I was myself really suprised to fall on such a case and > after thinking no, such cases may logically happen. Putting in this comment not for JMF but for poor souls who find this thread on a search and are led astray by jmf's trolling. Either i

Re:initializing "parameters" class in Python only once?

2014-07-14 Thread Dave Angel
Catherine M Moroney Wrote in message: > Hello, > > Pardon me for not using the proper Python language terms, but I hope > that people can still understand the question: > > The problem: I'm writing a large Python program and I have a bunch of > parameters (whose values are static) that I want

Re: [Python-Dev] Python Job Board

2014-07-14 Thread Ethan Furman
On 07/14/2014 06:01 PM, Wes Turner wrote: From http://www.reddit.com/r/Python/comments/17c69p/i_was_told_by_a_friend_that_learning_python_for/c84bswd : * http://www.python.org/community/jobs/ * https://jobs.github.com/positions?description=python * http://careers.joelonsoftware.com/jobs?searc

Re: [Python Brasil 10] Registrations are now open!

2014-07-14 Thread Renato Oliveira
have* Renato Oliveira @_renatooliveira Labcodes - www.labcodes.com.br On Mon, Jul 14, 2014 at 11:53 PM, Renato Oliveira < renatooliveira@gmail.com> wrote: > Hi all, > > The call for papers are now open! > > http://2014.pythonbrasil.org.br/dashboard/prop

Re: [Python Brasil 10] Registrations are now open!

2014-07-14 Thread Renato Oliveira
Hi all, The call for papers are now open! http://2014.pythonbrasil.org.br/dashboard/proposals/ We're going to hava an English Track, so feel free to submit your proposals! See you at Python Brasil 10! Renato Oliveira @_renatooliveira Labcodes - www.labcodes

Re: Python 3 is killing Python

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 11:54 AM, Rick Johnson wrote: > But, if the USA *DID NOT* exist during the perilous times of > the world wars, how many generations of people would have > suffered before a powerful enough contender came along to > unclench the grips of evil? > > I "SHUDDER" TO THINK! >

Re: Python 3 is killing Python

2014-07-14 Thread Rick Johnson
On Monday, July 14, 2014 6:28:19 PM UTC-5, Chris Angelico wrote: > And I know what would happen if the USA weren't here. > People in other countries would have made similar > improvements to the world. Yes, i wholeheartedly agree with that statement. Is the USA the *ONLY* country to have ever lib

Re: Python 3 is killing Python

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 11:00 AM, Rick Johnson wrote: > On Monday, July 14, 2014 5:47:14 PM UTC-5, MRAB wrote: >> Why it should "they" withdraw it (whatever that means)? >> "They" are entitled to keep it public if they want to. > > I'm not suggesting they *must* withdraw Python, I'm only > suggest

Re: Iterating through set

2014-07-14 Thread Chris Kaynor
On Mon, Jul 14, 2014 at 5:10 PM, LJ wrote: > Hi All. > > I'm coding a Dynamic Programming algorithm to solve a network flow > problem. At some point in the algorithm I have to iterate through a set of > nodes, while adding and/or removing elements, until the set is empty. I > know a regular set()

Re: Python 3 is killing Python

2014-07-14 Thread Rick Johnson
On Monday, July 14, 2014 5:47:14 PM UTC-5, MRAB wrote: > Why it should "they" withdraw it (whatever that means)? > "They" are entitled to keep it public if they want to. I'm not suggesting they *must* withdraw Python, I'm only suggesting that IF they wish to *prevent* dissent or scrutiny, then the

Re: Iterating through set

2014-07-14 Thread Roy Smith
In article , LJ wrote: > Hi All. > > I'm coding a Dynamic Programming algorithm to solve a network flow problem. > At some point in the algorithm I have to iterate through a set of nodes, > while adding and/or removing elements, until the set is empty. I know a > regular set() object does no

Iterating through set

2014-07-14 Thread LJ
Hi All. I'm coding a Dynamic Programming algorithm to solve a network flow problem. At some point in the algorithm I have to iterate through a set of nodes, while adding and/or removing elements, until the set is empty. I know a regular set() object does not work in a case like this, so I wonde

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Mark Lawrence
On 14/07/2014 23:32, Catherine M Moroney wrote: Hello, Pardon me for not using the proper Python language terms, but I hope that people can still understand the question: The problem: I'm writing a large Python program and I have a bunch of parameters (whose values are static) that I want to m

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Ben Finney
Catherine M Moroney writes: > The problem: I'm writing a large Python program and I have a bunch of > parameters (whose values are static) that I want to make available to > the rest of the code with minimum overhead and duplicate processing. Better than putting these in executable code, then,

Re: Python 3 is killing Python

2014-07-14 Thread Mark Lawrence
On 15/07/2014 00:28, Chris Angelico wrote: On Tue, Jul 15, 2014 at 8:12 AM, Rick Johnson wrote: Image, for a moment, a world WITHOUT the great USA! "Imagine". If you were worth the effort, I could easily "image" a world without the USA, by Photoshopping something out of a world map. (I'd pro

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 8:32 AM, Catherine M Moroney wrote: > The actual scope of the problem is very small, so memory/cpu time is not > an issue. I'm just looking for the most pythonic/elegant way of doing this. Small job? Use the simplest possible technique. Just create "params.py" with a bunc

Re: Python 3 is killing Python

2014-07-14 Thread Chris Angelico
On Tue, Jul 15, 2014 at 8:12 AM, Rick Johnson wrote: > If the "powers that be" cannot handle the heat, then they > should withdraw Python from the public and then they can > decree any ridiculous fascist rules they please, until then, > what's that old adage about "reaping" and "sewing"...? You'v

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Chris Kaynor
On Mon, Jul 14, 2014 at 3:24 PM, Catherine M Moroney < catherine.m.moro...@jpl.nasa.gov> wrote: > Hello, > > Pardon me for not using the proper Python language terms, but I hope that > people can still understand the question: > > The problem: I'm writing a large Python program and I have a bunch

Re: initializing "parameters" class in Python only once?

2014-07-14 Thread Rob Gaddi
On Mon, 14 Jul 2014 15:24:26 -0700 Catherine M Moroney wrote: > Hello, > > Pardon me for not using the proper Python language terms, but I hope > that people can still understand the question: > > The problem: I'm writing a large Python program and I have a bunch of > parameters (whose values

initializing "parameters" class in Python only once?

2014-07-14 Thread Catherine M Moroney
Hello, Pardon me for not using the proper Python language terms, but I hope that people can still understand the question: The problem: I'm writing a large Python program and I have a bunch of parameters (whose values are static) that I want to make available to the rest of the code with mini

initializing "parameters" class in Python only once?

2014-07-14 Thread Catherine M Moroney
Hello, Pardon me for not using the proper Python language terms, but I hope that people can still understand the question: The problem: I'm writing a large Python program and I have a bunch of parameters (whose values are static) that I want to make available to the rest of the code with mini

Re: Python 3 is killing Python

2014-07-14 Thread MRAB
On 2014-07-14 23:12, Rick Johnson wrote: On Wednesday, May 28, 2014 3:15:45 PM UTC-5, Chris Angelico wrote: On Thu, May 29, 2014 at 5:58 AM, Larry Martell wrote: No company that I work for is using python 3 - they just have too much of an investment in a python 2 code base to switch. I'm just s

Re: Python 3 is killing Python

2014-07-14 Thread mm0fmf
On 14/07/2014 23:12, Rick Johnson wrote: I SHUTTER TO THINK! It's "I shudder to think"! shut·ter [shuht-er] noun 1. a solid or louvered movable cover for a window. 2. a movable cover, slide, etc., for an opening. 3. a person or thing that shuts. 4. Photography . a mechanical device for ope

Re: Python 3 is killing Python

2014-07-14 Thread Rick Johnson
On Wednesday, May 28, 2014 7:41:53 PM UTC-5, Terry Reedy wrote: > Claim: "Python 3 languishes in disuse." > Fact: in 2013, there were around 14 million downloads of > windows installers for each of 2.7.x and 3.3.x. 3.3 is > over twice as popular as 3.2 (to be expected). Terry, you cannot simply ta

Re: Python 3 is killing Python

2014-07-14 Thread Rick Johnson
On Wednesday, May 28, 2014 3:15:45 PM UTC-5, Chris Angelico wrote: > On Thu, May 29, 2014 at 5:58 AM, Larry Martell wrote: > > No company that I work for is using python 3 - they just > > have too much of an investment in a python 2 code base > > to switch. I'm just saying. > And that's not a probl

Re: python-aware wdiff?

2014-07-14 Thread Ian Kelly
On Mon, Jul 14, 2014 at 2:01 PM, Terry Reedy wrote: > The under-known difflib.differ shows within line differences. > Your example would look like: > > -if not metar.is_in_temp_range_f(...): > ? ^ > +if not info.is_in_temp_range_f > ? > > Deletions and insertio

Re: Twitter Client on Terminal by Python

2014-07-14 Thread Terry Reedy
On 7/13/2014 11:51 PM, Chris Angelico wrote: On Mon, Jul 14, 2014 at 12:18 PM, Orakaro wrote: I use README.md for Github and README.rst for PyPi. Is there a way to use only one file for both sites ? Ah. I don't know; check the docs for one or the other and see what they'll do. I tested my

Re: python-aware wdiff?

2014-07-14 Thread Terry Reedy
On 7/14/2014 11:12 AM, Roy Smith wrote: Does anybody know of a wdiff-like tool (http://www.gnu.org/software/wdiff/) which is aware of python syntax and can show token changes instead of word changes. Wdiff is can turn -if not metar.is _in_temp_range_f(situation.weather.low_

Re: NaN comparisons - Call For Anecdotes

2014-07-14 Thread Ian Kelly
On Mon, Jul 14, 2014 at 10:44 AM, Anders J. Munch <2...@jmunch.dk> wrote: > alister wrote: >> >> I don't have time to start this discussion over again on another mailing >> list. >> Don't anyone on those lists read python-list also? >> >> they possibly do, but prefer to keep discussions to the prop

Re: NaN comparisons - Call For Anecdotes

2014-07-14 Thread Mark Lawrence
On 14/07/2014 17:44, Anders J. Munch wrote: alister wrote: I don't have time to start this discussion over again on another mailing list. Don't anyone on those lists read python-list also? they possibly do, but prefer to keep discussions to the proper forum The semantics of the Python program

Re: Not enough memory.

2014-07-14 Thread Mark Lawrence
On 14/07/2014 17:40, Zachary Ware wrote: On Mon, Jul 14, 2014 at 8:16 AM, 水静流深 <1248283...@qq.com> wrote: import os help(os.path) Not enough memory.‍ Why i get it?Not enough memory , not help info?,not In future, it's very helpful to tell us what OS is running which version of Python when yo

Re: NaN comparisons - Call For Anecdotes

2014-07-14 Thread Anders J. Munch
alister wrote: I don't have time to start this discussion over again on another mailing list. Don't anyone on those lists read python-list also? they possibly do, but prefer to keep discussions to the proper forum The semantics of the Python programming language is on-topic for python-list. T

Re: Not enough memory.

2014-07-14 Thread Zachary Ware
On Mon, Jul 14, 2014 at 8:16 AM, 水静流深 <1248283...@qq.com> wrote: import os help(os.path) > Not enough memory.‍ > > Why i get it?Not enough memory , not help info?,not In future, it's very helpful to tell us what OS is running which version of Python when you get an error, but in this cas

Re: Not enough memory.

2014-07-14 Thread Mark Lawrence
On 14/07/2014 14:16, 水静流深 wrote: >>> import os >>> help(os.path) Not enough memory.‍ Why i get it?Not enough memory , not help info?,not A known problem see http://bugs.python.org/issue19914 -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our la

Not enough memory.

2014-07-14 Thread 水静流深
>>> import os >>> help(os.path) Not enough memory.‍ Why i get it?Not enough memory , not help info?,not-- https://mail.python.org/mailman/listinfo/python-list

Re: Do I need to call close on the handle returned by urlopen?

2014-07-14 Thread Mark Lawrence
On 14/07/2014 15:59, krzysztof.zelechow...@syncron.com wrote: The tutorial says that I should use "with open" to close the file handle properly. The reference documentation for urlopen mentions that the handle returned is like a file handle but the code samples below do not bother to close the h

python-aware wdiff?

2014-07-14 Thread Roy Smith
Does anybody know of a wdiff-like tool (http://www.gnu.org/software/wdiff/) which is aware of python syntax and can show token changes instead of word changes. Wdiff is can turn -if not metar.is_in_temp_range_f(situation.weather.low_temperature, situation.weather.high_temperature): +if

Re: Do I need to call close on the handle returned by urlopen?

2014-07-14 Thread krzysztof.zelechowski
http://bugs.python.org/issue12955 Użytkownik napisał w wiadomości grup dyskusyjnych:lq0sar$r6e$1...@mx1.internetia.pl... The tutorial says that I should use "with open" to close the file handle properly. The reference documentation for urlopen mentions that the handle returned is like a file

Re: Do I need to call close on the handle returned by urlopen?

2014-07-14 Thread Skip Montanaro
> The tutorial says that I should use "with open" to close the file > handle properly. The reference documentation for urlopen mentions > that the handle returned is like a file handle but the code samples > below do not bother to close the handle at all. Isn’t it > inconsistent? I think two thi

Do I need to call close on the handle returned by urlopen?

2014-07-14 Thread krzysztof.zelechowski
The tutorial says that I should use "with open" to close the file handle properly. The reference documentation for urlopen mentions that the handle returned is like a file handle but the code samples below do not bother to close the handle at all. Isn’t it inconsistent? -- https://mail.python

Re: Multiprocessing question

2014-07-14 Thread Roy Smith
In article <53c34400$0$9505$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > On Sun, 13 Jul 2014 19:53:09 -0400, Paul LaFollette wrote: > > > I have thrown together a little C/UNIX program that forks a child > > process, then proceeds to let the child and parent alternate. Either

Re: Logging all uncaught exceptions

2014-07-14 Thread Steven D'Aprano
On Mon, 14 Jul 2014 19:21:44 +1000, Chris Angelico wrote: > On Mon, Jul 14, 2014 at 7:07 PM, Steven D'Aprano > wrote: >> but the exception info which should have been generated by >> mylogger.exception doesn't appear anywhere I can see. >> >> >> What am I doing wrong? > > I'm not specifically fa

Re: Logging all uncaught exceptions

2014-07-14 Thread Chris Angelico
On Mon, Jul 14, 2014 at 7:07 PM, Steven D'Aprano wrote: > but the exception info which should have been generated by > mylogger.exception doesn't appear anywhere I can see. > > > What am I doing wrong? I'm not specifically familiar with the logging module, but something I'd look at would be 'ls /

Re: Logging all uncaught exceptions

2014-07-14 Thread Steven D'Aprano
On Mon, 14 Jul 2014 06:09:32 +, Steven D'Aprano wrote: > I want to catch all uncaught exceptions in my application, log them, > then handle as normal. Which, in practice, means a traceback. Is this > the right way to do it? I think I've answered my own question, which leads to the next questi