sqlparse 0.1.9

2013-09-29 Thread Andi Albrecht
I'm pleased to announce sqlparse 0.1.9! Changes since last version: Bug Fixes * Fix an regression introduced in 0.1.5 where sqlparse didn't properly distinguished between single and double quoted strings when tagging identifier (issue111). Enhancements * New option to truncate long string

numba 0.11

2013-09-29 Thread Jay Bourque
Numba 0.11 is now available which brings experimental support for NumPy datetime64 and timedelta64 types with Numba's nopython mode. Supported functionality includes NumPy datetime and timedelta objects as numba function arguments and return values, creating new datetime and timedelta objects

ANN: psutil 1.1.0 released

2013-09-29 Thread Giampaolo Rodola'
Hi there folks, I'm pleased to announce the 1.1.0 release of psutil: http://code.google.com/p/psutil/ === About === psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, memory, disks, network, users) in a portable way by using

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

2013-09-29 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

[RELEASED] Python 3.4.0a3

2013-09-29 Thread Larry Hastings
On behalf of the Python development team, I'm pleased to announce the third alpha release of Python 3.4. This is a preview release, and its use is not recommended for production settings. Python 3.4 includes a range of improvements of the 3.x series, including hundreds of small improvements and

Re: Help me with Python please (picture)

2013-09-29 Thread Bob Martin
in 706312 20130928 175017 Joel Goldstick joel.goldst...@gmail.com wrote: --047d7bf0f67adc8dbc04e7746532 Content-Type: text/plain; charset=UTF-8 Please don't post HTML. -- https://mail.python.org/mailman/listinfo/python-list

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

2013-09-29 Thread Νίκος
Στις 29/9/2013 2:04 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 4:45 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Not tortured, simply murdered so we don't have to put up with his completely unacceptable behaviour, which sadly is thriving owing to so many people ignoring the do

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Hello although my code is correct just today i saw this in the error_log [Sun Sep 29 07:44:43 2013] [error] [client 173.245.49.126] Traceback (most recent call last): [Sun Sep 29 07:44:43 2013] [error] [client 173.245.49.126] File /home/nikos/public_html/cgi-bin/metrites.py, line 30, in

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 5:49 PM, Νίκος nikos.gr...@gmail.com wrote: Hello although my code is correct just today i saw this in the error_log You retain this ridiculous arrogance that your code is somehow correct, despite the problems you continually face. Do not these problems prove that your

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 10:49 πμ, ο/η Νίκος έγραψε: Hello although my code is correct just today i saw this in the error_log [Sun Sep 29 07:44:43 2013] [error] [client 173.245.49.126] Traceback (most recent call last): [Sun Sep 29 07:44:43 2013] [error] [client 173.245.49.126] File

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 10:53 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 5:49 PM, Νίκος nikos.gr...@gmail.com wrote: Hello although my code is correct just today i saw this in the error_log You retain this ridiculous arrogance that your code is somehow correct, despite the problems you

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 5:53 PM, Νίκος nikos.gr...@gmail.com wrote: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte Something's trying to decode a stream of bytes as UTF-8, and it's not UTF-8. Work out what in your code is bytes and what is

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 11:00 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 5:53 PM, Νίκος nikos.gr...@gmail.com wrote: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte Something's trying to decode a stream of bytes as UTF-8, and it's not UTF-8.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 6:04 PM, Νίκος nikos.gr...@gmail.com wrote: How come all these daysthe followinf line work as expected: host = socket.gethostbyaddr( ipval ) [0] and only just today just happened to output: Maybe the ipval is different. Maybe something else is causing the error. I

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 11:07 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 6:04 PM, Νίκος nikos.gr...@gmail.com wrote: How come all these daysthe followinf line work as expected: host = socket.gethostbyaddr( ipval ) [0] and only just today just happened to output: Maybe the ipval is

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 6:19 PM, Νίκος nikos.gr...@gmail.com wrote: ipval is suposed to get just an ip address. ip addresses doesnt change its just number seperated by dots. That's one way an IP address can be rendered. It's not the only one. There's an entire category of IP addresses that's

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 11:23 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 6:19 PM, Νίκος nikos.gr...@gmail.com wrote: ipval is suposed to get just an ip address. ip addresses doesnt change its just number seperated by dots. That's one way an IP address can be rendered. It's not the only

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 11:30 πμ, ο/η Νίκος έγραψε: Στις 29/9/2013 11:23 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 6:19 PM, Νίκος nikos.gr...@gmail.com wrote: ipval is suposed to get just an ip address. ip addresses doesnt change its just number seperated by dots. That's one way an IP

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

