Re: Referrer key missing form os.environ dictionary?

2013-09-27 Thread Chris Angelico
On Fri, Sep 27, 2013 at 9:27 AM, Grant Edwards invalid@invalid.invalid wrote: I probably should have said stdin, but in theory you can pass data in via multiple file descriptors. Nobody does that except people cooking up obscure examples for advanced shell scripting guides... Yep. With that

Method not found: 'ServiceSettingSave' in Suds package

2013-09-27 Thread Anup Kandalkar
I am trying to create service for the url: wsdl_url = https://avatax.avalara.net/Account/Accountsvc.wsdl But some error is coming: svc = suds.client.Client(url=wsdl_url) File /usr/lib/python2.7/dist-packages/suds/client.py, line 114, in __init__ self.wsdl = reader.open(url) File

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Thomas Kandler
On 26.09.2013 17:13, Bill wrote: I have been using the script youtube-dl http://rg3.github.io/youtube-dl/ And I was wondering if there is a way to download all of a user's favorites or uploads. The script has a functionality to download all videos in a txt file. So if there is a way using

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 1:55 πμ, ο/η Dave Angel έγραψε: On 26/9/2013 18:14, Νίκος wrote: Στις 26/9/2013 11:16 μμ, ο/η Denis McMahon έγραψε: On Thu, 26 Sep 2013 19:58:02 +0300, Νίκος wrote: except socket.gaierror as e: city = host = UnKnown Origin But then what if in case of an error i

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Steven D'Aprano
On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote: I'am not sure what you mean though when you say: Simply assign the default values BEFORE the try block, and use pass as the except block. Can you please make it more clear for me? variable = default value try: variable =

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-27 Thread Roland Mueller
Hello, 2013/9/24 Alex Lee quarantinemi...@gmail.com Thanks for the help guys! I'll definitely read up on the csv module documentation. Tim, that's incredibly helpful, thanks a lot! :) My CSV file doesn't have headers, but I'm sure I can just as easily add it in manually. a better way to

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 12:26 μμ, ο/η Steven D'Aprano έγραψε: On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote: I'am not sure what you mean though when you say: Simply assign the default values BEFORE the try block, and use pass as the except block. Can you please make it more clear for me?

card dealer

2013-09-27 Thread markotaht
from random import * from math import floor kaarte_alles = 52 kaart_tõmmatud = [False for i in range(52)] mast = [ärtu, ruutu, poti, risti] aste = [äss, kaks, kolm, neli,viis, kuus, \ seitse, kaheksa, üheksa, kümme, soldat,\ emand, kuningas] def tõmba_kaart(): global

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Dave Angel
On 27/9/2013 05:19, Νίκος wrote: Στις 27/9/2013 1:55 πμ, ο/η Dave Angel έγραψε: Simply assign the default values BEFORE the try block, and use pass as the except block. That still doesn't get around the inadvisability of putting those 3 lines in the try block. You still haven't dealt

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 1:43 μμ, ο/η Dave Angel έγραψε: Στις 27/9/2013 1:55 πμ, ο/η Dave Angel έγραψε: Simply assign the default values BEFORE the try block, and use pass as the except block. That still doesn't get around the inadvisability of putting those 3 lines in the try block. You still haven't

Re: card dealer

