progress bar

2015-02-24 Thread Swapnil Pande
i want to call another tkinter window after completing the progress bar an n e one help me -- https://mail.python.org/mailman/listinfo/python-list

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Ian Kelly
On Tue, Feb 24, 2015 at 10:54 PM, Chris Angelico wrote: > On Wed, Feb 25, 2015 at 4:46 PM, Marko Rauhamaa wrote: >> Marcos Almeida Azevedo : >> >>> Synchronized methods in Java really makes programming life simpler. >>> But I think it is standard practice to avoid this if there is a >>> lighter a

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Marcos Almeida Azevedo
On Wed, Feb 25, 2015 at 1:46 PM, Marko Rauhamaa wrote: > Marcos Almeida Azevedo : > > > Synchronized methods in Java really makes programming life simpler. > > But I think it is standard practice to avoid this if there is a > > lighter alternative as synchronized methods are slow. Worse case I >

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Chris Angelico
On Wed, Feb 25, 2015 at 4:46 PM, Marko Rauhamaa wrote: > Marcos Almeida Azevedo : > >> Synchronized methods in Java really makes programming life simpler. >> But I think it is standard practice to avoid this if there is a >> lighter alternative as synchronized methods are slow. Worse case I >> use

Pyston 0.3 self-hosting

2015-02-24 Thread Steven D'Aprano
Pyston 0.3, the latest version of a new high-performance Python implementation, has reached self-hosting sufficiency: http://blog.pyston.org/2015/02/24/pyston-0-3-self-hosting-sufficiency/ -- Steve -- https://mail.python.org/mailman/listinfo/python-list

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Marko Rauhamaa
Marcos Almeida Azevedo : > Synchronized methods in Java really makes programming life simpler. > But I think it is standard practice to avoid this if there is a > lighter alternative as synchronized methods are slow. Worse case I > used double checked locking. I have yet to see code whose perform

Re: Newbie question about text encoding

2015-02-24 Thread Marcos Almeida Azevedo
On Wed, Feb 25, 2015 at 9:19 AM, Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info> wrote: > Laura Creighton wrote: > > > Dave Angel > > are you another Native English speaker living in a world where ASCII > > is enough? > > ASCII was never enough. Not even for Americans, who couldn't write t

Re: Bug in timsort!?

2015-02-24 Thread Terry Reedy
On 2/24/2015 4:34 PM, Roy Smith wrote: http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ Tim Peters is aware of this and opened http://bugs.python.org/issue23515 -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in timsort!?

2015-02-24 Thread Dave Angel
On 02/24/2015 07:07 PM, Chris Angelico wrote: On Wed, Feb 25, 2015 at 10:50 AM, Skip Montanaro wrote: Even if/when we get to the point where machines can hold an array of 2**49 elements, I suspect people won't be using straight Python to wrangle them. Looking just at CPython, what is the abso

py.test can't resolve imports

2015-02-24 Thread Mario Figueiredo
I cannot seem to solve this problem from either the pytest documentation or from other places on the web which provide tutorials on pytest, such as http://pythontesting.net/start-here/ I have the following project setup: /project /project/project<-- script files (with __init__.py)

Running Idle on Windows 8 (.1)

2015-02-24 Thread Terry Reedy
On 2/24/2015 3:13 PM, blakemal...@gmail.com wrote: I too can not get idle to run on win 8.1 using python3.4.2 installed from the python-3.4.2.amd64.msi. What experience have others had with Idle and Windows 8? The OP for https://stackoverflow.com/questions/28633690/python-installation-troubl

Re: Newbie question about text encoding

2015-02-24 Thread Steven D'Aprano
Laura Creighton wrote: > The idea that the whole world loves utf-8 is nonsense. I don't think anyone says the whole world loves UTF-8. I think people say that the whole world *ought to* love UTF-8, and that legacy encodings from the Windows "code-page" days ought to die. > Most of europe has be

Re: Newbie question about text encoding