2013-09-29 Thread Jussi Piitulainen
Νίκος writes: And i don't mean like this: if not city: city =blabla if not host: host=blablabla Can thes be witten without and if perhaps with the use of 'or' operator in 1-line within the except clause? try: ... except socket.gaierror as e: # watch out, a

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

2013-09-29 Thread Steven D'Aprano
On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote: try: ... except socket.gaierror as e: # watch out, a composition of bad advice (on demand) city, host = ( ('city' in locals() or blabla), ('host' in locals() or blablabla) ) Bad advice, and buggy as well.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Steven D'Aprano
On Sun, 29 Sep 2013 11:37:14 +0300, Νίκος wrote: Στις 29/9/2013 11:30 πμ, ο/η Νίκος έγραψε: Στις 29/9/2013 11:23 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 6:19 PM, Νίκος nikos.gr...@gmail.com wrote: ipval is suposed to get just an ip address. ip addresses doesnt change its just

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

2013-09-29 Thread Dave Angel
On 29/9/2013 03:35, Νίκος wrote: 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 = gi.time_zone_by_addr( ipval ) host = socket.gethostbyaddr( ipval ) [0]

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

2013-09-29 Thread Νίκος
Στις 29/9/2013 12:50 μμ, ο/η Dave Angel έγραψε: 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 = gi.time_zone_by_addr( ipval ) host = socket.gethostbyaddr(

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 12:45 μμ, ο/η Steven D'Aprano έγραψε: On Sun, 29 Sep 2013 11:37:14 +0300, Νίκος wrote: Στις 29/9/2013 11:30 πμ, ο/η Νίκος έγραψε: Στις 29/9/2013 11:23 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 6:19 PM, Νίκος nikos.gr...@gmail.com wrote: ipval is suposed to get

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Ned Batchelder
On 9/29/13 4:04 AM, Νίκος wrote: Στις 29/9/2013 11:00 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 5:53 PM, Νίκος nikos.gr...@gmail.com wrote: Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte Something's trying to decode a stream of

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

2013-09-29 Thread Dave Angel
On 29/9/2013 06:17, Νίκος wrote: Στις 29/9/2013 12:50 μμ, ο/η Dave Angel έγραψε: 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 = gi.time_zone_by_addr( ipval )

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

2013-09-29 Thread Antoon Pardon
Op 29-09-13 09:35, Νίκος schreef: Στις 29/9/2013 2:04 πμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 4:45 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Not tortured, simply murdered so we don't have to put up with his completely unacceptable behaviour, which sadly is thriving owing

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

2013-09-29 Thread Jussi Piitulainen
Steven D'Aprano writes: On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote: try: ... except socket.gaierror as e: # watch out, a composition of bad advice (on demand) city, host = ( ('city' in locals() or blabla), ('host' in locals() or blablabla) )

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

2013-09-29 Thread Νίκος
Στις 29/9/2013 12:50 μμ, ο/η Dave Angel έγραψε: 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 = gi.time_zone_by_addr( ipval ) host = socket.gethostbyaddr(

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Dave Angel
On 29/9/2013 06:24, Νίκος wrote: snip except Exception as e: === except socket.gaierror as e: which cannot handle unicore realted errors and the exact same error appeared with my ip address involved at the error log. so, the question that arises again and reamins is how come 'host'

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

2013-09-29 Thread Νίκος
Στις 29/9/2013 2:04 μμ, ο/η Jussi Piitulainen έγραψε: Steven D'Aprano writes: On Sun, 29 Sep 2013 12:35:17 +0300, Jussi Piitulainen wrote: try: ... except socket.gaierror as e: # watch out, a composition of bad advice (on demand) city, host = ( ('city' in locals() or blabla),

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

2013-09-29 Thread Dave Angel
On 29/9/2013 07:14, Νίκος wrote: Dave's way though seems better. Assign the vars default string and if they get re-assinged correctly that would be ideal, otherwise we have already given them the defaults. ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR',

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 2:11 μμ, ο/η Dave Angel έγραψε: On 29/9/2013 06:24, Νίκος wrote: snip except Exception as e: === except socket.gaierror as e: which cannot handle unicore realted errors and the exact same error appeared with my ip address involved at the error log. so, the question that

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

2013-09-29 Thread Νίκος
Στις 29/9/2013 2:27 μμ, ο/η Dave Angel έγραψε: On 29/9/2013 07:14, Νίκος wrote: Dave's way though seems better. Assign the vars default string and if they get re-assinged correctly that would be ideal, otherwise we have already given them the defaults. ipval = (

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Dave Angel
On 29/9/2013 07:25, Νίκος wrote: Thank you for being willing to look this further. Willing, but probably not able. I think I know a lot about the language, and less about the libraries. I know very little about the administration side of internet use. The reference to /etc/hosts is only a

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 2:46 μμ, ο/η Dave Angel έγραψε: On 29/9/2013 07:25, Νίκος wrote: Thank you for being willing to look this further. Willing, but probably not able. I think I know a lot about the language, and less about the libraries. I know very little about the administration side of

Re: Aide pour bien démarrer en Python

2013-09-29 Thread Laurent Pointal
note pour les francophones il existe le newsgroup fr.comp.lang.python ainsi que la liste Python de l'AFUL https://listes.aful.org/wws/info/python et l'AFPY... jonathan.corriv...@gmail.com wrote: Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment du mal à voir

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

2013-09-29 Thread Jussi Piitulainen
Νίκος writes: Σ�ις 29/9/2013 2:04 μμ, ο/η Jussi Piitulainen έγ�α�ε: Let's see. The task is to assign a default value to city and host, if they haven't a value yet; on one line (which I take to mean one statement); in an except block where we may not know which assignment failed in the

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris “Kwpolska” Warrick
On Sun, Sep 29, 2013 at 1:51 PM, Νίκος nikos.gr...@gmail.com wrote: Στις 29/9/2013 2:46 μμ, ο/η Dave Angel έγραψε: On 29/9/2013 07:25, Νίκος wrote: Thank you for being willing to look this further. Willing, but probably not able. I think I know a lot about the language, and less about

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

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 8:57 PM, Dave Angel da...@davea.name wrote: Try help(globals()) at the interpreter prompt. Help on built-in function globals in module builtins: globals(...) globals() - dictionary Return the dictionary containing the current scope's global variables.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 10:38 PM, Chris “Kwpolska” Warrick kwpol...@gmail.com wrote: I can point you to “find a sysadmin that will work for you and fix your problems for money”. Where can you find one? That’s not a question for me. I suggest looking around Greek websites, as someone

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Steven D'Aprano
On Sun, 29 Sep 2013 06:53:27 -0400, Ned Batchelder wrote: This is the nature of Unicode pain in Python 2 (Python 3 has a different kind!). This may help you understand what's going on: http://nedbatchelder.com/text/unipain.html That's a fantastic explanation, and I have pointed Nikos at that

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Chris Angelico
On Sun, Sep 29, 2013 at 9:25 PM, Νίκος nikos.gr...@gmail.com wrote: superhost.gr. 14400 IN MX 0 superhost.gr. mail14400 IN CNAME superhost.gr. As for the mail iam afrid it outputs this: Code: Warning MX CNAME Check WARNING: CNAME was returned for the

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

2013-09-29 Thread giacomo boffi
Νίκος nikos.gr...@gmail.com writes: IF it can also be written in one-line def f(x,n,w):return(lambda y=f(x[::2],n/2,w[::2]),z=f(x[1::2],n/2,w[::2]):reduce(lambda x,y:x+y,zip(*[(y[k]+w[k]*z[k],y[k]-w[k]*z[k]) for k in range(n/2)])))()if n1 else x -- anch'io la penso come me, ma

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

2013-09-29 Thread Joel Goldstick
On Sun, Sep 29, 2013 at 11:28 AM, giacomo boffi pec...@pascolo.net wrote: Νίκος nikos.gr...@gmail.com writes: IF it can also be written in one-line def f(x,n,w):return(lambda y=f(x[::2],n/2,w[::2]),z=f(x[1::2],n/2,w[::2]):reduce(lambda x,y:x+y,zip(*[(y[k]+w[k]*z[k],y[k]-w[k]*z[k]) for k

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 5:19 μμ, ο/η Chris Angelico έγραψε: On Sun, Sep 29, 2013 at 9:25 PM, Νίκος nikos.gr...@gmail.com wrote: superhost.gr. 14400 IN MX 0 superhost.gr. mail14400 IN CNAME superhost.gr. As for the mail iam afrid it outputs this: Code: Warning MX CNAME

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Joel Goldstick
asked and answered. Move on -- https://mail.python.org/mailman/listinfo/python-list

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

2013-09-29 Thread Chris Angelico
On Mon, Sep 30, 2013 at 2:07 AM, Joel Goldstick joel.goldst...@gmail.com wrote: Here's my question: I wonder if Nikos has ever been employed to write software. If so, I wonder how long he lasted before he was let go. Unfortunately that proves nothing. My boss used to have another employee

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Νίκος
Στις 29/9/2013 7:14 μμ, ο/η Joel Goldstick έγραψε: asked and answered. Move on shut up. you are nothign but annoyance here. -- https://mail.python.org/mailman/listinfo/python-list

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

2013-09-29 Thread Piet van Oostrum
Antoon Pardon antoon.par...@rece.vub.ac.be writes: Why? What is so important about this particular way, that you are willing to spend/waste so much time on it? You act like someone who want to get from Brussels to London and when asked how to do that gets advise on how to take the boat or

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Terry Reedy
On 9/29/2013 6:53 AM, Ned Batchelder wrote: This is the nature of Unicode pain in Python 2 (Python 3 has a different kind!). This may help you understand what's going on: http://nedbatchelder.com/text/unipain.html This is really excellent and I bookmarked it. There is one minor error: the

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

2013-09-29 Thread MRAB
On 29/09/2013 18:24, Piet van Oostrum wrote: Antoon Pardon antoon.par...@rece.vub.ac.be writes: Why? What is so important about this particular way, that you are willing to spend/waste so much time on it? You act like someone who want to get from Brussels to London and when asked how to do

[ANN] ftputil 3.0a1 released

2013-09-29 Thread Stefan Schwarzer
ftputil 3.0a1 is now available from http://ftputil.sschwarzer.net/download . Changes since version 2.8 - Note: This version of ftputil is _not_ backward-compatible with earlier versions.See the links below for information on adapting existing client code. - This version

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

2013-09-29 Thread Joel Goldstick
On Sun, Sep 29, 2013 at 1:44 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 29/09/2013 18:24, Piet van Oostrum wrote: Antoon Pardon antoon.par...@rece.vub.ac.be writes: Why? What is so important about this particular way, that you are willing to spend/waste so much time on it? You act like

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

2013-09-29 Thread Gene Heskett
On Sunday 29 September 2013 13:03:17 Chris Angelico did opine: On Mon, Sep 30, 2013 at 2:07 AM, Joel Goldstick joel.goldst...@gmail.com wrote: Here's my question: I wonder if Nikos has ever been employed to write software. If so, I wonder how long he lasted before he was let go.

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Ned Batchelder
On 9/29/13 1:30 PM, Terry Reedy wrote: On 9/29/2013 6:53 AM, Ned Batchelder wrote: This is the nature of Unicode pain in Python 2 (Python 3 has a different kind!). This may help you understand what's going on: http://nedbatchelder.com/text/unipain.html This is really excellent and I

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

2013-09-29 Thread Denis McMahon
On Sun, 29 Sep 2013 13:17:36 +0300, Νίκος wrote: Στις 29/9/2013 12:50 μμ, ο/η Dave Angel έγραψε: 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: Handling 3 operands in an expression without raising an exception

2013-09-29 Thread Denis McMahon
On Sun, 29 Sep 2013 14:34:02 +0300, Νίκος wrote: Στις 29/9/2013 2:27 μμ, ο/η Dave Angel έγραψε: On 29/9/2013 07:14, Νίκος wrote: Dave's way though seems better. Assign the vars default string and if they get re-assinged correctly that would be ideal, otherwise we have already given them

Re: Nosetests

2013-09-29 Thread melwin9
I was actually able to fix the code and run it, now i need to run tests but idk what tests to write or how to even write it. [code] import random intro = 'I have chosen a number from 1-10' request = 'Guess a number: ' responseHigh = That's too high. responseLow = That's too low.

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

2013-09-29 Thread giacomo boffi
Joel Goldstick joel.goldst...@gmail.com writes: On Sun, Sep 29, 2013 at 11:28 AM, giacomo boffi pec...@pascolo.net wrote: Νίκος nikos.gr...@gmail.com writes: IF it can also be written in one-line def f(x,n,w):return(lambda y=f(x[::2],n/2,w[::2]),z=f(x[1::2],n/2,w

Re: Nosetests

2013-09-29 Thread Terry Reedy
On 9/29/2013 5:28 PM, melw...@gmail.com wrote: I was actually able to fix the code and run it, now i need to run tests but idk what tests to write or how to even write it. Two of us already gave you suggestions. I gave you a detailed re-write. [snip hard to test code] -- Terry Jan Reedy

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

2013-09-29 Thread giacomo boffi
giacomo boffi pec...@pascolo.net writes: it.comp.python oops, it.comp.LANG.python -- I do desire we may be better strangers. -- https://mail.python.org/mailman/listinfo/python-list

Barcode printing

2013-09-29 Thread Joseph L. Casale
I need to convert a proprietary MS Access based printing solution into something I can maintain. Seems there is plenty available for generating barcodes in Python, so for the persons who have been down this road I was hoping to get a pointer or two. I need to create some type of output,

Re: Barcode printing

2013-09-29 Thread Gary Herron
On 09/29/2013 02:54 PM, Joseph L. Casale wrote: I need to convert a proprietary MS Access based printing solution into something I can maintain. Seems there is plenty available for generating barcodes in Python, so for the persons who have been down this road I was hoping to get a pointer or

[RELEASED] Python 3.4.0a3

2013-09-29 Thread Larry Hastings
On behalf of the Python development team, I'm pleased to announce the third alpha release of Python 3.4. This is a preview release, and its use is not recommended for production settings. Python 3.4 includes a range of improvements of the 3.x series, including hundreds of small improvements and

Re: Barcode printing

2013-09-29 Thread Ben Finney
Joseph L. Casale jcas...@activenetwerx.com writes: I need to create some type of output, preferably pdf, which is an array of 2 across by 8 long of one custom barcode label with some other text components oriented around the barcode. The Reportlab library is a powerful PDF-creation library

Re: Python Unit Tests

2013-09-29 Thread melwin9
Hi Terry Dave, Thanks for the suggestions. I am running Python 2.7 and when I tried the code above it said def main(target) - invalid syntax. I was told to use pexpect by my professor which is why I started to use that for the tests. As for the test suggestions, I will try to come up wit

Re: Python Unit Tests

2013-09-29 Thread Steven D'Aprano
On Sun, 29 Sep 2013 18:46:30 -0700, melwin9 wrote: Hi Terry Dave, Thanks for the suggestions. I am running Python 2.7 and when I tried the code above it said def main(target) - invalid syntax. Did you fix the invalid syntax? Until you fix it, you're blocked. As a programmer, it is

Re: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

2013-09-29 Thread Larry Hudson
On 09/29/2013 09:19 AM, Νίκος wrote: Στις 29/9/2013 7:14 μμ, ο/η Joel Goldstick έγραψε: asked and answered. Move on shut up. you are nothign but annoyance here. Thanks for the laugh. Absolutely the most hilarious thing you've ever posted!!! :-) (Ever hear about the pot and the kettle?)

Re: Barcode printing

2013-09-29 Thread Ben Finney
Ben Finney ben+pyt...@benfinney.id.au writes: Joseph L. Casale jcas...@activenetwerx.com writes: I need to create some type of output, preferably pdf, which is an array of 2 across by 8 long of one custom barcode label with some other text components oriented around the barcode. The

Re: Understanding how is a function evaluated using recursion

2013-09-29 Thread rusi
On Thursday, September 26, 2013 4:54:22 AM UTC+5:30, Arturo B wrote: So I know what recursion is, but I don't know how is flatten(i) evaluated, what value does it returns? There is a folklore in CS that recursion is hard [To iterate is human, to recurse divine --

Re: Python Unit Tests

2013-09-29 Thread melwin9
Hi Dave, Yeah I found the silly mistake lol thanks for that. making progress. Guess a number: 5 That's too high. Guess a number: 4 That's too high. Guess a number: 3 Traceback (most recent call last): File guess.py, line 34, in module main(random.randint(1, 10)) File guess.py, line 29,

Tab completion in Python3.4

2013-09-29 Thread Steven D'Aprano
By default, Python 3.4 will ship with tab completion turned on. When you hit the tab key, Python will try to complete the current function, method, variable or other name, if necessary displaying the alternatives is there are more than one: py d = {} py d.pop d.pop( d.popitem( This

[issue19110] PEP-0 history link is broken

2013-09-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 281608674f63 by Ned Deily in branch 'default': Issue #19110: Suppress PEP 0 Last-Modified link in pep2pyramid, too http://hg.python.org/peps/rev/281608674f63 -- ___ Python tracker rep...@bugs.python.org

[issue19110] PEP-0 history link is broken

2013-09-29 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. The PEP 0 page now no longer contains a link: since it is automatically generated, there is no corresponding file for it in the peps repo. -- nosy: +ned.deily stage: - committed/rejected ___

[issue19078] Allow reversed(memoryview), like memoryview

2013-09-29 Thread Claudiu.Popa
Claudiu.Popa added the comment: For multidimensional arrays it doesn't seem to work (yet). x = numpy.array([[1,2,3], [4,5,6]]) list(reversed(x)) [array([4, 5, 6]), array([1, 2, 3])] x.data memory at 0x8032d06b8 list(reversed(x.data)) Traceback (most recent call last): File stdin, line 1,

[issue19110] PEP-0 history link is broken

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: Cool. Even if it is automatically generated, it may worth to commit this file anyway to get browsable HG history about PEP additions/removals. -- ___ Python tracker rep...@bugs.python.org

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: I tested with 2.7 and 3.3, but this is true for any version. If the bug is actual for Python 2.6, 3.1 and 3.2 why should I uncheck them? Versions field description doesn't say that I should mark only latest change. In addition, people (unlikely, but still)

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The versions are the versions that will be patched for the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___

[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser

2013-09-29 Thread Stefan Behnel
Stefan Behnel added the comment: Given that the inheritance chain has no real user impact, I can live with this difference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___

[issue19121] Documentation guidelines enhancements

2013-09-29 Thread anatoly techtonik
New submission from anatoly techtonik: I'll raise some points and then suggest how to fix that. issue19060 it appeared that list of functions that subprocess replaces imbues readers with uncertainty, because this list is not complete. Current http://docs.python.org/devguide/documenting.html

[issue19060] docs: note that subprocess doesn't replace os.exec*

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: I would like to know if the list is complete too. It would be extremely awesome if it was complete. This raises a side issue that there seems no guideline to write unambiguous and complete documentation. I spammed the tracker with this stuff in issue19121.

[issue19060] docs: note that subprocess doesn't replace os.exec*

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: On Sat, Sep 28, 2013 at 10:30 PM, Terry J. Reedy rep...@bugs.python.org wrote: If a sentence were added, I would simplify it to It does not replace os.exec*. or perhaps os.fork and os.exec*.. I prefer list. It is easier to scan:

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: It should be documented somehow then. At least in the field tooltip. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19066 ___

[issue19121] Documentation guidelines enhancements

2013-09-29 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19121 ___ ___ Python-bugs-list

[issue1764286] inspect.getsource does not work with decorated functions

2013-09-29 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. Attached patch which uses the new inspect.unwrap, added in http://hg.python.org/cpython/rev/2aa6c1e35b8a. -- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file31902/inspect_getsource.patch

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2013-09-29 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +daniel.urban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19072 ___ ___

[issue19122] duplicate test name in Lib/test/test_import.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_import.py:255 ImportTests.test_import_name_binding Attached patch fixes it. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198576 nosy: brett.cannon, xdegaye priority:

[issue19123] duplicate test name in Lib/test/test_regrtest.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_regrtest.py:210 ParseArgsTestCase.test_findleaks Attached patch fixes it. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198577 nosy: ezio.melotti, michael.foord,

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
New submission from anatoly techtonik: os.execv() starts process in background on Windows. Because it inherits stdin/stdout handlers from the process that launched Python interpreter, this becomes a source of numerous weird bugs, from polluting the stdout stream of parent to completely

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: s/same behavior/same command/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___ ___ Python-bugs-list

[issue19124] os.execv executes in background on Windows

2013-09-29 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: Added file: http://bugs.python.org/file31905/testexecvchild.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19124 ___

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: See http://bugs.python.org/issue436259 This is a problem with Window's implementation of spawn*() and exec*(). Just use subprocess instead which gets this stuff right. Note that on Windows exec*() is useless: it just starts a subprocess and exits the

[issue19125] duplicate test name in Lib/test/test_smtplib.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_smtplib.py:249 DebuggingServerTests.testNotImplemented Attached patch fixes this: the first method has been renamed to testEHLO since the channel_class of the DebuggingServer is SMTPChannel, and SMTPChannel does support

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread anatoly techtonik
anatoly techtonik added the comment: On Sun, Sep 29, 2013 at 2:05 PM, Richard Oudkerk rep...@bugs.python.org wrote: See http://bugs.python.org/issue436259 I am not sure that I should see there. There is discussion of DOS, which is not supported, also some complain about Windows execv

[issue19126] duplicate test name in Lib/test/test_webbrowser.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_webbrowser.py:161 OperaCommandTest.test_open_new Attached patch fixes it. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198583 nosy: georg.brandl, xdegaye priority:

[issue19127] duplicate test name in Lib/xml/dom/minidom.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/xml/dom/minidom.py:379 Attr._get_name -- components: Library (Lib) messages: 198584 nosy: xdegaye priority: normal severity: normal status: open title: duplicate test name in Lib/xml/dom/minidom.py type: behavior

[issue19128] duplicate test name in Mac/Tools/Doc/setup.py

2013-09-29 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Mac/Tools/Doc/setup.py:123 DocBuild.makeHelpIndex -- components: Library (Lib) messages: 198585 nosy: hynek, ned.deily, ronaldoussoren, xdegaye priority: normal severity: normal status: open title: duplicate test name in

[issue16079] list duplicate test names with patchcheck

2013-09-29 Thread Xavier de Gaye
Xavier de Gaye added the comment: The following issues have been entered for all the above duplicate names found by duplicate_code_names_2.py: issue 19112, issue 19113, issue 19114, issue 19115, issue 19116, issue 19117, issue 19118, issue 19119, issue 19122, issue 19123, issue 19125, issue

[issue19066] os.execv fails with spaced names on Windows

2013-09-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: I am not sure that I should see there. There is discussion of DOS, which is not supported, also some complain about Windows execv function, which deprecated since VC++ 2005 (which I hope also not supported). Can you be more specific? _spawn*() and _exec*()

  1   2   3   >