2013-09-27 Thread Dave Angel
On 27/9/2013 06:24, markot...@gmail.com wrote: from random import * from math import floor kaarte_alles = 52 kaart_tõmmatud = [False for i in range(52)] mast = [ärtu, ruutu, poti, risti] aste = [äss, kaks, kolm, neli,viis, kuus, \ seitse, kaheksa, üheksa, kümme, soldat,\

Re: card dealer

2013-09-27 Thread MRAB
On 27/09/2013 11:24, markot...@gmail.com wrote: from random import * from math import floor kaarte_alles = 52 kaart_tõmmatud = [False for i in range(52)] mast = [ärtu, ruutu, poti, risti] aste = [äss, kaks, kolm, neli,viis, kuus, \ seitse, kaheksa, üheksa, kümme, soldat,\

nozama-cloudsearch-service 1.1.2: a local Amazon CloudSearch using ElasticSearch as its backend.

2013-09-27 Thread Oisin Mulvihill
Hello, Have you ever wanted to test your app against a dev version of your production CloudSearch? Is management saying budget constraints won't allow this? Then Nozama CloudSearch is for you. It is a light weight implementation of Amazon's CloudSearch service you can run locally. Its has

Re: card dealer

2013-09-27 Thread Alister
On Fri, 27 Sep 2013 03:24:28 -0700, markotaht wrote: from random import * from math import floor kaarte_alles = 52 kaart_tõmmatud = [False for i in range(52)] mast = [ärtu, ruutu, poti, risti] aste = [äss, kaks, kolm, neli,viis, kuus, \ seitse, kaheksa, üheksa, kümme,

Re: card dealer

2013-09-27 Thread Dave Angel
On 27/9/2013 07:26, Dave Angel wrote: On 27/9/2013 06:24, markot...@gmail.com wrote: I sent the previous message long before I had finished. If you had created your global list containing list(range(52)), then you could do nearly your entire program with one call to random.sample.

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Dave Angel
On 27/9/2013 07:15, Νίκος wrote: Στις 27/9/2013 1:43 μμ, ο/η Dave Angel έγραψε: snip ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) city = Άγνωστη Πόλη host = Άγνωστη Προέλευση try: city = gi.time_zone_by_addr( ipval )

How to write in to already opened excel file by using openpyxl

2013-09-27 Thread someshg2
Hi..there, I have opened a excel file by using the following code from openpyxl import load_workbook wb = load_workbook('path of the file') DriverTableSheet = wb.get_sheet_by_name(name = 'name of the sheet') after that i have to append some values in that excel file.. for that i used the

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 3:17 μμ, ο/η Dave Angel έγραψε: On 27/9/2013 07:15, Νίκος wrote: Στις 27/9/2013 1:43 μμ, ο/η Dave Angel έγραψε: snip ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) city = Άγνωστη Πόλη host = Άγνωστη Προέλευση try:

Re: How to write in to already opened excel file by using openpyxl

2013-09-27 Thread Neil Cerutti
On 2013-09-27, somes...@gmail.com somes...@gmail.com wrote: Hi..there, I have opened a excel file by using the following code from openpyxl import load_workbook wb = load_workbook('path of the file') DriverTableSheet = wb.get_sheet_by_name(name = 'name of the sheet') after that i have

Re: How to write in to already opened excel file by using openpyxl

2013-09-27 Thread Joel Goldstick
On Fri, Sep 27, 2013 at 9:37 AM, Neil Cerutti ne...@norwich.edu wrote: On 2013-09-27, somes...@gmail.com somes...@gmail.com wrote: Hi..there, I have opened a excel file by using the following code from openpyxl import load_workbook wb = load_workbook('path of the file')

Re: How to write in to already opened excel file by using openpyxl

2013-09-27 Thread somesh g
Hi..joel what is said is correct i dint added save to that after adding its working perfect thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: How to write in to already opened excel file by using openpyxl

2013-09-27 Thread somesh g
hi..Neil yes i dint saved that time and i added the save option and it saved Thanks for the response -- https://mail.python.org/mailman/listinfo/python-list

unable to read combo boxes in excel by xlrd package in python

2013-09-27 Thread somesh g
Hi..there I want to read the combo box in excel by using xlrd but in the output it is showing empty message, its not reading the combo box can u guys help me how to read the combo box in excel by xlrd code written like this workbook = xlrd.open_workbook('path of the file') worksheet =

Free Proxy site 2014

2013-09-27 Thread 23alagmy
Free Proxy site 2014 search is the first proxy supports proxy access blocked sites, browsing, and downloads without restrictions and also conceal your identity Pencah by 100% from the sites you visit http://natigaas7ab.net/wp/?p=14556 -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to read combo boxes in excel by xlrd package in python

2013-09-27 Thread Neil Cerutti
On 2013-09-27, somesh g somes...@gmail.com wrote: Hi..there I want to read the combo box in excel by using xlrd but in the output it is showing empty message, its not reading the combo box can u guys help me how to read the combo box in excel by xlrd code written like this workbook =

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Denis McMahon
On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote: This is my code as i have it at the moment: ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) try: gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat') city =

Re: unable to read combo boxes in excel by xlrd package in python

