Re: strange behavor....

2010-11-14 Thread Arnaud Delobelle
Dennis Lee Bieber wlfr...@ix.netcom.com writes: On Sat, 13 Nov 2010 23:14:22 +, Arnaud Delobelle arno...@gmail.com declaimed the following in gmane.comp.python.general: Two occurences of the name a belong to the same namespace Pardon? By definition, any given namespace can

Noob question on 2 vs 3 Python releases

2010-11-14 Thread Franck Ditter
Pardon my noobness (?) but why is there a 2.x and 3.x development teams working concurrently in Python ? I hardly saw that in other languages. Which one should I choose to start with, to cope with the future ? Isn't 3.x supposed to extend 2.y ? This situation is very strange... Thanks for your

Re: Noob question on 2 vs 3 Python releases

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 1:03 AM, Franck Ditter fra...@ditter.org wrote: Pardon my noobness (?) but why is there a 2.x and 3.x development teams working concurrently in Python ? I hardly saw that in other languages. You haven't heard of the infamous Perl 6? Which one should I choose to start

Re: Copy Protected PDFs and PIL

2010-11-14 Thread Alexander Gattin
Hello, On Fri, Nov 12, 2010 at 12:00:55PM -0800, Brett Bowman wrote: MRAB - I've tried worker threads, and it kills the thread only and not the program as a whole. I could use that as a work-around, but I would prefer something more direct, in case other problems arise. Looks like the gfx

NAUGHTY GIRL, WANNA NAUGHTY WITH ME, COME ON...really free...

2010-11-14 Thread naughty girl
NAUGHTY GIRL, WANNA NAUGHTY WITH ME, COME ON...really free... FREE GOLD MEMBER FOR FEMALE PROFILE, registar with female gender for free access http://goo.gl/1bour http://www.benaughty.com/aff.php?a_aid=27340f40a_bid=17a6530c -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking For Tutorial Comparison Of sh - perl - python

2010-11-14 Thread Martin Gregorie
On Sat, 13 Nov 2010 22:05:57 -0600, Tim Daneliuk wrote: I am putting together a comparison intro to each of sh, perl, python with a view towards addressing: Add awk / gawk to that list. IME its often the easiest and most concise way to process a text file, e.g. a log file, while applying

how to identify currently running threads QTHreads

