Re: Unicode failure

2015-12-04 Thread Terry Reedy
On 12/4/2015 11:15 PM, D'Arcy J.M. Cain wrote: On Fri, 4 Dec 2015 22:49:49 + Albert-Jan Roskam wrote: I think you need to use a raw unicode string, ur Nope. The 'r' prefix does not disable unicode escapes. unicodedata.name(ur'\u2122') 'TRADE MARK SIGN' If if did, the string above wo

Re: Unicode failure

2015-12-04 Thread Chris Angelico
On Sat, Dec 5, 2015 at 5:06 PM, Terry Reedy wrote: > On 12/4/2015 10:22 PM, Random832 wrote: >> >> On 2015-12-04, Terry Reedy wrote: >>> >>> Tk widgets, and hence IDLE windows, will print any character from \u >>> to \u without raising, even if the result is blank or �. Higher >>> codepo

Re: Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
On Fri, 4 Dec 2015 18:28:22 -0500 Terry Reedy wrote: > On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote: > > I thought that going to Python 3.4 would solve my Unicode issues > > Within Python itself, that should be mostly true. As soon as you > send text to a display, the rules of the display device

Re: Unicode failure

2015-12-04 Thread Terry Reedy
On 12/4/2015 10:22 PM, Random832 wrote: On 2015-12-04, Terry Reedy wrote: Tk widgets, and hence IDLE windows, will print any character from \u to \u without raising, even if the result is blank or �. Higher codepoints fail, but allowing the entire BMP is better than any Windows codepag

Re: Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
On Fri, 4 Dec 2015 22:49:49 + Albert-Jan Roskam wrote: > I think you need to use a raw unicode string, ur > > >>> unicodedata.name(ur'\u2122') > 'TRADE MARK SIGN' That seems to work in 2.x but not 3.x. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoI

Re: Unicode failure

2015-12-04 Thread Random832
On 2015-12-04, Terry Reedy wrote: > Tk widgets, and hence IDLE windows, will print any character from \u > to \u without raising, even if the result is blank or �. Higher > codepoints fail, but allowing the entire BMP is better than any Windows > codepage. Well, any bar 1200, 1201, 12

Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 23:06, Peter Otten wrote: > duncan smith wrote: > >> Hello, >> I'm trying to find a computationally efficient way of identifying >> unique subarrays, counting them and returning an array containing only >> the unique subarrays and a corresponding 1D array of counts. The >> follow

Re: counting unique numpy subarrays

2015-12-04 Thread duncan smith
On 04/12/15 22:36, Albert-Jan Roskam wrote: > Hi > > (Sorry for topposting) > > numpy.ravel is faster than numpy.flatten (no copy) > numpy.empty is faster than numpy.zeros > numpy.fromiter might be useful to avoid the loop (just a hunch) > > Albert-Jan > Thanks, I'd forgotten the difference be

msvcr100.dll missing ... error started after Windows 10 update to 10586.17

2015-12-04 Thread Glenn Linderman
My wife's 64-bit Win8 home machine has 32-bit Python 3.3 installed. Then it upgraded to Win 8.1. Then I upgraded it to Win 10. Then I upgraded it to Threshold 2. It gets regular automatic updates also, like the one last night to build 10586.17. That's the history. When she tried a python scr

Re: Unicode failure

2015-12-04 Thread Terry Reedy
On 12/4/2015 1:07 PM, D'Arcy J.M. Cain wrote: I thought that going to Python 3.4 would solve my Unicode issues Within Python itself, that should be mostly true. As soon as you send text to a display, the rules of the display device take over. #! /usr/bin/python3 # -*- coding: UTF-8 -*- Re

Re: counting unique numpy subarrays

2015-12-04 Thread Peter Otten
duncan smith wrote: > Hello, > I'm trying to find a computationally efficient way of identifying > unique subarrays, counting them and returning an array containing only > the unique subarrays and a corresponding 1D array of counts. The > following code works, but is a bit slow. > > ###

Re: Unicode failure

