RE: Myth Busters: % this old style of formatting will eventually be removed from the language

2013-05-22 Thread Carlos Nepomuceno
Ok. Thanks! bugs.python.org/issue18031 Date: Tue, 21 May 2013 23:26:58 -0400 From: n...@nedbatchelder.com To: carlosnepomuc...@outlook.com CC: python-list@python.org Subject: Re: Myth Busters: % this old style of formatting will eventually be

Newbie question about evaluating raw_input() responses

2013-05-22 Thread C. N. Desrosiers
Hi, I'm just starting out with Python and to practice I am trying to write a script that can have a simple conversation with the user. When I run the below code, it always ends up printing response to if age 18: -- even if I enter a value below 18. Can anyone point me to what I am doing

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Fábio Santos
You have to convert `age` to an integer. Use int() to do it. Then you can compare it to other numbers and obtain the expected results. On 22 May 2013 07:29, C. N. Desrosiers cndesrosi...@gmail.com wrote: Hi, I'm just starting out with Python and to practice I am trying to write a script that

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Chris Angelico
On Wed, May 22, 2013 at 12:32 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-05-22 01:15, i...@databaseprograms.biz wrote: A computer programmer, web developer and network administrator ...walk into a bar... So what's the punchline? ;steps up to the mike So yeah, as I was

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Kevin Xi
On Wednesday, May 22, 2013 2:23:15 PM UTC+8, C. N. Desrosiers wrote: Hi, Hi, I'm just starting out with Python and to practice I am trying to write a script that can have a simple conversation with the user. So you may want to search the doc before you ask: http://docs.python.org When

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread C. N. Desrosiers
Muchas gracias! On Wednesday, May 22, 2013 2:35:18 AM UTC-4, Fábio Santos wrote: You have to convert `age` to an integer. Use int() to do it. Then you can compare it to other numbers and obtain the expected results. On 22 May 2013 07:29, C. N. Desrosiers cndesr...@gmail.com wrote: Hi,

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread 88888 Dihedral
Carlos Nepomuceno於 2013年5月22日星期三UTC+8上午11時38分45秒寫道: From: steve+comp.lang.pyt...@pearwood.info Subject: Re: PEP 378: Format Specifier for Thousands Separator Date: Wed, 22 May 2013 03:08:54 + To: python-list@python.org [...] So, the only

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Chris Angelico
On Wed, May 22, 2013 at 4:52 PM, Kevin Xi kevin@gmail.com wrote: On Wednesday, May 22, 2013 2:23:15 PM UTC+8, C. N. Desrosiers wrote: age=raw_input('Enter your age: ') if age 18: You can either use `raw_input` to read data and convert it to right type, or use `input` to get an integer

Diagnosing socket Connection reset by peer

2013-05-22 Thread loial
I have a sockets client that is connecting to a printer and occassionally getting the error 104 Connection reset by peer I have not been able to diagnose what is causing this. Is there any additional traceing I can do(either within my python code or on the network) to establish what is causing

Re: More general way of generating PyODBC queries as a dict?

2013-05-22 Thread stackoverflowuser95
On Wednesday, May 22, 2013 9:33:18 AM UTC+10, Dennis Lee Bieber wrote: On Tue, 21 May 2013 10:27:07 -0700 (PDT), stackoverflowuse...@gmail.com declaimed the following in gmane.comp.python.general: For example, when multiple tables are queried; some hackish lambdas are required

Re: Myth Busters: % this old style of formatting will eventually be removed from the language

2013-05-22 Thread Skip Montanaro
Is this tutorial outdated or this still an issue? [1] http://docs.python.org/2/tutorial/inputoutput.html#old-string-formatting That tutorial is out of date. %-formatting isn't being removed. OTOH, PEP 3101 also mentions deprecation, at the very end: ... both systems can co-exist until it

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Skip Montanaro
Please stop perpetuating this myth, see http://mail.python.org/pipermail/python-dev/2012-February/116789.html and http://bugs.python.org/issue14123 What myth? The myth that % string formatting is deprecated. It is not deprecated. Skip didn't say that it was deprecated. I didn't mean to

Re: Static Maps from Lat Long data in XLS file