2010-11-14 Thread News123
Hi I'm working with several persons on a PyQT python application. This application is using threads / QThreads in several places. When trying to quit the application it doesn't stop. I assume one thread / QThread did not stop. (wasn't declared as daemon thread) Is there a simple way in

Help: Guide needed in trying to delete/flush the content of a fifo file.

2010-11-14 Thread ton ph
Hi python geeks, I have problem which i have been trying to find out for the past some days, i have a device which feeds info to my fifo continuosly, and a thread of mine reads the fifo continuosly. Now when i change a parameter in the device, it sends me different values. Now my problem is

another newbie question

2010-11-14 Thread otenki
Hello Pythonistas! I'm trying to get floating point division to work; I'm using Python 2.6.5. When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. How can I rectify this? Sorry for this basic question, but I don't know where else to

Re: another newbie question

2010-11-14 Thread Nitin Pawar
From the error, you are importing wrong module which actually does not exists try importing something from maths On Sun, Nov 14, 2010 at 8:21 PM, otenki scott.stephen...@gmail.com wrote: Hello Pythonistas! I'm trying to get floating point division to work; I'm using Python 2.6.5. When I

Re: another newbie question

2010-11-14 Thread Tim Golden
On 14/11/2010 3:00 PM, Nitin Pawar wrote: I'm trying to get floating point division to work; I'm using Python 2.6.5. When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. How can I rectify this? That should be two underscores, not

Re: another newbie question

2010-11-14 Thread Peter Otten
otenki wrote: Hello Pythonistas! I'm trying to get floating point division to work; I'm using Python 2.6.5. When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. How can I rectify this? You need two leading/trailing underscores,

Re: another newbie question

2010-11-14 Thread David
On 15/11/2010, otenki scott.stephen...@gmail.com wrote: When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. The module name is __future__ Notice that there are 2 underscore characters before the word future and 2 after it. This is

Re: another newbie question

2010-11-14 Thread otenki
On Nov 14, 10:09 am, David bouncingc...@gmail.com wrote: On 15/11/2010, otenki scott.stephen...@gmail.com wrote: When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. The module name is __future__ Notice that there are 2

Why datetime module is so complicated?

2010-11-14 Thread Zeynel
It's about a week now I've been trying to convert a datetime object to seconds since epoch; the object is set to current time by class Rep() in Google App Engine: class Rep(db.Model): ... mCOUNT = db.IntegerProperty() mDATE0 = db.DateTimeProperty(auto_now_add=True) mWEIGHT =

Re: strange behavor....

2010-11-14 Thread Emile van Sebille
On 11/13/2010 3:28 PM Mark Wooding said... Steven D'Apranost...@remove-this-cybersource.com.au writes: On Sat, 13 Nov 2010 20:01:42 +, Mark Wooding wrote: Some object types are primitive, provided by the runtime system; there are no `internal' variables to be assigned in these cases.

Re: how to identify currently running threads QTHreads

2010-11-14 Thread Aahz
In article 4cdfe050$0$10182$426a3...@news.free.fr, News123 news1...@free.fr wrote: Is there a simple way in Python to identify all active Threads / QThreads when trying, such that I can locate the thread, itls related python code and fix it? threading.enumerate() or sys._current_frames() --

Re: another newbie question

2010-11-14 Thread Roy Smith
In article mailman.986.1289747396.2218.python-l...@python.org, David bouncingc...@gmail.com wrote: On 15/11/2010, otenki scott.stephen...@gmail.com wrote: When I enter 'from _future_ import division' at the command line, I get the ImportError, no module named _future_. The module name is

Re: Why datetime module is so complicated?

2010-11-14 Thread Diez B. Roggisch
Zeynel azeyn...@gmail.com writes: It's about a week now I've been trying to convert a datetime object to seconds since epoch; the object is set to current time by class Rep() in Google App Engine: class Rep(db.Model): ... mCOUNT = db.IntegerProperty() mDATE0 =

Re: Why datetime module is so complicated?

2010-11-14 Thread Vlastimil Brom
2010/11/14 Zeynel azeyn...@gmail.com: It's about a week now I've been trying to convert a datetime object to seconds since epoch; the object is set to current time by class Rep() in Google App Engine: class Rep(db.Model):    ...    mCOUNT = db.IntegerProperty()    mDATE0 =

raise Exception or raise Exception()

2010-11-14 Thread ernest
I have seen both forms and I'm not sure if they're both correct, or one is right and the other wrong. In practical terms, the two of them seem to have the same effect. Cheers, Ernest -- http://mail.python.org/mailman/listinfo/python-list

Re: raise Exception or raise Exception()

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 8:58 AM, ernest nfdi...@gmail.com wrote: I have seen both forms and I'm not sure if they're both correct, or one is right and the other wrong. They're both acceptable (although obviously you should always raise a more specific error than Exception). `raise SomeException`

Re: Help: Guide needed in trying to delete/flush the content of a fifo file.

2010-11-14 Thread MRAB
On 14/11/2010 14:48, ton ph wrote: Hi python geeks, I have problem which i have been trying to find out for the past some days, i have a device which feeds info to my fifo continuosly, and a thread of mine reads the fifo continuosly. Now when i change a parameter in the device, it sends me

Re: another newbie question

2010-11-14 Thread MRAB
On 14/11/2010 16:40, Roy Smith wrote: In articlemailman.986.1289747396.2218.python-l...@python.org, Davidbouncingc...@gmail.com wrote: On 15/11/2010, otenkiscott.stephen...@gmail.com wrote: When I enter 'from _future_ import division' at the command line, I get the ImportError, no module

subprocess pipe

2010-11-14 Thread Camille Harang
Hi all, I'm having a problem with subprocess.Popen. It seems that its unable to capture the pg_dump's standard inputs outputs in a non-shell mode: from subprocess import Popen, PIPE # fire pg_dump in order to read data from the file object pgsql.stdout pgsql = Popen(['/usr/bin/pg_dump',

Objects versus dictionaries

2010-11-14 Thread Micah Carrick
I'm writing a little API that other people will use. There are up to 3 objects that get passed around. One of them has some validation methods, the other two simply store data and probably won't have any validation or other methods. I only made them objects so that they are syntactically (is that

[Beginner question] Raster to ASCII

2010-11-14 Thread Becky Kern
Hi users, I'm using Python 2.5 (in concert with ArcGIS 9.3) to convert a raster to an ASCII file. I used the code (listed below) several weeks ago to successfully do the conversion, but when I tried to replicate it a few days ago, I got an error message. import arcgisscripting gp =

Getting references to objects without incrementing reference counters

2010-11-14 Thread Artur Siekielski
Hi. I'm using CPython 2.7 and Linux. In order to make parallel computations on a large list of objects I want to use multiple processes (by using multiprocessing module). In the first step I fill the list with objects and then I fork() my worker processes that do the job. This should work

Re: subprocess pipe

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 10:50 AM, Camille Harang mammi...@garbure.org wrote: Hi all, I'm having a problem with subprocess.Popen. It seems that its unable to capture the pg_dump's standard inputs outputs in a non-shell mode: from subprocess import Popen, PIPE # fire pg_dump in order to

Re: Objects versus dictionaries

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 11:00 AM, Micah Carrick mi...@greentackle.com wrote: I'm writing a little API that other people will use. There are up to 3 objects that get passed around. One of them has some validation methods, the other two simply store data and probably won't have any validation or

Re: subprocess pipe

2010-11-14 Thread Camille Harang
Hi Chris, thanks for your reply. Chris Rebert a écrit : Quoting http://docs.python.org/library/subprocess.html , emphasis mine: On Unix, with shell=True: [...] If args is a sequence, ***the first item*** specifies the command string, and any additional items will be treated as additional

Re: Objects versus dictionaries

2010-11-14 Thread Hidura
Use *kargs to pass all the informatio that you need if u want in the future extended this will be usefull 2010/11/14, Micah Carrick mi...@greentackle.com: I'm writing a little API that other people will use. There are up to 3 objects that get passed around. One of them has some validation

Re: [Beginner question] Raster to ASCII

2010-11-14 Thread MRAB
On 14/11/2010 19:07, Becky Kern wrote: Hi users, I'm using Python 2.5 (in concert with ArcGIS 9.3) to convert a raster to an ASCII file. I used the code (listed below) several weeks ago to successfully do the conversion, but when I tried to replicate it a few days ago, I got an error message.

Re: [Beginner question] Raster to ASCII

2010-11-14 Thread Tim Chase
On 11/14/2010 01:07 PM, Becky Kern wrote: import arcgisscripting gp = arcgisscripting.create(9.3) InRaster = C:/data/raster1 OutAsciiFile = C:/data/raster2ascii.asc gp.RasterToASCII_conversion(InRaster, OutAsciiFile) The error message: arcgisscripting.ExecuteError: Failed to execute.

Re: subprocess pipe

2010-11-14 Thread Tim Harig
On 2010-11-14, Camille Harang mammi...@garbure.org wrote: # pg_dump prompts for password so I inject it in stdin. pgsql.stdin.write('MY_PASSWORD' + '\n') For security reasons, some programs use direct access to the TTY system for password entry rather then reading from stdin. Most of these

Re: subprocess pipe

2010-11-14 Thread Tim Harig
On 2010-11-14, Tim Harig user...@ilthio.net wrote: On 2010-11-14, Camille Harang mammi...@garbure.org wrote: # pg_dump prompts for password so I inject it in stdin. pgsql.stdin.write('MY_PASSWORD' + '\n') For security reasons, some programs use direct access to the TTY system for password

Re: raise Exception or raise Exception()

2010-11-14 Thread Roy Smith
In article mailman.989.1289758489.2218.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 14, 2010 at 8:58 AM, ernest nfdi...@gmail.com wrote: I have seen both forms and I'm not sure if they're both correct, or one is right and the other wrong. They're both

Re: subprocess pipe

2010-11-14 Thread Camille Harang
Tim Harig a écrit : On 2010-11-14, Camille Harang mammi...@garbure.org wrote: # pg_dump prompts for password so I inject it in stdin. pgsql.stdin.write('MY_PASSWORD' + '\n') For security reasons, some programs use direct access to the TTY system for password entry rather then reading from

Re: subprocess pipe

2010-11-14 Thread Camille Harang
Tim Harig a écrit : On 2010-11-14, Camille Harang mammi...@garbure.org wrote: # pg_dump prompts for password so I inject it in stdin. pgsql.stdin.write('MY_PASSWORD' + '\n') For security reasons, some programs use direct access to the TTY system for password entry rather then reading from

Re: strange behavor....

2010-11-14 Thread Steve Holden
On 11/14/2010 8:29 AM, Emile van Sebille wrote: [...] We all know that _everything_ is a disguised method call and we call the disguised method call that resembles a statement where the LHS is separated from the RHS by a single equals sign assignment. I think your elided attempt to reconcile

Re: strange behavor....

2010-11-14 Thread Roel Schroeven
Op 2010-11-14 21:23, Steve Holden schreef: What method of a does the statement a = something call? I ask in genuine ignorance, and in the knowledge that you may indeed be able to point me to such a method. It wouldn't call a method of a. I'm not an expert in these matters, but I would

Re: Getting references to objects without incrementing reference counters

2010-11-14 Thread Jean-Paul Calderone
On Nov 14, 11:08 am, Artur Siekielski artur.siekiel...@gmail.com wrote: Hi. I'm using CPython 2.7 and Linux. In order to make parallel computations on a large list of objects I want to use multiple processes (by using multiprocessing module). In the first step I fill the list with objects and

Re: strange behavor....

2010-11-14 Thread Emile van Sebille
On 11/14/2010 12:23 PM Steve Holden said... On 11/14/2010 8:29 AM, Emile van Sebille wrote: [...] We all know that _everything_ is a disguised method call and we call the disguised method call that resembles a statement where the LHS is separated from the RHS by a single equals sign assignment.

Re: strange behavor....

2010-11-14 Thread Steven D'Aprano
On Sun, 14 Nov 2010 12:23:03 -0800, Steve Holden wrote: What method of a does the statement a = something call? I ask in genuine ignorance, and in the knowledge that you may indeed be able to point me to such a method. I know the question wasn't directed at me, but here's my 2 cents

Re: strange behavor....

2010-11-14 Thread Arnaud Delobelle
Steve Holden st...@holdenweb.com writes: On 11/14/2010 8:29 AM, Emile van Sebille wrote: [...] We all know that _everything_ is a disguised method call and we call the disguised method call that resembles a statement where the LHS is separated from the RHS by a single equals sign assignment.

Re: Looking For Tutorial Comparison Of sh - perl - python

2010-11-14 Thread Dan Stromberg
On Sun, Nov 14, 2010 at 5:00 AM, Martin Gregorie mar...@address-in-sig.invalid wrote: On Sat, 13 Nov 2010 22:05:57 -0600, Tim Daneliuk wrote: I am putting together a comparison intro to each of sh, perl, python with a view towards addressing: Add awk / gawk to that list. IME its often

What was your strategy?

2010-11-14 Thread Jorge Biquez
Hello all. Quick question. I know some of you are with Python since started, some other maybe later. I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). I mean did you use special books, special

Re: how to identify currently running threads QTHreads

2010-11-14 Thread News123
On 11/14/2010 05:32 PM, Aahz wrote: In article 4cdfe050$0$10182$426a3...@news.free.fr, News123 news1...@free.fr wrote: Is there a simple way in Python to identify all active Threads / QThreads when trying, such that I can locate the thread, itls related python code and fix it?

Re: What was your strategy?

2010-11-14 Thread Seebs
On 2010-11-14, Jorge Biquez jbiq...@icsmx.com wrote: I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). I mean did you use special books, special sites, a plan to learn each subject in a special