2015-02-24 Thread Steven D'Aprano
Laura Creighton wrote: > Dave Angel > are you another Native English speaker living in a world where ASCII > is enough? ASCII was never enough. Not even for Americans, who couldn't write things like "I bought a comic book for 10ยข yesterday", let alone interesting things from maths and science. I

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Ryan Stuart
On Tue Feb 24 2015 at 3:32:47 PM Paul Rubin wrote: > Ryan Stuart writes: > Sure, the shared memory introduces the possibility of some bad errors, > I'm just saying that I've found that by staying with a certain > straightforward style, it doesn't seem difficult in practice to avoid > those error

Re: Bug in timsort!?

2015-02-24 Thread Mark Lawrence
On 24/02/2015 22:36, sohcahto...@gmail.com wrote: On Tuesday, February 24, 2015 at 1:50:15 PM UTC-8, Mark Lawrence wrote: On 24/02/2015 21:34, Roy Smith wrote: http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ As you can clearly no long

Re: Bug in timsort!?

2015-02-24 Thread Chris Kaynor
On Tue, Feb 24, 2015 at 4:07 PM, Chris Angelico wrote: > On Wed, Feb 25, 2015 at 10:50 AM, Skip Montanaro > wrote: > > Even if/when we get to the point where machines can hold an array of > > 2**49 elements, I suspect people won't be using straight Python to > > wrangle them. > > Looking just at

Re: Bug in timsort!?

2015-02-24 Thread MRAB
On 2015-02-24 21:40, Zachary Ware wrote: On Tue, Feb 24, 2015 at 3:34 PM, Roy Smith wrote: http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ http://bugs.python.org/issue23515 Note that the article does mention that Python is not vulnera

Re: Bug in timsort!?

2015-02-24 Thread Chris Angelico
On Wed, Feb 25, 2015 at 8:34 AM, Roy Smith wrote: > http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ The post links to: http://svn.python.org/projects/python/trunk/Objects/listobject.c Is that still valid and current? It says svn, but doe

Re: strip bug?

2015-02-24 Thread Chris Kaynor
On Tue, Feb 24, 2015 at 3:05 PM, wrote: > >>> 'http://xthunder'.strip('http://') > 'xthunder' > >>> 'http://thunder'.strip('http://') > 'under' > >>> > > I could understand backslash but forward slash? I believe the issue is that str.strip does not do quite what you are thinking it does, howeve

Re: strip bug?

2015-02-24 Thread Irmen de Jong
On 25-2-2015 0:05, bayk...@gmail.com wrote: 'http://xthunder'.strip('http://') > 'xthunder' 'http://thunder'.strip('http://') > 'under' > > I could understand backslash but forward slash? > >>> help("".strip) Help on built-in function strip: strip(...) method of builtins.str i

Re: strip bug?

2015-02-24 Thread Eduardo
Well, from the docstring of strip: -- S.strip([chars]) -> string or unicode Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping

Re: strip bug?

2015-02-24 Thread Ian Kelly
On Tue, Feb 24, 2015 at 4:05 PM, wrote: 'http://xthunder'.strip('http://') > 'xthunder' 'http://thunder'.strip('http://') > 'under' This removes all leading and trailing occurrences of the characters in the string 'http://', not the exact substring 'http://'. For that, use either

strip bug?

2015-02-24 Thread baykiwi
>>> 'http://xthunder'.strip('http://') 'xthunder' >>> 'http://thunder'.strip('http://') 'under' >>> I could understand backslash but forward slash? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Silent Install

2015-02-24 Thread Albert-Jan Roskam
Personally I find that Python is incomplete without pip and setuptools.-- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in timsort!?

2015-02-24 Thread Ian Kelly
On Tue, Feb 24, 2015 at 3:45 PM, Grant Edwards wrote: > On 2015-02-24, Roy Smith wrote: > >> http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ > > I don't get it. > > 3.2 Corrected Python merge_collapse function > > merge_collapse(Me