2013-05-22 Thread kobewka
On Tuesday, May 21, 2013 11:27:42 AM UTC-4, Tim Daneliuk wrote: On 05/21/2013 08:12 AM, @gmail.com wrote: Hello, I'm new to Python, but I think it can solve my problem and I am looking for a someone to point me to tutorial or give me some tips here. I have an xls file that

Re: Static Maps from Lat Long data in XLS file

2013-05-22 Thread kobewka
Thanks Ken. I'll have a closer look at those links. I also found Motionless, which creates a static map HTML file. Combined with what you said, I should be able to get what I need. https://github.com/ryancox/motionless Scott On Tuesday, May 21, 2013 9:58:25 AM UTC-4, Ken Bolton wrote: On

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Ned Batchelder
On 5/21/2013 11:38 PM, Carlos Nepomuceno wrote: From:steve+comp.lang.pyt...@pearwood.info Subject: Re: PEP 378: Format Specifier for Thousands Separator Date: Wed, 22 May 2013 03:08:54 + To:python-list@python.org [...] So, the only alternative to have '%,d' % x rendering the thousands

Re: Diagnosing socket Connection reset by peer

2013-05-22 Thread Matt Jones
This typically indicates that the peer at the other end of the tcp connection severed the session without the typical FIN packet. If you're treating the printer as a blackbox then there really isn't anything you can do here except catch the exception and attempt to reconnect. *Matt Jones* On

RE: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Carlos Nepomuceno
Date: Wed, 22 May 2013 07:25:13 -0400 From: n...@nedbatchelder.com [...] You have to keep in mind that 2.7 is not getting any new features, no matter how small they seem. If you create a patch that implements the comma flag in %-formatting, it *might*

Python Windows release and encoding

2013-05-22 Thread Absalom K.
Hi, I am working on Linux; a friend of mine sends to me python files from his Windows release. He uses the editor coming with the release; he runs his code from the editor by using a menu (or some F5 key I think). He doesn't declare any encoding in his source file; when I want to try his code, I

Re: Python Windows release and encoding

2013-05-22 Thread Peter Otten
Absalom K. wrote: Hi, I am working on Linux; a friend of mine sends to me python files from his Windows release. He uses the editor coming with the release; he runs his code from the editor by using a menu (or some F5 key I think). He doesn't declare any encoding in his source file; when I

Re: Diagnosing socket Connection reset by peer

2013-05-22 Thread Dave Angel
On 05/22/2013 04:46 AM, loial wrote: SNIP Is there any additional traceing I can do(either within my python code or on the network) to establish what is causing this error? Try using Wireshark. It can do a remarkable job of filtering, capturing, and analyzing packets. It can

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Tim Chase
On 2013-05-22 16:39, Chris Angelico wrote: On Wed, May 22, 2013 at 12:32 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-05-22 01:15, i...@databaseprograms.biz wrote: A computer programmer, web developer and network administrator ...walk into a bar... So what's the

Re: What was the project that made you feel skilled in Python?

2013-05-22 Thread Ben Finney
Ned Batchelder n...@nedbatchelder.com writes: as you moved from exercises like those in Learn Python the Hard Way, up to your own self-guided work on small projects, what project were you working on that made you feel independent and skilled? What program first felt like your own work rather

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Harry Percival
oh wow. great one, thanks for that tim :) On 22 May 2013 14:03, Tim Chase python.l...@tim.thechases.com wrote: On 2013-05-22 16:39, Chris Angelico wrote: On Wed, May 22, 2013 at 12:32 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2013-05-22 01:15, i...@databaseprograms.biz

Re: Future standard GUI library