Re: Objects versus dictionaries

2010-11-14 Thread Dan Stromberg
On Sun, Nov 14, 2010 at 11:20 AM, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 14, 2010 at 11:00 AM, Micah Carrick mi...@greentackle.com wrote: I'm writing a little API that other people will use. There are up to 3 objects that get passed around. One of them has some validation

Re: What was your strategy?

2010-11-14 Thread James Harris
On Nov 14, 10:32 pm, Jorge Biquez jbiq...@icsmx.com wrote: Hello all. Quick question. I know some of you are with Python since started, some other maybe later. I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and

Fixing PDF EOF Errors with PyPDF

2010-11-14 Thread Brett Bowman
Hey all, I'm trying to read a library of my company's PDFs, but about a third of them can't be opened. PyPDF (v1.12) spits out this error: pyPdf.utils.PdfReadError: EOF marker not found I searched for the answer via google, but all I found was this link: http://lindaocta.com/?tag=pypdf. She

Re: namespace issue, Python vs numpy min/max problem

2010-11-14 Thread Gregory Ewing
Steven D'Aprano wrote: It only becomes your problem if you have advised people that the right way to use your module is with import *. And if you're advising people to do that, it would be an extremely good idea to give your functions different names so that they don't conflict with the

Re: Getting references to objects without incrementing reference counters