2015-12-04 Thread Peter Otten
D'Arcy J.M. Cain wrote: > I thought that going to Python 3.4 would solve my Unicode issues but it > seems I still don't understand this stuff. Here is my script. > > #! /usr/bin/python3 > # -*- coding: UTF-8 -*- > import sys > print(sys.getdefaultencoding()) > print(u"\N{TRADE MARK SIGN}") > >

Re: Unicode failure

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 22:34, "D'Arcy J.M. Cain" wrote: > > I thought that going to Python 3.4 would solve my Unicode issues but it > seems I still don't understand this stuff. Here is my script. > > #! /usr/bin/python3 > # -*- coding: UTF-8 -*- > import sys > print(sys.getdefaultencoding()) > print(u"\N{

RE: Unicode failure

2015-12-04 Thread Albert-Jan Roskam
I think you need to use a raw unicode string, ur >>> unicodedata.name(ur'\u2122') 'TRADE MARK SIGN' > Date: Fri, 4 Dec 2015 13:07:38 -0500 > From: da...@vybenetworks.com > To: python-list@python.org > Subject: Unicode failure > > I thought that going to Python 3.4 would solve my Unicode issues b

Re: Problem in pip

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 12:02 PM, Ali Zarkesh wrote: > My pip can't download or upgrade anything > I use python 3.5 (win 32) and my pip version is 7.1.2. > The error message is this: > > Exception: > Traceback (most recent call last): > ... > PermissionError: [Errno 13] Permission denied: 'c:\progr

RE: counting unique numpy subarrays

2015-12-04 Thread Albert-Jan Roskam
Hi (Sorry for topposting) numpy.ravel is faster than numpy.flatten (no copy) numpy.empty is faster than numpy.zeros numpy.fromiter might be useful to avoid the loop (just a hunch) Albert-Jan > From: duncan@invalid.invalid > Subject: counting unique numpy subarrays > Date: Fri, 4 Dec 2015 19:43:

problem fixed

2015-12-04 Thread Ali Zarkesh
My problem fixed That was only about User Account Control -- https://mail.python.org/mailman/listinfo/python-list

Problem in pip

2015-12-04 Thread Ali Zarkesh
My pip can't download or upgrade anything I use python 3.5 (win 32) and my pip version is 7.1.2. The error message is this: Exception: Traceback (most recent call last): File "c:\program files\python 3.5\lib\site-packages\pip\basecommand.py", line 211, in main status = self.run(options, args) File

Unicode failure

2015-12-04 Thread D'Arcy J.M. Cain
I thought that going to Python 3.4 would solve my Unicode issues but it seems I still don't understand this stuff. Here is my script. #! /usr/bin/python3 # -*- coding: UTF-8 -*- import sys print(sys.getdefaultencoding()) print(u"\N{TRADE MARK SIGN}") And here is my output. utf-8 Traceback (m

Re: [Python-ideas] Using functools.lru_cache only on some arguments of a function

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 2:44 PM, Bill Winslow wrote: > This is a question I posed to reddit, with no real resolution: > https://www.reddit.com/r/learnpython/comments/3v75g4/using_functoolslru_cache_only_on_some_arguments/ > > The summary for people here is the following: > > Here's a pattern I'm us

counting unique numpy subarrays

2015-12-04 Thread duncan smith
Hello, I'm trying to find a computationally efficient way of identifying unique subarrays, counting them and returning an array containing only the unique subarrays and a corresponding 1D array of counts. The following code works, but is a bit slow. ### from collections import C

Re: Exclude text within quotation marks and words beginning with a capital letter

2015-12-04 Thread Jason Friedman
> > I am working on a program that is written in Python 2.7 to be compatible > with the POS tagger that I import from Pattern. The tagger identifies all > the nouns in a text. I need to exclude from the tagger any text that is > within quotation marks, and also any word that begins with an upper ca

Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Zachary Ware
On Fri, Dec 4, 2015 at 10:37 AM, Ian Kelly wrote: > On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk > wrote: >> Python 3.5 will not run under Windows XP, but what about applications >> created using py2exe or cx_freeze under Windows 7, 8 or 10, is there any >> knowledge of whether they

Re: Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 10:21 AM, d...@forestfield.co.uk wrote: > Python 3.5 will not run under Windows XP, but what about applications created > using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of > whether they will run under XP? I wouldn't expect them to. Those bundl