2013-09-27 Thread Neil Cerutti
On 2013-09-27, Neil Cerutti ne...@norwich.edu wrote: On 2013-09-27, somesh g somes...@gmail.com wrote: Hi..there I want to read the combo box in excel by using xlrd but in the output it is showing empty message, its not reading the combo box can u guys help me how to read the combo box in

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Grant Edwards
On 2013-09-27, Denis McMahon denismfmcma...@gmail.com wrote: Note that there is nothing special about writing it in as few lines as code as possible. Hah! That's what they _want_ you to think. First they get you hooked on newlines, then the newline mine owners form a cartel and start jacking

Re: card dealer

2013-09-27 Thread Denis McMahon
On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades ago, which took an array of (52) unique items and put them in random order. Whenever I tried to write shuffles I came up against a fairly fundamental limit: 52! prng states Granted prngs

Re: what is wrong in my code?? (python 3.3)

2013-09-27 Thread Denis McMahon
On Fri, 27 Sep 2013 06:54:48 -0700, dream4soul wrote: #!c:/Python33/python.exe -u import os, sys print(Content-type: text/html; charset=utf-8\n\n) print ('Hello, world!hr') print('ранее предусматривалась смертная казнь.') I see only first print, second it just question marks in my

Hostrange expansion

2013-09-27 Thread Sam Giraffe
Hi, I need some help in expanding a hostrange as in: h[1-100].domain.com should get expanded into a list containing h1.domain.com to h100.domain.com. Is there a library that can do this for me? I also need to valid the range before I expand it, i.e., h[1*100].domain.com should not be accept, or

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 6:16 μμ, ο/η Denis McMahon έγραψε: On Fri, 27 Sep 2013 12:19:53 +0300, Νίκος wrote: This is my code as i have it at the moment: ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) try: gi =

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Neil Cerutti
On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2 variables(city and host). Sure, eating with my mouth is straightforward and step-by-step,

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Grant Edwards
On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2 variables(city and host). Does your provider charge you per line of code? If all that

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Joel Goldstick
On Fri, Sep 27, 2013 at 1:00 PM, Grant Edwards invalid@invalid.invalidwrote: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2

Re: Hostrange expansion

2013-09-27 Thread Joel Goldstick
On Fri, Sep 27, 2013 at 11:32 AM, Sam Giraffe s...@giraffetech.biz wrote: Hi, I need some help in expanding a hostrange as in: h[1-100].domain.comshould get expanded into a list containing h1.domain.com to h100.domain.com. Is there a library that can do this for me? I also need to valid

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Mark Lawrence
On 27/09/2013 18:00, Grant Edwards wrote: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2 variables(city and host). Does your provider

Re: Hostrange expansion

2013-09-27 Thread Peter Otten
Sam Giraffe wrote: I need some help in expanding a hostrange as in: h[1-100].domain.com should get expanded into a list containing h1.domain.com to h100.domain.com. Is there a library that can do this for me? I also need to valid the range before I expand it, i.e., h[1*100].domain.com should

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Denis McMahon
On Fri, 27 Sep 2013 18:32:23 +0100, Mark Lawrence wrote: On 27/09/2013 18:00, Grant Edwards wrote: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Grant Edwards
On 2013-09-27, Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 27 Sep 2013 18:32:23 +0100, Mark Lawrence wrote: On 27/09/2013 18:00, Grant Edwards wrote: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Joel Goldstick
On Fri, Sep 27, 2013 at 2:54 PM, Grant Edwards invalid@invalid.invalidwrote: On 2013-09-27, Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 27 Sep 2013 18:32:23 +0100, Mark Lawrence wrote: On 27/09/2013 18:00, Grant Edwards wrote: On 2013-09-27, ?? nikos.gr...@gmail.com

Aide pour bien démarrer en Python

2013-09-27 Thread jonathan . corriveau
Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment du mal à voir pourquoi Python est si fantastique... Je m'explique Pour moi python c'est un langage de script très cryptique avec des noms de méthodes courts, pas claire, dans une identation pas toujours facile

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Bill
Thomas Kandler wrote: On 26.09.2013 17:13, Bill wrote: I have been using the script youtube-dl http://rg3.github.io/youtube-dl/ And I was wondering if there is a way to download all of a user's favorites or uploads. The script has a functionality to download all videos in a txt file. So if

Re: Aide pour bien démarrer en Python