2010-11-14 Thread Dan Stromberg
On Sun, Nov 14, 2010 at 11:08 AM, Artur Siekielski artur.siekiel...@gmail.com wrote: Hi. I'm using CPython 2.7 and Linux. In order to make parallel computations on a large list of objects I want to use multiple processes (by using multiprocessing module). In the first step I fill the list

Re: What was your strategy?

2010-11-14 Thread Stef Mientki
On 14-11-2010 23:32, Jorge Biquez wrote: Hello all. Quick question. I know some of you are with Python since started, some other maybe later. I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). I

Re: What was your strategy?

2010-11-14 Thread Ben Finney
Jorge Biquez jbiq...@icsmx.com writes: I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). I mean did you use special books, special sites, a plan to learn each subject in a special way. I find that

Komodo 6, why Workspace Restore after every restart?

2010-11-14 Thread John Doe
Does Komodo have to be shut down individually every time I want to restart Windows XP? Is there some way to eliminate the persistent Workspace Restore error after every restart? I have tried setting it to restore files without asking, but that does not seem to work. Thanks. --

Re: Getting references to objects without incrementing reference counters

2010-11-14 Thread Diez B. Roggisch
Artur Siekielski artur.siekiel...@gmail.com writes: Hi. I'm using CPython 2.7 and Linux. In order to make parallel computations on a large list of objects I want to use multiple processes (by using multiprocessing module). In the first step I fill the list with objects and then I fork() my