2013-05-22 Thread Wolfgang Keller
Do you think tkinter is going to be the standard python built-in gui solution as long as python exists? AT the moment, there is nothing really comparable that is a realistic candidate to replace tkinter. FLTK? (http://www.fltk.org/index.php) tkinter is the Python wrapper of the

Re: Future standard GUI library

2013-05-22 Thread Wolfgang Keller
I know this may sound a silly question because no one can see the future. But ... Do you think tkinter is going to be the standard python built-in gui solution as long as python exists? Standard built-in maybe, but by far most people who need a GUI for an actual application will keep using

Re: Future standard GUI library

2013-05-22 Thread Chris Angelico
On Wed, May 22, 2013 at 11:42 PM, Wolfgang Keller felip...@gmx.net wrote: What other open-source cross-platform programming language choices do yo have. Java? For GUIs? Excuse me while I vomit. C++? As a language for human beings? Oops, I have to throw up again. I personally like using Pike

Re: Translation API in Python

2013-05-22 Thread Chris Angelico
On Wed, May 22, 2013 at 8:16 AM, Hala Gamal halagamal2...@gmail.com wrote: ok MR, I have searched before asking here,but i didn't find thing Your post doesn't demonstrate that. When you ask a question like this, it's helpful to give at least some indication of what you've tried and what you

Re: Myth Busters: % this old style of formatting will eventually be removed from the language

2013-05-22 Thread Denis McMahon
On Tue, 21 May 2013 23:26:58 -0400, Ned Batchelder wrote: On 5/21/2013 10:26 PM, Carlos Nepomuceno wrote: Since str.format() is quite new, a lot of Python code still uses the % operator. However, because this old style of formatting will eventually be removed from the language, str.format()

Re: What was the project that made you feel skilled in Python?

2013-05-22 Thread Chris Angelico
On Wed, May 22, 2013 at 11:05 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: I wanted to simulate a particular board game, and had others in mind with some common mechanics. This resulted in a library for rolling dice in different combinations, and looking up result tables

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Steven D'Aprano
On Wed, 22 May 2013 05:45:12 -0500, Skip Montanaro wrote: I didn't mean to create a tempest in a teapot. I was away from comp.lang.python, python-bugs, and python-dev for a few years. In particular, I didn't ever see the aforementioned thread from Feb 2012. Had I known of that thread I

subclassing from unittest

2013-05-22 Thread Charles Smith
Hi, I'd like to subclass from unittest.TestCase. I observed something interesting and wonder if anyone can explain what's going on... some subclasses create null tests. I can create this subclass and the test works: class StdTestCase (unittest.TestCase): blahblah and I can create

Re: subclassing from unittest

2013-05-22 Thread Charles Smith
On 22 Mai, 17:32, Charles Smith cts.private.ya...@gmail.com wrote: Hi, I'd like to subclass from unittest.TestCase.  I observed something interesting and wonder if anyone can explain what's going on... some subclasses create  null tests. I can create this subclass and the test works:  

file I/O and arithmetic calculation

2013-05-22 Thread Keira Wilson
Dear all, I would appreciate if someone could write a simple python code for the purpose below: I have five text files each of 10 columns by 10 rows as follows: file_one = 'C:/test/1.txt' file_two = 'C:/test/2.txt' . . . file_five = 'C:/test/5.txt' I want to calculate the mean of first row

Re: file I/O and arithmetic calculation

2013-05-22 Thread Mark Lawrence
On 22/05/2013 17:13, Keira Wilson wrote: Dear all, I would appreciate if someone could write a simple python code for the purpose below: I have five text files each of 10 columns by 10 rows as follows: |file_one= 'C:/test/1.txt' file_two= 'C:/test/2.txt' . . . file_five=

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Ned Batchelder
On 5/22/2013 10:58 AM, Steven D'Aprano wrote: On Wed, 22 May 2013 05:45:12 -0500, Skip Montanaro wrote: I didn't mean to create a tempest in a teapot. I was away from comp.lang.python, python-bugs, and python-dev for a few years. In particular, I didn't ever see the aforementioned thread

Re: Myth Busters: % this old style of formatting will eventually be removed from the language

2013-05-22 Thread Terry Jan Reedy
On 5/22/2013 10:24 AM, Denis McMahon wrote: Indeed, removing %-formatting could break a substantial amount of live code, with potentially significant maintenance effort in the user While I would like to see % formatting go away everntually*, other developers would not. In any case, I agree

Re: Diagnosing socket Connection reset by peer

2013-05-22 Thread Jorgen Grahn
On Wed, 2013-05-22, Dave Angel wrote: On 05/22/2013 04:46 AM, loial wrote: SNIP Is there any additional traceing I can do(either within my python code or on the network) to establish what is causing this error? Try using Wireshark. It can do a remarkable job of filtering,

Re: Myth Busters: % this old style of formatting will eventually be removed from the language

2013-05-22 Thread nn
On May 22, 6:35 am, Skip Montanaro s...@pobox.com wrote: Is this tutorial outdated or this still an issue? [1] http://docs.python.org/2/tutorial/inputoutput.html#old-string-formatting That tutorial is out of date.  %-formatting isn't being removed. OTOH, PEP 3101 also mentions

Re: What was the project that made you feel skilled in Python?

2013-05-22 Thread Terry Jan Reedy
On 5/22/2013 9:05 AM, Ben Finney wrote: I wanted to simulate a particular board game, and had others in mind with some common mechanics. This resulted in a library for rolling dice in different combinations, and looking up result tables URL:https://pypi.python.org/pypi/alea. Have you

Re: Diagnosing socket Connection reset by peer

2013-05-22 Thread Jorgen Grahn
On Wed, 2013-05-22, Matt Jones wrote: On Wed, May 22, 2013 at 3:46 AM, loial jldunn2...@gmail.com wrote: I have a sockets client that is connecting to a printer and occassionally getting the error 104 Connection reset by peer I have not been able to diagnose what is causing this. Is there

Re: Diagnosing socket Connection reset by peer

2013-05-22 Thread Grant Edwards
On 2013-05-22, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Wed, 2013-05-22, Dave Angel wrote: On 05/22/2013 04:46 AM, loial wrote: SNIP Is there any additional traceing I can do(either within my python code or on the network) to establish what is causing this error? Try using

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread nn
On May 22, 2:30 pm, Ned Batchelder n...@nedbatchelder.com wrote: On 5/22/2013 10:58 AM, Steven D'Aprano wrote: On Wed, 22 May 2013 05:45:12 -0500, Skip Montanaro wrote: I didn't mean to create a tempest in a teapot.  I was away from comp.lang.python, python-bugs, and python-dev for a few

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
Funny! I made a lot of assumptions regarding your requirements specification. Let me know if it isn't what you need: ### 1strow_average.py ### #Assuming you have CSV (comma separated values) files such as: #1.txt = '0,1,2,3,4,5,6,7,8,9\n' \ #    '10,11,12,13,14,15,16,17,18,19\n' \ #   

Re: subclassing from unittest

2013-05-22 Thread Terry Jan Reedy
On 5/22/2013 11:32 AM, Charles Smith wrote: Have you red this? I will suggest some specifics. http://www.catb.org/esr/faqs/smart-questions.html I'd like to subclass from unittest.TestCase. What version of Python. I observed something interesting and wonder if anyone can explain what's

RE: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Carlos Nepomuceno
Date: Wed, 22 May 2013 13:26:23 -0700 Subject: Re: PEP 378: Format Specifier for Thousands Separator From: prueba...@latinmail.com To: python-list@python.org [...] Maybe a cformat(formatstring, variables) function should be created in the string

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Alister
On Tue, 21 May 2013 23:52:30 -0700, Kevin Xi wrote: On Wednesday, May 22, 2013 2:23:15 PM UTC+8, C. N. Desrosiers wrote: Hi, Hi, I'm just starting out with Python and to practice I am trying to write a script that can have a simple conversation with the user. So you may want to search

RE: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Carlos Nepomuceno
From: alister.w...@ntlworld.com [...] Kevin Please write out 1000 time (without using any form of loop) NEVER use input in python 3.0 it is EVIL* as Chris A point out it executes user input an can cause major damage (reformatting the hard disk is

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Gregory Ewing
Tim Chase wrote: So a pirate programmer walks into a bar with a bird on his shoulder. The bird repeatedly squawks pieces of nine! pieces of nine!. The bartender looks at him and asks what's up with the bird? to which the pirate says Arrr, he's got a parroty error. No, he's just using

Re: file I/O and arithmetic calculation

2013-05-22 Thread Oscar Benjamin
On 22 May 2013 22:05, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: filenames = ['1.txt', '2.txt', '3.txt', '4.txt', '5.txt'] contents = [[[int(z) for z in y.split(',')] for y in open(x).read().split()] for x in filenames] s1c = [sum([r[0] for r in f]) for f in contents] a1r =

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
From: oscar.j.benja...@gmail.com [...] Do you find this code easy to read? I wouldn't write something like this and I certainly wouldn't use it when explaining something to a beginner. Rather than repeated list comprehensions you should consider

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
# contents[3][4][5] : 6th column of 5th row of file '4.txt' BTW, it should read # contents[3][4][5] : 6th value of 5th row of file '4.txt' -- http://mail.python.org/mailman/listinfo/python-list

Re: file I/O and arithmetic calculation

2013-05-22 Thread Denis McMahon
On Thu, 23 May 2013 01:13:19 +0900, Keira Wilson wrote: I would appreciate if someone could write a simple python code for the purpose below: Didn't have your data, so couldn't verify it completely, but try this: import re def v(s): l=len(s) t=0. for i in range(l):

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
From: denismfmcma...@gmail.com [...] import re def v(s): l=len(s) t=0. for i in range(l): t=t+(abs(ord(s[i]))*1.) return t/(l*1.) for n in range(5): m=c:/test/+str(n+1)+.txt f=open(m,r) d=[] t=0. for l in range(10):

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Oscar Benjamin
On 22 May 2013 23:31, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: I still don't understand why % benefits from literals optimization ('%d'%12345) while '{:d}'.format(12345) doesn't. There's no reason why that optimisation can't happen in principle. However no one has written a patch

Re: file I/O and arithmetic calculation

2013-05-22 Thread Oscar Benjamin
On 23 May 2013 00:49, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: The code is pretty obvious to me, I mean there's no obfuscation at all. I honestly can't tell if you're joking. -- http://mail.python.org/mailman/listinfo/python-list

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
From: oscar.j.benja...@gmail.com Date: Thu, 23 May 2013 01:34:37 +0100 Subject: Re: file I/O and arithmetic calculation To: carlosnepomuc...@outlook.com CC: python-list@python.org On 23 May 2013 00:49, Carlos Nepomuceno carlosnepomuc...@outlook.com

RE: PEP 378: Format Specifier for Thousands Separator

2013-05-22 Thread Carlos Nepomuceno
From: oscar.j.benja...@gmail.com Date: Thu, 23 May 2013 01:30:53 +0100 Subject: Re: PEP 378: Format Specifier for Thousands Separator To: carlosnepomuc...@outlook.com CC: prueba...@latinmail.com; python-list@python.org On 22 May 2013 23:31, Carlos

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Ken Bolton
On Wed, May 22, 2013 at 7:25 PM, Gregory Ewing greg.ew...@canterbury.ac.nzwrote: Tim Chase wrote: So a pirate programmer walks into a bar with a bird on his shoulder. The bird repeatedly squawks pieces of nine! pieces of nine!. The bartender looks at him and asks what's up with the bird? to

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Kevin Xi
Oh yes, you guys are right. Thank you very much for warning me that. On Thursday, May 23, 2013 6:31:04 AM UTC+8, Alister wrote: as Chris A point out it executes user input an can cause major damage (reformatting the hard disk is not impossible!) It definitely can cause major damage! I

Re: Future standard GUI library

2013-05-22 Thread llanitedave
On Wednesday, May 22, 2013 7:24:15 AM UTC-7, Chris Angelico wrote: On Wed, May 22, 2013 at 11:42 PM, Wolfgang Keller felip...@gmx.net wrote: What other open-source cross-platform programming language choices do yo have. Java? For GUIs? Excuse me while I vomit. C++? As a

RE: file I/O and arithmetic calculation

2013-05-22 Thread Carlos Nepomuceno
The last line of my noob piece can be improved. So this is it: ### 1strow_average.py ### #Assuming you have CSV (comma separated values) files such as: #1.txt = '0,1,2,3,4,5,6,7,8,9\n' \ #    '10,11,12,13,14,15,16,17,18,19\n' \ #    '20,21,22,23,24,25,26,27,28,29\n' ... # # Usage:

Ordered dictionaries compared

2013-05-22 Thread Dan Stromberg
What kind of ordered dictionaries? Sorted by key. I've redone the previous comparison, this time with a better red-black tree implementation courtesy of Duncan G. Smith. The comparison is at http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/just-trees/ The Red-Black tree

Re: Modules list-tool

2013-05-22 Thread Dan Stromberg
On Tue, May 21, 2013 at 12:35 PM, Gisle Vanem gva...@broadpark.no wrote: Are anyone aware of a tool that can show me at run-time which modules (pyd/dll) are loaded into a Python program at a specific time (or over time)? To clarify, e.g. when running a sample from PyQt4

Re: Newbie question about evaluating raw_input() responses

2013-05-22 Thread Steven D'Aprano
On Wed, 22 May 2013 22:31:04 +, Alister wrote: Please write out 1000 time (without using any form of loop) NEVER use input in python 3.0 it is EVIL* as Chris A point out it executes user input an can cause major damage (reformatting the hard disk is not impossible!) Is he allowed to

RE: Modules list-tool

2013-05-22 Thread Carlos Nepomuceno
Have you tried Inspect Shell[1]? All you have to do to monitor your script is include import inspect_shell in the 1st line of you source code and then run: python inspect_shell.py When you get the prompt you can enter the following to show the list of modules: localhost:1234

[issue18007] CookieJar expects request objects with origin_req_host attribute instead of method

2013-05-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Simon, Thanks for bringing this to attention. Since get_origin_req_host has been under deprecation was a release, I thought it was safe to remove that. Agree that documentation of cookiejar methods, which had a dependency on the change should have

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - enhancement versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031 ___

[issue17839] base64 module should use memoryview

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ezio and Nick for your comments. I suggest renaming _bytes_from_decode_data to _bytes_for_decoding and adding _bytes_for_encoding. I rather think a TypeError exception raised by `memoryview(s).tobytes()` is good enough and we don't need a

[issue18030] IDLE shell crashes when reporting errors in Windows 7

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Windows nosy: +brian.curtin, kbk, roger.serwy, terry.reedy, tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18030

[issue18030] IDLE shell crashes when reporting errors in Windows 7

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue13582. -- nosy: +serhiy.storchaka resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - IDLE and pythonw.exe stderr problem ___ Python tracker

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Can you please provide some context for this report? On the abstract, I agree that there is an error in the tutorial: it is not decided whether the % formatting will be eventually removed, and I would also personally disagree with the recommendation to

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +ElementTree incorrectly parses strings with declared encoding not UTF-8 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For unit tests we first should fix issue16986. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___ ___

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Serhiy, that version looks great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17844 ___ ___

[issue17140] Provide a more obvious public ThreadPool API

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: Actors are just as vulnerable to the new threads/processes are expensive issue as anything else, and by using a dynamic pool appropriately you can amortise those costs across multiple instances. The point is to expose a less opinionated threading model in a

[issue17716] From ... import fails when parent package failed but child module succeeded, yet works in std import case

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: import-sig is probably a better place to start -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17716 ___ ___

[issue17140] Provide a more obvious public ThreadPool API

2013-05-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: I understand that a thread pool (in the general sense) might be used to amortise the cost. But I think you would probably have to write this from scratch rather than use the ThreadPool API. The ThreadPool API does not really expose anything that the

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't really understand the issue. If you want to pass binary data (rather than unicode text), you should use a Binary object as explained in the docs: http://docs.python.org/2/library/xmlrpclib.html#binary-objects -- nosy: +pitrou

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Carlos Nepomuceno
Carlos Nepomuceno added the comment: According to what I have been told at python-l...@python.org str.__mod__() is not going to be deprecated and that seems to be a myth created by Python's own documentation. I do remember to have read previously in another page that it would be deprecated

[issue18031] The Python Tutorial says % string formatting will be removed

2013-05-22 Thread Ned Batchelder
Changes by Ned Batchelder n...@nedbatchelder.com: -- nosy: +nedbat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18031 ___ ___ Python-bugs-list

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: The original report really includes two parts: a) when a string containing \0 is marshalled, ill-formed XML is produced b) the expected behavior is that base64 is used IMO: While a) is correct, b) is not. Antoine is correct that xmlrpclib.Binary should be