2013-09-27 Thread Joel Goldstick
2013/9/27 jonathan.corriv...@gmail.com Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment du mal à voir pourquoi Python est si fantastique... Je m'explique Pour moi python c'est un langage de script très cryptique avec des noms de méthodes courts, pas

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Thomas Kandler
On 27.09.2013 21:50, Bill wrote: Hi. A screenshot would help me locate it. Cheers Sure. http://i.imgur.com/LvrNZYO.png I don't thing *every* profile has this, but as I said, I use youtube-dl quite often this way. Best -- https://mail.python.org/mailman/listinfo/python-list

Re: Aide pour bien démarrer en Python

2013-09-27 Thread Vincent Vande Vyvre
Le 27/09/2013 21:57, Joel Goldstick a écrit : 2013/9/27 jonathan.corriv...@gmail.com mailto:jonathan.corriv...@gmail.com Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment du mal à voir pourquoi Python est si fantastique... Je m'explique

Re: card dealer

2013-09-27 Thread Dave Angel
On 27/9/2013 12:10, Denis McMahon wrote: On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades ago, which took an array of (52) unique items and put them in random order. Whenever I tried to write shuffles I came up against a fairly

Re: Free Proxy site 2014

2013-09-27 Thread Dave Angel
On 27/9/2013 10:44, 23alagmy wrote: Free Proxy site 2014 search is the first proxy supports proxy access blocked sites, browsing, and downloads without restrictions and also conceal your identity Pencah by 100% from the sites you visit deleted link Sure, I'm going to trust going to a

Re: card dealer

2013-09-27 Thread Ned Batchelder
On 9/27/13 12:10 PM, Denis McMahon wrote: On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades ago, which took an array of (52) unique items and put them in random order. Whenever I tried to write shuffles I came up against a fairly

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Νίκος
Στις 27/9/2013 8:00 μμ, ο/η Grant Edwards έγραψε: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2 variables(city and host). Does your

walking a heapq nondestructively without duplicating?

2013-09-27 Thread Tim Chase
I've got a large heapq'ified list and want to walk it in-order without altering it. I get the unsorted heap'ish results if I just do from heapq import heappush, heappop, nlargest, nsmallest my_heap = [] for thing in lots_of_items(): heappush(thing) for item in my_heap: ... To

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Dave Angel
On 27/9/2013 18:06, Νίκος wrote: city = Άγνωστη Πόλη host = Άγνωστη Προέλευση If they were to have the same string assigned to them it should be okey but they do not. Or perhaps you can even still think of writing the above into 1-liner whatsoever! I already did earlier in this

Re: walking a heapq nondestructively without duplicating?

2013-09-27 Thread Ned Batchelder
On 9/27/13 6:22 PM, Tim Chase wrote: I've got a large heapq'ified list and want to walk it in-order without altering it. I get the unsorted heap'ish results if I just do from heapq import heappush, heappop, nlargest, nsmallest my_heap = [] for thing in lots_of_items():

Help me with Python please (picture)

2013-09-27 Thread jae655
http://imgur.com/E6vrNs4 Can't seem to be getting an output. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help me with Python please (picture)

2013-09-27 Thread Gary Herron
On 09/27/2013 05:43 PM, jae...@gmail.com wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. Please find a way to include the code in the email. Also what evidence do you provide that it does not work? What happened when you ran it? What did you expect to happen? What

Re: Help me with Python please (picture)

2013-09-27 Thread Dave Angel
On 27/9/2013 20:43, jae...@gmail.com wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. Please compose a text message containing a description of the environment, the (small) code, and the expected results. This is a text mailing list, and posting transient images on

Re: Handling 3 operands in an expression without raising an exception

2013-09-27 Thread Chris Angelico
On Sat, Sep 28, 2013 at 8:06 AM, Νίκος nikos.gr...@gmail.com wrote: Well to tell the truth no matter what you say to me if something can be written in less lines than another implementation but still retain its simplicity and straightforward logic behind it i would prefer it! I don't know why

Re: Help me with Python please (picture)

2013-09-27 Thread Denis McMahon
On Fri, 27 Sep 2013 17:43:42 -0700, jae655 wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. I can't see where your output statements are. With no output statements, there is no output. perhaps you want to assign the result of the function call to a variable, and then

Re: Help me with Python please (picture)