Re: What was your strategy?

2010-11-14 Thread MRAB
On 14/11/2010 23:53, Ben Finney wrote: Jorge Biquezjbiq...@icsmx.com writes: I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). I mean did you use special books, special sites, a plan to learn each

Cash your skill in Management careers.

2010-11-14 Thread gaurav
Careers in Management work. Careers for your future. http://managementjobs.webs.com/hrm.htm http://topcareer.webs.com/businessmanagement.htm Fresh coming up complete government career, computer jobs. http://rojgars1.webs.com/gov.htm http://printmediajobs.webs.com/fl.htm --

QT window closes immediately

2010-11-14 Thread Martin Caum
I am attempting to open a window on mouse activity which works, but the window fails to stay open. I set it to terminate when the escape key is pressed even when the program is not currently selected. This works fine. Originally I had it create the window only with a right click, but when I

Re: What was your strategy?

2010-11-14 Thread Paul Rubin
Jorge Biquez jbiq...@icsmx.com writes: I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). 1. Read the tutorial http://docs.python.org/tutorial/ 2. Start writing code, and encounter various issues as

Re: What was your strategy?

2010-11-14 Thread rustom
Jorge Biquez jbiq...@icsmx.com writes: I was wondering if you can share what was the strategy you followed to master Python (Yes I know I have to work hard study and practice a lot). One of the basic mistakes that folks (kids?) studying a language do is to study *only* the language. I guess

Re: Komodo 6, why Workspace Restore after every restart?

2010-11-14 Thread alex23
On Nov 15, 10:00 am, John Doe j...@usenetlove.invalid wrote: Does Komodo have to be shut down individually every time I want to restart Windows XP? Is there some way to eliminate the persistent Workspace Restore error after every restart? I have tried setting it to restore files without

Re: namespace issue, Python vs numpy min/max problem

2010-11-14 Thread Robert Kern
On 2010-11-14 17:37 , Gregory Ewing wrote: Steven D'Aprano wrote: It only becomes your problem if you have advised people that the right way to use your module is with import *. And if you're advising people to do that, it would be an extremely good idea to give your functions different names

Re: Noob question on 2 vs 3 Python releases

2010-11-14 Thread Dan Stromberg
On Sun, Nov 14, 2010 at 1:03 AM, Franck Ditter fra...@ditter.org wrote: Pardon my noobness (?) but why is there a 2.x and 3.x development teams working concurrently in Python ? I hardly saw that in other languages. Which one should I choose to start with, to cope with the future ? Isn't 3.x

Re: Komodo 6, why Workspace Restore after every restart?