Re: Bug in timsort!?

2015-02-24 Thread Grant Edwards
On 2015-02-24, Roy Smith wrote: > http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ I don't get it. 3.2 Corrected Python merge_collapse function merge_collapse(MergeState *ms) { struct s_slice *p = ms->pending;

Re: Bug in timsort!?

2015-02-24 Thread sohcahtoa82
On Tuesday, February 24, 2015 at 1:50:15 PM UTC-8, Mark Lawrence wrote: > On 24/02/2015 21:34, Roy Smith wrote: > > http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ > > > > As you can clearly no longer rely on Python it looks like, after a l

Re: Bug in timsort!?

2015-02-24 Thread Zachary Ware
On Tue, Feb 24, 2015 at 3:34 PM, Roy Smith wrote: > http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ http://bugs.python.org/issue23515 Note that the article does mention that Python is not vulnerable due to this bug (and best I can tell ha

Bug in timsort!?

2015-02-24 Thread Roy Smith
http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Design thought for callbacks

2015-02-24 Thread Gregory Ewing
random...@fastmail.us wrote: On Tue, Feb 24, 2015, at 00:20, Gregory Ewing wrote: This is why I suggested registering a listener object plus a method name instead of a callback. It avoids that reference cycle, because there is no long-lived callback object keeping a reference to the listener.

Re: Newbie question about text encoding

2015-02-24 Thread Dave Angel
On 02/24/2015 02:57 PM, Laura Creighton wrote: Dave Angel are you another Native English speaker living in a world where ASCII is enough? I'm a native English speaker, and 7 bits is not nearly enough. Even if I didn't currently care, I have some history: No. CDC display code is enough. Who

Re: Newbie question about text encoding

2015-02-24 Thread Laura Creighton
Dave Angel are you another Native English speaker living in a world where ASCII is enough? Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: How to apply python patch for issue9729

2015-02-24 Thread Grant Edwards
On 2015-02-24, Chris Angelico wrote: > On Tue, Feb 24, 2015 at 8:09 AM, Sada Shirol wrote: >> Upon some research found that I need to apply below patch: >> >> http://bugs.python.org/issue9729 >> >> How do I apply a patch to python 2.6.6 on Linux? > > Hmm. You have a bit of a problem there: The pa

Re: Newbie question about text encoding

2015-02-24 Thread Dave Angel
On 02/24/2015 11:20 AM, Laura Creighton wrote: In a message of Wed, 25 Feb 2015 02:33:30 +1100, Chris Angelico writes: Also a reasonable baseline assumption; but the trouble is that if you automatically assume that text is encoded in your favourite eight-bit system, you're taking a huge risk.

Re: Newbie question about text encoding

2015-02-24 Thread Chris Angelico
On Wed, Feb 25, 2015 at 3:20 AM, Laura Creighton wrote: > People who are asking for help in getting things to work in their > native language need a 'do this quick' sort of answer. The deeper > problems of supporting all languages and language encodings can very > much wait. I'm not so sure abou

Re: Newbie question about text encoding

2015-02-24 Thread random832
On Tue, Feb 24, 2015, at 10:10, Chris Angelico wrote: > Ah, okay. :) But even with that level of confidence, you still have to > pick between Latin-1 and CP-1252, which you can't tell based on this > one snippet. Welcome to untagged encodings. Or Latin-9 (ISO 8859-15) That was popular on Linux sys

Re: Newbie question about text encoding

2015-02-24 Thread Chris Angelico
On Wed, Feb 25, 2015 at 2:24 AM, Laura Creighton wrote: > Ah, yes, you are right about that. I see CP-1252 about 2 times every 10 > years, and latin1 every minute of my life, so I am biased to assume I > know what I am seeing. Fair enough. CP-1252 is still a possibility, but the difference can b

Re: Newbie question about text encoding