2013-09-27 Thread John Ladasky
On Friday, September 27, 2013 5:43:42 PM UTC-7, jae...@gmail.com wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. Because you aren't printing anything! One possible way to fix that is to change the line which reads... random_characters(8) to read...

Python Unit Tests

2013-09-27 Thread melwin9
Hey, How do i go about coming up/coding tests for this program below. Not sure how to even approach writing about 5 tests for it. Initially I had this for the test but its not working well. Test was name test_guess.py (Code Below) [code] from unittest import TestCase import pexpect as pe

Re: Help me with Python please (picture)

2013-09-27 Thread Steven D'Aprano
On Fri, 27 Sep 2013 17:43:42 -0700, jae655 wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. The problem with your code has to do with the code between pixel coordinates (29, 234) and (175, 249) approximately. If you open your image in a pixel editor, copy and paste

Re: Help me with Python please (picture)

2013-09-27 Thread Chris Angelico
On Sat, Sep 28, 2013 at 3:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Could be worse -- at least you didn't take a photo of the screen with your phone, them email the picture to yourself, then take a screenshot of the photo in your mail client, then upload that screenshot

Re: Method not found: 'ServiceSettingSave' in Suds package

2013-09-27 Thread dieter
Anup Kandalkar kandalkar@gmail.com writes: I am trying to create service for the url: wsdl_url = https://avatax.avalara.net/Account/Accountsvc.wsdl But some error is coming: svc = suds.client.Client(url=wsdl_url) File /usr/lib/python2.7/dist-packages/suds/client.py, line

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2013-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9325 ___

[issue18864] Implementation for PEP 451 (importlib.machinery.ModuleSpec)

2013-09-27 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18864 ___ ___

[issue19099] struct.pack fails first time with unicode fmt

2013-09-27 Thread Musashi Tamura
New submission from Musashi Tamura: C:\python Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit AMD64)] on win32 Type help, copyright, credits or license for more information. import struct struct.pack(u'B',1) Traceback (most recent call last): File stdin, line 1, in module

[issue19100] Use backslashreplace in pprint

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently pprint.pprint() fails on unencodable characters. $ LANG=en_US.utf8 ./python -c import pprint; pprint.pprint('\u20ac') '€' $ LANG= ./python -c import pprint; pprint.pprint('\u20ac') Traceback (most recent call last): File string, line 1, in

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Larry Hastings
New submission from Larry Hastings: Can you fix this before I tag 3.4a3 please? -- assignee: pitrou components: Build keywords: buildbot messages: 198466 nosy: larry, pitrou priority: high severity: normal stage: needs patch status: open title: make touch broke x86 Ubuntu Shared 3.x

[issue19102] Add tests for CLI of the tabnanny module

2013-09-27 Thread Berker Peksag
New submission from Berker Peksag: I was trying to use the argparse module instead of getopt and I couldn't find any tests for CLI of the tabnanny module. -- components: Tests files: test_tabnanny.diff keywords: patch messages: 198467 nosy: berker.peksag priority: low severity: normal

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: pprint.pprint() produces more human readable output than print(repr()) which is used in sys.displayhook(). The proposed patch changes sys.displayhook in site.py. You still can access original displayhook as sys.__displayhook__. -- files:

[issue19009] Enhance HTTPResponse.readline() performance

2013-09-27 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: A new patch set, in response to Serhiy's comments on Rietveld. -- Added file: http://bugs.python.org/file31884/httpresponse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19009

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: When pointing to a buildbot, please remember posting a URL, it makes things easier :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Larry Hastings
Larry Hastings added the comment: Sorry, here: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Haha, thank you. So, this is the exact same problem that running hg touch on the buildbots was supposed to prevent :-) Well, at least the fix should be next to trivial. -- components: +Demos and Tools -Build keywords: +easy versions: +Python 2.7,

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: ac5343148fb3 -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The documentation says: The pprint module provides a capability to “pretty-print” arbitrary Python data structures in a form which can be used as input to the interpreter. But #since issue17150 long lines are splitted on shorter lines without continuation