2010-11-14 Thread John Doe
alex23 wuwei23 gmail.com wrote: John Doe j... usenetlove.invalid wrote: Does Komodo have to be shut down individually every time I want to restart Windows XP? Is there some way to eliminate the persistent Workspace Restore error after every restart? I have tried setting it to restore

Re: Komodo 6, why Workspace Restore after every restart?

2010-11-14 Thread alex23
John Doe j...@usenetlove.invalid wrote: UseNet would be better off if Google Groups didn't exist, IMO. I'm sorry, are you cranky because you didn't get the answer you wanted when you posted in a less relevant forum? Why do you think comp.lang.python is more appropriate than the Komodo forums?

Some syntactic sugar proposals

2010-11-14 Thread Dmitry Groshev
Here are some proposals. They are quite useful at my opinion and I'm interested for suggestions. It's all about some common patterns. First of all: how many times do you write something like t = foo() t = t if pred(t) else default_value ? Of course we can write it as t = foo() if

Re: Some syntactic sugar proposals

2010-11-14 Thread Dmitry Groshev
On Nov 15, 9:39 am, Dmitry Groshev lambdadmi...@gmail.com wrote: Here are some proposals. They are quite useful at my opinion and I'm interested for suggestions. It's all about some common patterns. First of all: how many times do you write something like     t = foo()     t = t if pred(t)

Re: Some syntactic sugar proposals

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 10:39 PM, Dmitry Groshev lambdadmi...@gmail.com wrote: Here are some proposals. They are quite useful at my opinion and I'm interested for suggestions. It's all about some common patterns. snip Second, I saw a lot of questions about using dot notation for a object-like

Re: Some syntactic sugar proposals

2010-11-14 Thread Dmitry Groshev
On Nov 15, 9:48 am, Chris Rebert c...@rebertia.com wrote: On Sun, Nov 14, 2010 at 10:39 PM, Dmitry Groshev lambdadmi...@gmail.com wrote: Here are some proposals. They are quite useful at my opinion and I'm interested for suggestions. It's all about some common patterns. snip Second, I

Re: Some syntactic sugar proposals

2010-11-14 Thread alex23
On Nov 15, 4:39 pm, Dmitry Groshev lambdadmi...@gmail.com wrote: First of all: how many times do you write something like     t = foo()     t = t if pred(t) else default_value ? Of course we can write it as     t = foo() if pred(foo()) else default_value but here we have 2 foo() calls

Re: Some syntactic sugar proposals

2010-11-14 Thread alex23
On Nov 15, 5:30 pm, alex23 wuwe...@gmail.com wrote:    t = foo(x) if text on x else default This should read 'test' instead of 'text', sorry. -- http://mail.python.org/mailman/listinfo/python-list

Re: Some syntactic sugar proposals

2010-11-14 Thread Dmitry Groshev
On Nov 15, 10:30 am, alex23 wuwe...@gmail.com wrote: On Nov 15, 4:39 pm, Dmitry Groshev lambdadmi...@gmail.com wrote: First of all: how many times do you write something like     t = foo()     t = t if pred(t) else default_value ? Of course we can write it as     t = foo() if

[issue9991] xmlrpc client ssl check faulty

2010-11-14 Thread Julius Tuomisto
Julius Tuomisto zforz...@gmail.com added the comment: Renderfarm.fi's python based uploader for Blender 2.5 (GPL licensed and a part of the main distribution of Blender) is still suffering from this bug. We're hopeful that this issue would be fixed in the next versions of Python. Thank you!

[issue9991] xmlrpc client ssl check faulty

2010-11-14 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: That's sad. The fix is very simple. We shall have it before 3.2 alpha4 or beta1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9991

[issue10410] Is iterable a container type?

2010-11-14 Thread INADA Naoki
INADA Naoki songofaca...@gmail.com added the comment: Likewise, and objects of any classes you define with an __iter__() or __getitem__() method. is wrong because __getitem__ method is not relate to iterable That wording is correct.  Sequences are automatically iterable even if they don't

[issue10414] socket.gethostbyname doesn't return an ipv6 address

2010-11-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Python has a policy of exposing low-level APIs as-is, i.e. the way the operating system implements them. gethostbyname is an old BSD socket API function that is limited to IPv4, and Python exposes it as such. If you want another

[issue3493] No Backslash (\) in IDLE 1.2.2