2015-02-24 Thread Chris Angelico
On Wed, Feb 25, 2015 at 2:07 AM, Laura Creighton wrote: >>Can you be sure it's Latin-1? I'm not certain of that. In any case, I >>never advocate fixing encoding problems by "just do this and it'll all >>go away"; you have to understand your data before you can decode it. >> >>ChrisA > > I can, I s

Re: Newbie question about text encoding

2015-02-24 Thread Laura Creighton
In a message of Wed, 25 Feb 2015 02:03:16 +1100, Chris Angelico writes: >On Wed, Feb 25, 2015 at 1:55 AM, Laura Creighton wrote: >> In a message of Tue, 24 Feb 2015 06:25:24 -0500, Dave Angel writes: >>>But utf-8 does not seem to be the right encoding for that bytestring. >>>So you'll need a form

Re: Newbie question about text encoding

2015-02-24 Thread Laura Creighton
In a message of Tue, 24 Feb 2015 15:55:41 +0100, Laura Creighton writes: >In a message of Tue, 24 Feb 2015 06:25:24 -0500, Dave Angel writes: >>But utf-8 does not seem to be the right encoding for that bytestring. >>So you'll need a form like: >> mystring = rec.decode(encoding='xxx') >> >>for

Re: Python shell: Arrow keys not working in PuTTY

2015-02-24 Thread Laura Creighton
In a message of Tue, 24 Feb 2015 11:18:38 +, David Aldrich writes: >> >> BUT do *not* run `make install` as that will overwrite your system >> >> Python and Bad Things will happen. Instead, run `make altinstall`. > >Thanks for all the warnings. We did use `make altinstall`, so all is ok. > >Rec

Re: Newbie question about text encoding

2015-02-24 Thread Dave Angel
On 02/24/2015 05:49 AM, pierrick.brih...@gmail.com wrote: Hello, Working with pyshp, this is my code : What version of Python, what version of pyshp, from where, and what OS? These are the first information to supply in any query that goes outside of the standard library. For example, you

RE: Python shell: Arrow keys not working in PuTTY

2015-02-24 Thread David Aldrich
> >> BUT do *not* run `make install` as that will overwrite your system > >> Python and Bad Things will happen. Instead, run `make altinstall`. Thanks for all the warnings. We did use `make altinstall`, so all is ok. Recompiling, with readline installed, fixed the arrow keys. -- https://mail.pyt

Re: Newbie question about text encoding

2015-02-24 Thread Chris Angelico
On Tue, Feb 24, 2015 at 9:49 PM, wrote: > Working with pyshp, this is my code : > > import shapefile > > inFile = shapefile.Reader("blah") > > for sr in inFile.shapeRecords(): > rec = sr.record[2] > print("Output : ", rec, type(rec)) > > Output: hippodrome du resto > Output: b'stade de

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
I'm combining two messages into one, On Feb 24, 2015, at 12:29 AM, random...@fastmail.us wrote: > On Tue, Feb 24, 2015, at 00:20, Gregory Ewing wrote: >> Cem Karan wrote: >>> I tend to structure my code as a tree or DAG of objects. The owner refers >>> to >>> the owned object, but the owned ob

Re: Design thought for callbacks

2015-02-24 Thread Cem Karan
On Feb 23, 2015, at 7:29 AM, "Frank Millman" wrote: > > "Cem Karan" wrote in message > news:a3c11a70-5846-4915-bb26-b23793b65...@gmail.com... >> >> >> Good questions! That was why I was asking about 'gotchas' with WeakSets >> originally. Honestly, the only way to know for sure would be t

Re: Concatenate list values

2015-02-24 Thread loial
Many thanks for those you chose to help me out. Problem solved. -- https://mail.python.org/mailman/listinfo/python-list

Re: Are threads bad? - was: Future of Pypy?

2015-02-24 Thread Marko Rauhamaa
Chris Angelico : > Actually, you can quite happily have multiple threads messing with the > underlying file descriptors, that's not a problem. (Though you will > tend to get interleaved output. But if you always produce output in > single blocks of text that each contain one line with a trailing >