[issue18015] python 2.7.5 fails to unpickle namedtuple pickled by 2.7.3 or 2.7.4

2013-05-22 Thread Anselm Kruis
Anselm Kruis added the comment: I created a small *.pth to monkey patch collections.py until 2.7.6 gets released. Maybe this is useful for someone else. Therefore I attach it here. The pth file runs the following code during Python startup: import collections def

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 21.05.13 23:14, schrieb Oscar Benjamin: More generally I think that compiling non-cygwin extensions with cygwin gcc should be altogether deprecated (for Python 3.4 at least). It should be discouraged in the docs and unsupported in the future. I agree

[issue18032] set methods should specify whether they consume iterators lazily

2013-05-22 Thread Abafei
New submission from Abafei: It says here (http://docs.python.org/2/library/stdtypes.html#set-types-set-frozenset) that some of the set methods take iterables as a parameter. Usually, the expected behavior is for a iterator consumer to consume only as much data as it needs. For example, for

[issue7760] use_errno=True does not work

2013-05-22 Thread Matt Jones
Matt Jones added the comment: Is this really a documentation issue? Is it not generally understood that using absolute paths to libraries is a bad idea due to the amount of PATH/symlink spaghetti that the average file system contains? -- nosy: +Matt.Jones

[issue7727] xmlrpc library returns string which contain null ( \x00 )

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The limitations is already documented: However, it’s the caller’s responsibility to ensure that the string is free of characters that aren’t allowed in XML, such as the control characters with ASCII values between 0 and 31 (except, of course, tab, newline

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: For unit tests we first should fix issue16986. I did another round of code review on issue 16986 now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: Looked at Serhiy's patch here too: LGTM with a unit test :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612 ___

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85c04fdaa404 by Serhiy Storchaka in branch '2.7': Issue #17844: Refactor a documentation of Python specific encodings. http://hg.python.org/cpython/rev/85c04fdaa404 New changeset 039dc6dd2bc0 by Serhiy Storchaka in branch '3.3': Issue #17844: Add

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Nick. It's mainly your patch. Do you want to foreport your changes (a Python Specific Encodings subheading and followed paragraph) to 3.x? -- ___ Python tracker rep...@bugs.python.org

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 22 May 2013 12:43, Martin v. Löwis rep...@bugs.python.org wrote: Am 21.05.13 23:14, schrieb Oscar Benjamin: More generally I think that compiling non-cygwin extensions with cygwin gcc should be altogether deprecated (for Python 3.4 at least). It should be

[issue12641] Remove -mno-cygwin from distutils

2013-05-22 Thread Oscar Benjamin
Oscar Benjamin added the comment: On 22 May 2013 13:40, Oscar Benjamin rep...@bugs.python.org wrote: However on further reflection I'm a little reluctant to force an error if I can't *prove* that the setup is broken. After a little more reflection I realise that we could just do: if

[issue17272] request.full_url: unexpected results on assignment

2013-05-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Here is patch with tests and docs. I see no changes to opener is required and the selector which is sent to HTTP request is the correct one. I have added tests for redirect url with #fragment too (For testing scenario reported in Issue 8280). I shall close

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an updated patch. -- Added file: http://bugs.python.org/file30341/etree_parse_str_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Eli Bendersky
Eli Bendersky added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is an updated patch. PyUnknownEncodingHandler() and expat_unknown_encoding_handler() are synchronized. Added tests. -- Added file: http://bugs.python.org/file30342/expat_unknown_encoding_handler_2.patch ___

[issue13612] xml.etree.ElementTree says unknown encoding of a regular encoding

2013-05-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: -ElementTree incorrectly parses strings with declared encoding not UTF-8 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13612

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7781ccae7b9a by Serhiy Storchaka in branch '3.3': Issue #16986: ElementTree now correctly parses a string input not only when http://hg.python.org/cpython/rev/7781ccae7b9a New changeset 659c1ce8ed2f by Serhiy Storchaka in branch 'default': Issue

[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-05-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, 2.7 still uses old doctests. It's a challenge to backport tests for this issue. -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986

[issue17844] Add link to alternatives for bytes-to-bytes codecs

2013-05-22 Thread Nick Coghlan
Nick Coghlan added the comment: That sounds like a good idea. Yay for not needing those arcane footnotes, though :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17844 ___

  1   2   >