Frozen apps (py2exe, cx_freeze) built with Python 3.5

2015-12-04 Thread d...@forestfield.co.uk
Python 3.5 will not run under Windows XP, but what about applications created using py2exe or cx_freeze under Windows 7, 8 or 10, is there any knowledge of whether they will run under XP? Regards, David Hughes Forestfield Software -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Missing Core Feature: + - * / | & do not call __getattr__

2015-12-04 Thread Ian Kelly
On Fri, Dec 4, 2015 at 7:20 AM, Stephan Sahm wrote: > Dear all, > > I just stumbled upon a very weird behaviour of python 2 and python 3. At > least I was not able to find a solution. > > The point is to dynamically define __add__, __or__ and so on via __getattr__ > (for example by deriving them f

Re: problem

2015-12-04 Thread Laura Creighton
In a message of Thu, 03 Dec 2015 21:25:53 +0200, Dylan Goodwin writes: >Every time I try and run python 3.5 it keeps coming up with modify, repair >or uninstall >-- >https://mail.python.org/mailman/listinfo/python-list What OS are you running? If windows XP, your problem is that your OS is too o

Re: python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Laura Creighton
In a message of Fri, 04 Dec 2015 11:26:59 +, Nicky Mac writes: >Dear python team >since windows applied some updates last night to my windows 10 and windows >7 systems, >I can't open anything with IDLE as I usually do. >On windows 10 (64bit with 64bit python), I performed the installation >repa

Re: urllib2.urlopen() crashes on Windows 2008 Server

2015-12-04 Thread Ulli Horlacher
Dennis Lee Bieber wrote: > >I have a Python2 program which runs fine on Windows 7, but > >crashes on Windows 2008 Server R2 64 bit: > > > >downloading http://fex.belwue.de/download/7za.exe > >Traceback (most recent call last): > > File "", line 1992, in > > File "", line 180, in main > > File

python 3.5.0rc1 problem opening IDLE in windows

2015-12-04 Thread Nicky Mac
Dear python team since windows applied some updates last night to my windows 10 and windows 7 systems, I can't open anything with IDLE as I usually do. On windows 10 (64bit with 64bit python), I performed the installation repair procedure. * Edit with IDLE does not appear as an installed windows pr

problem

2015-12-04 Thread Dylan Goodwin
Every time I try and run python 3.5 it keeps coming up with modify, repair or uninstall -- https://mail.python.org/mailman/listinfo/python-list

Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Oscar Benjamin
On 4 Dec 2015 08:36, "Serhiy Storchaka" wrote: > > On 04.12.15 00:26, Oscar Benjamin wrote: >> >> On 3 Dec 2015 16:50, "Terry Reedy" wrote: >>> >>> fileinput is an ancient module that predates iterators (and generators) >> >> and context managers. Since by 2.7 open files are both context managers

Re: Is vars() the most useless Python built-in ever?

2015-12-04 Thread Serhiy Storchaka
On 02.12.15 11:28, Chris Angelico wrote: On Wed, Dec 2, 2015 at 7:22 PM, Serhiy Storchaka wrote: On 01.12.15 03:00, Steven D'Aprano wrote: I'm trying to understand why vars() exists. Does anyone use it? I use vars() exclusively for introspection in interactive environment. As well as dir() an

Re: getting fileinput to do errors='ignore' or 'replace'?

2015-12-04 Thread Serhiy Storchaka
On 04.12.15 00:26, Oscar Benjamin wrote: On 3 Dec 2015 16:50, "Terry Reedy" wrote: fileinput is an ancient module that predates iterators (and generators) and context managers. Since by 2.7 open files are both context managers and line iterators, you can easily write your own multi-file line i

Re: How to bounce the ball forever around the screen

2015-12-04 Thread Peter Otten
phamton...@gmail.com wrote: > from Tkinter import * > window = Tk() > canvas = Canvas(window, width=500, height=500, background="green") > canvas.pack() > > def move_ball(speed_x, speed_y): > box = canvas.bbox("ball") > x1 = box[0] > y1 = box[1] > x2 = box[2] >