[issue19105] pprint doesn't use all width

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: pprint not only adds indentation, but also increases right margin for nested items. pprint.pprint([' '.join(str(i) for i in range(30))]*2) ['0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ' '28 29', '0 1 2 3 4 5 6 7 8 9 10 11

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: This should be fixed in 2.7 too. -- assignee: pitrou - benjamin.peterson status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In second patch the COLUMNS environment variable is used to determine pprint's width. -- Added file: http://bugs.python.org/file31885/displayhook_pprint_2.patch ___ Python tracker rep...@bugs.python.org

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread R. David Murray
R. David Murray added the comment: FYI this defect was mentioned (by Antoine) in Issue17530, though that issue is about bytes. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19104

[issue19101] make touch broke x86 Ubuntu Shared 3.x buildbot

2013-09-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2.7 doesn't have hgtouch. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19101 ___

[issue17530] pprint could use line continuation for long bytes literals

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17530 ___ ___

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David. In any case this is worth a separate issue. Here is a patch. Personally I prefer to add continuation backslash even for inner wrapped lines, but I'm not sure that most core developers will agreed with it. -- keywords: +patch stage:

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Use backslashreplace in pprint, pprint produces invalid output for long strings ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19103

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-27 Thread Martijn Pieters
Martijn Pieters added the comment: Note: there is a comment explaining the point of _RouteClassAttributeToGetattr right above the Enum.name and Enum.value methods you changed (now at line 474). You may want to update that comment now. -- nosy: +mjpieters

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
New submission from Eli Bendersky: Background: we'd like to enable running 'make touch' on the bots before 'make -jN', to avoid problems with scripts that auto-generate code for the Python build (bootstrapping). pydev thread:

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-27 Thread Stefan Behnel
New submission from Stefan Behnel: The perf.py script opens the file for CSV output in binary mode, which no longer works in Py3: Index: perf.py === --- perf.py (Revision 80409) +++ perf.py (Arbeitskopie) @@ -2443,7

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-27 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +brett.cannon, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19107 ___ ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac19ff225280 by Eli Bendersky in branch 'default': Fix .hgtouch to list the dependencies for auto-generated AST code correctly. http://hg.python.org/cpython/rev/ac19ff225280 -- nosy: +python-dev ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- Removed message: http://bugs.python.org/msg198484 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016 ___

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: .hgtouch fixed in ac19ff225280 (I specified the issue number incorrectly so this one wasn't notified). Curiously, `make touch` seems to think there's still things to do even after the first round of touching: $ touch Parser/asdl_c.py $ make touch hg --config

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Michael Foord
Michael Foord added the comment: I dislike adding namedtuple specific code to mock. How many different types should we special case here and in other places? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-09-27 Thread Stefan Behnel
New submission from Stefan Behnel: In changeset 88b6ef9aa9e9, a new function ported_lib() was added that crashes on error reporting in Py3 because it tries to do this: raise RuntimeError(Benchmark died: + err) err is a bytes object that comes straight from the subprocess pipe. The

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to PEP 8, parentheses should be used for multi-line expressions, not backslashes: The preferred way of wrapping long lines is by using Python's implied line continuation inside parentheses, brackets and braces. Long lines can be broken over

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: Ooh, I think that's because the # try processing all rules in topological order in do_touch doesn't actually topo-sort. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19106

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Second path uses parentheses. It is more complicated than first patch. I prefer first patch, because it is simple, because second variant wastes more width, because parentheses looks too similar to tuple, and because implicit string literal concatenation

[issue19106] Prepare .hgtouch and Tools/hg/hgtouch.py to run on the bots

2013-09-27 Thread Eli Bendersky
Eli Bendersky added the comment: The problem in this case is different, actually. It's the comparison: if o_time = i_time: # generated file is older, touch need_touch = True In check_rule. The script is pretty quick so when it touches both Python-ast.h and .c

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: implicit string literal concatenation considered harmful Both patches rely on implicit string literal concatenation. Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them.

[issue19094] urljoin should raise a TypeError if URL is not a string

2013-09-27 Thread Jason R. Coombs
Jason R. Coombs added the comment: I don't mind the AttributeError - that's a reasonable exception when passing invalid types in, and that's in fact the current behavior. The example of (['a'], []) does bother me though. Those inputs are also seemingly invalid, though somewhat more compatible

[issue19104] pprint produces invalid output for long strings

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both patches rely on implicit string literal concatenation. But with backslash it *looks* less implicit. Another possibility is not fixing this issue, and deciding it is normal behaviour. It is trivial to add parentheses if you need them. It would be

  1   2   >