2010-11-14 Thread Peter Nielsen
Peter Nielsen peter.ev...@gmail.com added the comment: I have the same problem with a danish keyboard and OSX snowleopard.. I can use \ in both the command editor and pretty everywhere else but not in Idle. -- nosy: +Peter.Nielsen versions: +Python 2.6, Python 3.1 -Python 2.7

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-11-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Hirokazu's patch works for me. Could this approach be taken in general to suppress all buildbot pop-ups? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9116

[issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files

2010-11-14 Thread Zbyszek Szmek
New submission from Zbyszek Szmek zbys...@in.waw.pl: 1. 2to3 should work only only files ending with '.py', but it takes anything which has a dot and ends with 'py'. I'm having trouble with numpy .npy files. 2. 2to3 tries to decode the file and fails with traceback that is not useful:

[issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files

2010-11-14 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - benjamin.peterson nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10416 ___

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: As per my response to RDM on python-dev, I think the patch is misguided as it currently stands. The traceback on an exception is built up as the stack unwinds. The stack above the frame containing the exception handler obviously hasn't been

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: If the allframes flag is pursued further, then the stack trace should be added (with an appropriate header clause) after the entire exception chain has been printed (including the exception currently being handled). --

[issue10383] test_os leaks under Windows

2010-11-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I agree that the buffer should be released. The patch fixes this leak and another one. All tests pass. -- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file19606/posixmodule_leak.patch

[issue1553375] Add traceback.print_full_exception()

2010-11-14 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Note that after the loop over the values is complete, the final value of tb should correctly refer to the traceback for the exception currently being handled regardless of whether or not any chaining is involved. So moving the stack printing

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-14 Thread Johannes Ammon
New submission from Johannes Ammon johannes.am...@gmail.com: When there is a non-ASCII character in the docstring of a test function, unittest triggers an UnicodeEncodeError when called with --verbose. I have this file unicodetest.py: - # -*- coding:

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10417 ___ ___

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Virgil Dupras
New submission from Virgil Dupras hs...@hardcoded.net: I downloaded Python 3.1.3rc1 this morning to do my civic duty of testing it. I don't know what I'm doing wrong, but for me, test_io hangs and never completed. I'm on OS X 10.6.5. I ran it with: $ ./python.exe Lib/test/regrtest.py test_io

[issue9807] deriving configuration information for different builds with the same prefix

2010-11-14 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Could you also fix issue #10262, which is related to this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9807

[issue10416] UnicodeDecodeError when 2to3 is run on a dir with numpy .npy files

2010-11-14 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: r86464 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10416 ___

[issue10417] unittest triggers UnicodeEncodeError with non-ASCII character in the docstring of the test function

2010-11-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Is this a duplicate of #1293741? That issue was closed as out of date, but I'm not 100% convinced that was the correct closure. What do you think? Does it still happen with 2.7? (2.6 is in security fix only mode.) -- nosy:

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10418 ___ ___ Python-bugs-list

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Can you run regrtest with the -v option, to know which test case fails? (we have several OS X buildbots which run this test fine, by the way, including a Snow Leopard instance) Note: 9223372036854775808 is 2**63 or 0x8000.

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: I ran the test with the -v option flag. The malloc error don't happen at the same place the hang up happens. The first one happens at: test_readline (test.test_io.PyIOTest) ... ok test_unbounded_file (test.test_io.PyIOTest) ... skipped 'test

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I ran the test with the -v option flag. The malloc error don't happen at the same place the hang up happens. The first one happens at: The malloc error is normal, then, it's part of that test. It's a pity OS X dumps something on stderr, though.

[issue10413] Comments in unicode.h are out of date

2010-11-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Alexander Belopolsky wrote: New submission from Alexander Belopolsky belopol...@users.sourceforge.net: Attached patch updates some comments in unicode.h mostly reflecting the fact that the default encoding is now unconditionally

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Virgil Dupras
Virgil Dupras hs...@hardcoded.net added the comment: Nobody else can reproduce the bug? I'm not sure I can fix this (although I can try). I tried to re-compile 3.1.2 with the same flags and run test_io and it passes, so something happened between 3.1.2 and 3.1.3rc1. So, I'll give it a look,

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Ronald hasn't replied yet and he's the most likely to be in a position to try to reproduce it. Even if you can't fix it, figuring out more about how that individual test is arriving at the hang could be useful. If you've got the chops

  1   2   >