Jython 2.5.3 final released!

2012-08-14 Thread fwierzbi...@gmail.com
The announcement and download links are here: http://fwierzbicki.blogspot.com/2012/08/jython-253-final-released.html -Frank -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

ANN: psutil 0.6.0 released

2012-08-14 Thread Giampaolo Rodolà
Hi folks, I'm pleased to announce the 0.6.0 release of psutil: http://code.google.com/p/psutil/ This is one of the best releases so far as it addresses two important issues: system memory functions management and permission errors occurring on Windows and OSX. === Memory functions ===

Re: how to call perl script from html using python

2012-08-14 Thread Steven D'Aprano
On Mon, 13 Aug 2012 22:12:48 -0700, mullapervez wrote: Hi, I wanna call perl script in HTML form n store that data in DB using Python. How can i do this...?? Please help me Okay, let me give you some general advice first, then some programming advice If your question looks like

Re: how to call perl script from html using python

2012-08-14 Thread Pervez Mulla
On Tuesday, August 14, 2012 10:42:48 AM UTC+5:30, Pervez Mulla wrote: Hi, I wanna call perl script in HTML form n store that data in DB using Python. How can i do this...?? Please help me Thank you Pervez Thank you for your advice steven, I am beginner to this

pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Simon Cropper
Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone please contribute a functioning module showing me how to do it? Once I have all

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Fg Nu
Haha. Best listserv ever.  I've been on this list a day, and run me over with a lawnmower if I've written more than 200 lines of Python code, but this list is totally worth it. -- http://mail.python.org/mailman/listinfo/python-list

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Alex Strickland
cn tell itz a fraud - sp 2 gd! lolz On 2012/08/14 08:34 AM, Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Ben Finney
Simon Cropper simoncrop...@fossworkflowguides.com writes: I just had a great idea for a new python module. I haven't bothered googling it or doing any research. That's the perfect time: everyone knows that ideas and enthusiasm are the key to a successful project. Show them early, and people

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Chris Angelico
On Tue, Aug 14, 2012 at 4:34 PM, Simon Cropper simoncrop...@fossworkflowguides.com wrote: I need help putting together some code; today preferably, my boss is on my back. Can someone please contribute a functioning module showing me how to do it? Sure, old man, we'll help you out! *throws

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Steven D'Aprano
On Tue, 14 Aug 2012 16:34:01 +1000, Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone please contribute a

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Anoop Thomas Mathew
On 14 August 2012 12:04, Simon Cropper simoncrop...@fossworkflowguides.comwrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone

Re: in-place exponentiation incongruities

2012-08-14 Thread Giacomo Alzetta
Il giorno domenica 12 agosto 2012 23:53:46 UTC+2, Terry Reedy ha scritto: Are you actually planning to do this, or is this purely theoretical? Yes, I do plan to implement ipow. Not true. Whether the function is coded in Python or C cls.__ipow__(base, exp, mod) # or

Re: how to call perl script from html using python

2012-08-14 Thread Steven D'Aprano
On Mon, 13 Aug 2012 23:21:34 -0700, Pervez Mulla wrote: I wanna call perl objects using Python . I checked in internet ,I can make use of inline function for this, But in HTML..?? You need to explain more about your problem, because I don't understand what you want to do in detail. For

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Fg Nu
Lol. Lol. Lol. It just keeps on givin'. From: Anoop Thomas Mathew atm...@gmail.com To: Simon Cropper simoncrop...@fossworkflowguides.com Cc: python-list@python.org Sent: Tuesday, August 14, 2012 12:11 AM Subject: Re: pylagiarism -- Need help now! Please

Re: [ANNOUNCE] Campaign to support the notmm project!

2012-08-14 Thread Ramchandra Apte
I'm now really poor and cannot even finance the server hosting. You can use Google Code hosting for the project - even many Python Core Dev's stuff are done on it. -- http://mail.python.org/mailman/listinfo/python-list

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Peter Otten
Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone please contribute a functioning module showing me how to

Re: print(....,file=sys.stderr) buffered?

2012-08-14 Thread Alain Ketterlin
Helmut Jarausch jarau...@skynet.be writes: On Mon, 13 Aug 2012 15:43:31 +, Grant Edwards wrote: On 2012-08-13, Helmut Jarausch jarau...@skynet.be wrote: Hi, for tracing purposes I have added some print outs like print('+++ before calling foo',file=sys.stderr) x=foo(..) print('---

Re: Sharing code between different projects?

2012-08-14 Thread andrea crotti
2012/8/13 Rob Day robert@merton.oxon.org: I'd just create a module - called shared_utils.py or similar - and import that in both projects. It might be a bit messy if there's no 'unifying theme' to the module - but surely it'd be a lot less messy than your TempDirectory class, and anyone

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Simon Cropper
On 14/08/12 18:19, Peter Otten wrote: Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my back. Can someone please contribute a

Re: EXTERNAL: Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Damon Register
Thanks, I needed something to start the day on the positive side. On 8/14/2012 5:32 AM, Simon Cropper wrote: Anyone willing to contribute money to help with the compilation of the code will get a portion of the profits. Just send me your account details, name and address; and I will ensure,

RE: something about split()???

2012-08-14 Thread Andreas Tawn
I have a question about the split function? surpose a = |,and when I use a.split(|) , I got the list [',] ,but I want to get the empty list,what should I do ? Something like... [x for x in |.split(|) if x] [] Cheers, Drea -- http://mail.python.org/mailman/listinfo/python-list

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Peter Otten
Simon Cropper wrote: Anyone willing to contribute money to help with the compilation of the code will get a portion of the profits. Just send me your account details, name and address; and I will ensure, once I have been paid, that I will send you your cut! :) This is starting to look like a

Re: save dictionary to a file without brackets.

2012-08-14 Thread Mark Lawrence
On 14/08/2012 03:54, Steven D'Aprano wrote: On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote: On 13/08/2012 17:14, alex23 wrote: On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote: Why on your say so? My mistake, I didn't realise you wanted to sound so tedious. Knock

Re: How to uncompress a VOB file? (Win XP)

2012-08-14 Thread Mark Lawrence
On 14/08/2012 04:00, Steven D'Aprano wrote: On Tue, 14 Aug 2012 01:34:46 +0100, Mark Lawrence wrote: When did you seek my permission to call me by my forename? Sheesh. It's 2012, not 1812. If you sign your posts with your full name, you have to expect that people will call you Mark rather

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Mark Lawrence
On 14/08/2012 07:34, Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. [snip similar] Well I fell for it, there I was thinking you were serious and right at the bottom you have a disclaimer saying it

how to fix error Requires python(abi)=2.4

2012-08-14 Thread sagarnikam123
i am installing numpy on fedora with python 2.6,2.7 3.1 -- View this message in context: http://python.6.n6.nabble.com/how-to-fix-error-Requires-python-abi-2-4-tp4985031.html Sent from the Python - python-list mailing list archive at Nabble.com. --

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Chris Angelico
On Tue, Aug 14, 2012 at 9:46 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: Well I fell for it, there I was thinking you were serious and right at the bottom you have a disclaimer saying it was tongue in cheek. You got me hook, line and sinker. :) At least you had the grace to admit that

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Mark Lawrence
On 14/08/2012 10:32, Simon Cropper wrote: On 14/08/12 18:19, Peter Otten wrote: Simon Cropper wrote: Hi Everyone, I just had a great idea for a new python module. I haven't bothered googling it or doing any research. I need help putting together some code; today preferably, my boss is on my

Re: EXTERNAL: Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Ben Finney
Damon Register damon.w.regis...@lmco.com writes: On 8/14/2012 5:32 AM, Simon Cropper wrote: Anyone willing to contribute money to help with the compilation of the code will get a portion of the profits. Just send me your account details, name and address; and I will ensure, once I have

Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Mark Lawrence
On 14/08/2012 11:27, Peter Otten wrote: Simon Cropper wrote: Anyone willing to contribute money to help with the compilation of the code will get a portion of the profits. Just send me your account details, name and address; and I will ensure, once I have been paid, that I will send you your

Re: How to uncompress a VOB file? (Win XP)

2012-08-14 Thread Steven D'Aprano
On Tue, 14 Aug 2012 12:38:24 +0100, Mark Lawrence wrote: On 14/08/2012 04:00, Steven D'Aprano wrote: [...] For the record I was asked to use my full name rather than my user name on Python mailing lists. But see also my earlier reply to you on the save dictionary to a file without brackets

Re: EXTERNAL: Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Ramchandra Apte
Yes. On 14 August 2012 17:20, Ben Finney ben+pyt...@benfinney.id.au wrote: Damon Register damon.w.regis...@lmco.com writes: On 8/14/2012 5:32 AM, Simon Cropper wrote: Anyone willing to contribute money to help with the compilation of the code will get a portion of the profits. Just

Re: something about split()???

2012-08-14 Thread Ramchandra Apte
(Much) more Pythonic solution: filter(None,|.split(|)) On 14 August 2012 15:14, Andreas Tawn andreas.t...@ubisoft.com wrote: I have a question about the split function? surpose a = |,and when I use a.split(|) , I got the list [',] ,but I want to get the empty list,what should I do ?

Re: EXTERNAL: Re: pylagiarism -- Need help now! Please provide code...

2012-08-14 Thread Ramchandra Apte
On 14 August 2012 19:01, Ramchandra Apte maniandra...@gmail.com wrote: Yes. On 14 August 2012 17:20, Ben Finney ben+pyt...@benfinney.id.au wrote: Damon Register damon.w.regis...@lmco.com writes: On 8/14/2012 5:32 AM, Simon Cropper wrote: Anyone willing to contribute money to help with

Re: Sharing code between different projects?

2012-08-14 Thread Jean-Michel Pichavant
andrea crotti wrote: I am in the situation where I am working on different projects that might potentially share a lot of code. I started to work on project A, then switched completely to project B and in the transiction I copied over a lot of code with the corresponding tests, and I started to

Re: save dictionary to a file without brackets.

2012-08-14 Thread Alister
On Tue, 14 Aug 2012 12:33:20 +0100, Mark Lawrence wrote: On 14/08/2012 03:54, Steven D'Aprano wrote: On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote: On 13/08/2012 17:14, alex23 wrote: On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk wrote: Why on your say so? My

Re: Sharing code between different projects?

2012-08-14 Thread Steven D'Aprano
On Mon, 13 Aug 2012 17:53:32 +0100, andrea crotti wrote: I started to work on project A, then switched completely to project B and in the transiction I copied over a lot of code with the corresponding tests, and I started to modify it. Now it's time to work again on project A, but I don't

Strange behavior

2012-08-14 Thread light1quark
Hi, I am migrating from PHP to Python and I am slightly confused. I am making a function that takes a startingList, finds all the strings in the list that begin with 'x', removes those strings and puts them into a xOnlyList. However if you run the code you will notice only one of the strings

Re: Strange behavior

2012-08-14 Thread Alain Ketterlin
light1qu...@gmail.com writes: However if you run the code you will notice only one of the strings beginning with 'x' is removed from the startingList. def testFunc(startingList): xOnlyList = []; for str in startingList: if (str[0] == 'x'):

Re: Arithmetic with Boolean values

2012-08-14 Thread Hans Mulder
On 12/08/12 22:13:20, Alister wrote: On Sun, 12 Aug 2012 19:20:26 +0100, Mark Lawrence wrote: On 12/08/2012 17:59, Paul Rubin wrote: which can be simplified to: for x in range(len(L)//2 + len(L)%2): for x in range(sum(divmod(len(L), 2))): ... So who's going to be first in with and thou

Re: something about split()???

2012-08-14 Thread Jean-Michel Pichavant
Ramchandra Apte wrote: (Much) more Pythonic solution: filter(None,|.split(|)) On 14 August 2012 15:14, Andreas Tawn andreas.t...@ubisoft.com mailto:andreas.t...@ubisoft.com wrote: I have a question about the split function? surpose a = |,and when I use a.split(|) , I got the list

Re: how to fix error Requires python(abi)=2.4

2012-08-14 Thread Benjamin Kaplan
On Aug 14, 2012 4:51 AM, sagarnikam123 sagarnikam...@gmail.com wrote: i am installing numpy on fedora with python 2.6,2.7 3.1 -- Python bytecode and C interface are not compatible across versions. If you're trying to install a numpy binary that was compiled against 2.4, it won't work with

Re: Sharing code between different projects?

2012-08-14 Thread andrea crotti
2012/8/14 Jean-Michel Pichavant jeanmic...@sequans.com: I can think of logilab-common (http://www.logilab.org/848/) Having a company-wide python module properly distributed is one to achieve your goal. Without distributing your module to the public, there's a way to have a pypi-like server

Re: save dictionary to a file without brackets.

2012-08-14 Thread Mark Lawrence
On 14/08/2012 16:05, Alister wrote: On Tue, 14 Aug 2012 12:33:20 +0100, Mark Lawrence wrote: On 14/08/2012 03:54, Steven D'Aprano wrote: On Mon, 13 Aug 2012 18:07:26 +0100, Mark Lawrence wrote: On 13/08/2012 17:14, alex23 wrote: On Aug 13, 10:37 pm, Mark Lawrence breamore...@yahoo.co.uk

New image and color management library for Python 2+3

2012-08-14 Thread Christian Heimes
Hello fellow Pythonistas, I'm looking for co-developers, testers, documentation writers and users for a new image library I created. The code is available at https://bitbucket.org/tiran/smc.freeimage Background story: I'm working for a company that creates Python based solutions for libraries

Re: Strange behavior

2012-08-14 Thread Terry Reedy
On 8/14/2012 11:59 AM, Alain Ketterlin wrote: light1qu...@gmail.com writes: However if you run the code you will notice only one of the strings beginning with 'x' is removed from the startingList. def testFunc(startingList): xOnlyList = []; for str in startingList:

Re: Strange behavior

2012-08-14 Thread Virgil Stokes
On 2012-08-14 17:38, light1qu...@gmail.com wrote: Hi, I am migrating from PHP to Python and I am slightly confused. I am making a function that takes a startingList, finds all the strings in the list that begin with 'x', removes those strings and puts them into a xOnlyList. However if you run

Fwd: Re: Strange behavior

2012-08-14 Thread Virgil Stokes
Original Message Subject:Re: Strange behavior Date: Tue, 14 Aug 2012 21:32:16 +0200 From: Virgil Stokes v...@it.uu.se To: light1qu...@gmail.com On 2012-08-14 17:38, light1qu...@gmail.com wrote: Hi, I am migrating from PHP to Python and I am slightly

[OT] A short Usenet primer (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: On 14/08/2012 00:00, Xantipius wrote: On Aug 13, 3:40 pm, Mark Lawrence breamore...@yahoo.co.uk wrote: On 13/08/2012 11:18, Xantipius wrote: subj Either a) write some code and when and if it fails give us a small code snippet that demonstates the problem with the

Re: looking for a neat solution to a nested loop problem

2012-08-14 Thread 88888 Dihedral
Nobody於 2012年8月7日星期二UTC+8下午11時32分55秒寫道: On Mon, 06 Aug 2012 21:02:33 -0700, Larry Hudson wrote: for i in range(N,N+100): for j in range(M,M+100): do_something(i % 100 ,j % 100) Emile How about... for i in range(100):

[OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: On 14/08/2012 04:00, Steven D'Aprano wrote: On Tue, 14 Aug 2012 01:34:46 +0100, Mark Lawrence wrote: When did you seek my permission to call me by my forename? Sheesh. It's 2012, not 1812. If you sign your posts with your full name, you have to expect that people will

Re: [OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 7:12 AM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Probably you were asked that so that your postings could be distinguished from that of the other potential Marks around here. I have my surname in my From address, but I tend to sign my posts ChrisA (no

Re: Sharing code between different projects?

2012-08-14 Thread Cameron Simpson
On 13Aug2012 17:53, andrea crotti andrea.crott...@gmail.com wrote: | I am in the situation where I am working on different projects that | might potentially share a lot of code. | | I started to work on project A, then switched completely to project B | and in the transiction I copied over a lot

Re: Strange behavior

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 1:38 AM, light1qu...@gmail.com wrote: def testFunc(startingList): xOnlyList = []; for str in startingList: if (str[0] == 'x'): print str; xOnlyList.append(str)

Re: [OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Steven D'Aprano
On Wed, 15 Aug 2012 07:46:31 +1000, Chris Angelico wrote: I have my surname in my From address, but I tend to sign my posts ChrisA (no relation, btw, to DaveA, though our surnames are similar). That's generally been sufficient for distinguishing purposes, though if anyone wants a truly unique

Re: Strange behavior

2012-08-14 Thread Steven D'Aprano
On Tue, 14 Aug 2012 21:40:10 +0200, Virgil Stokes wrote: You might find the following useful: def testFunc(startingList): xOnlyList = []; j = -1 for xl in startingList: if (xl[0] == 'x'): That's going to fail in the starting list contains an empty string. Use

Re: [OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 9:55 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 15 Aug 2012 07:46:31 +1000, Chris Angelico wrote: I have my surname in my From address, but I tend to sign my posts ChrisA (no relation, btw, to DaveA, though our surnames are similar). That's

Re: [OT] Posting under ones full name

2012-08-14 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: Thomas 'PointedEars' Lahn wrote: Probably you were asked that so that your postings could be distinguished from that of the other potential Marks around here. I have my surname in my From address, but I tend to sign my posts ChrisA (no relation, btw, to DaveA, though

Flushing buffer on file copy on linux

2012-08-14 Thread J
I was hoping someone could give me some ideas for a particular problem. I've got a python program that is used for basic testing of removable storage devices (usb, mmc, firewire, etc). Essentially, it looks for a mounted device (either user specified, or if not, the program loops through all

Re: Flushing buffer on file copy on linux

2012-08-14 Thread Cameron Simpson
On 14Aug2012 22:55, J dreadpiratej...@gmail.com wrote: | Now, the problem I have is that linux tends to buffer data writes to a | device, and I want to work around that. To what _specific_ purpose? Benchmarking? Ensuring the device can be pulled? Ensuring another program can see the data? (The

Re: [OT] Posting under ones full name

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Chris Angelico wrote: I have my surname in my From address, but I tend to sign my posts ChrisA (no relation, btw, to DaveA, though our surnames are similar). That's generally been sufficient for

Re: [OT] Posting under ones full name

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Please use `[...]' or `[…]' to indicate omission instead. I could have written `politeness...' myself. Incidentally, how _do_ the square brackets help? Can a reader know that you put square-bracketed dots and

Re: How to uncompress a VOB file? (Win XP)

2012-08-14 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: (However, I don't promise not to roll my eyes if they choose a silly moniker, and I am the final arbitrator as to what counts as silly.) I also don't promise to remember or comply with their request to be known by an egregiously

Re: How to uncompress a VOB file? (Win XP)

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 1:31 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: People have the right to ask to be known by a particular name, but they are obliged to be reasonable about how successful their request will be when they ask. Reminds me of what Torhelm said during one of our

Re: [OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Steven D'Aprano
On Wed, 15 Aug 2012 11:44:29 +1000, Chris Angelico wrote: On Wed, Aug 15, 2012 at 9:55 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 15 Aug 2012 07:46:31 +1000, Chris Angelico wrote: I have my surname in my From address, but I tend to sign my posts ChrisA (no

Re: [OT] Posting under ones full name

2012-08-14 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Please use `[...]' or `[…]' to indicate omission instead. I could have written `politeness...' myself. Incidentally, how _do_ the square brackets help? They are a

Re: [OT] Posting under ones full name (was: How to uncompress a VOB file? (Win XP))

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 1:43 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: It was a joke, implying that my mother uses the same truly unique handle as you. With over 7 billion people on the planet, and no upper limit on the number of handles anyone can take, together with

Re: [OT] Posting under ones full name

2012-08-14 Thread Chris Angelico
On Wed, Aug 15, 2012 at 1:56 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: On Wed, Aug 15, 2012 at 12:06 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Please use `[...]' or `[…]' to indicate omission instead. I could have written

it's really strange.how does it work?

2012-08-14 Thread levi nie
ok,what does start, stop = 0, start in the code mean? it's really strange.how does it work? code: def interval(start, stop=None, step=1): 'Imitates range() for step 0' if stop is None: start, stop = 0, start result = [] i = start while i stop:

Re: it's really strange.how does it work?

2012-08-14 Thread Ramchandra Apte
Even I got confused a bit: explaination: this is called iterable unpacking `start, stop = 0, start` is the same as: temp = start start = 0 stop = temp On 15 August 2012 10:37, levi nie levinie...@gmail.com wrote: ok,what does start, stop = 0, start in the code mean? it's really strange.how

Re: it's really strange.how does it work?

2012-08-14 Thread Chris Rebert
On Tue, Aug 14, 2012 at 10:07 PM, levi nie levinie...@gmail.com wrote: ok,what does start, stop = 0, start in the code mean? it's really strange.how does it work? It's just parallel assignment (http://en.wikipedia.org/wiki/Assignment_%28computer_science%29#Parallel_assignment ). As to exactly

Order Before the Offer Wipe outs!!!

2012-08-14 Thread sfi anjana
Bear Gift Card Holder $7.79 Retail Price: $12.99 You Save: $5.20 (40%) Item No: 54899 Ships From: CANADA Condition / Status: New / 1 Available https://www.tripleclicks.com/detail.php?item=54899/10288668/ Bear carries a handbag perfectly sized to fill with gift cards (not included). Comes with

Re: something about split()???

2012-08-14 Thread Ramchandra Apte
filter is bad when you use lambda with it there are (good) cases for filter On 14 August 2012 22:39, Jean-Michel Pichavant jeanmic...@sequans.comwrote: Ramchandra Apte wrote: (Much) more Pythonic solution: filter(None,|.split(|)) On 14 August 2012 15:14, Andreas Tawn

[issue15644] after _bytesio.seek(0), _bytesio.getvalue() returned reversed data.

2012-08-14 Thread Ned Deily
Ned Deily added the comment: The program works as expected. After the first two writes, the buffer contains b'abcdef'. Then the seek(0) moves the stream pointer to the beginning of the buffer and the next write overwrites buffer positions 0 through 2, replacing b'abc' with b'xyz'. So now

[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier
Juan Javier added the comment: Ok, you are right, serialized is the right name. Also, passing the lock to the decorator will the correct option. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15634

[issue15634] synchronized decorator for the threading module

2012-08-14 Thread Juan Javier
Juan Javier added the comment: What about this? def serialized(lock): def _serialized(func): def __serialized(*args, **kwds): with lock: return func(*args, **kwds) __serialized.__doc__ = func.__doc__ return __serialized return

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-08-14 Thread Stefan Holek
New submission from Stefan Holek: After upgrading 3.3.0b1 to b2 (make install to same location) I noticed that the Grammar pickles for beta.2 were missing (the beta.1 pickles still being there). The result is permission errors and/or virtualenv SandboxViolations, when 2to3 is used for the

[issue14935] PEP 384 Refactoring applied to _csv module

2012-08-14 Thread Robin Schreiber
Robin Schreiber added the comment: Fixed the dealloc-methods of the types, for proper type dereferencing. -- Added file: http://bugs.python.org/file26797/csv_pep384_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14935

[issue14935] PEP 384 Refactoring applied to _csv module

2012-08-14 Thread Robin Schreiber
Changes by Robin Schreiber robin.schrei...@me.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14935 ___

[issue15632] regrtest.py: spurious leaks with -R option

2012-08-14 Thread Stefan Krah
Stefan Krah added the comment: Should we go all the way and also explicitly fill the small int cache? Integers 0-255 should be initialized already, but I'm not sure about [-5..-1] and 256. I haven't been able to create a test case for integers though. -- Added file:

[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Chris Eli, - Sorry that I missed this issue. Chris - agree to your rationale. I can see how having self.left and self.right documented can add value, The diff example was useful. Initially, I did have some doubts in terms how it could be useful when the

[issue15631] Python 3.3 beta 1 installation issue lib/lib64 folders

2012-08-14 Thread Matthias Klose
Matthias Klose added the comment: the configure step sets LIBDIR to /usr/local/lib64. Please find out why this is not set to /usr/local/lib. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15631

[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Senthil Kumaran
Senthil Kumaran added the comment: As this is not adding any feature, but just an additional clarification to the existing attribute together with some useful documentation, I believe this can go in 2.7, 3.2 and 3.3 Please correct me if I am wrong here. -- versions: +Python 2.7,

[issue15269] Document dircmp.left and dircmp.right

2012-08-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot, Senthil. I appreciate it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15269 ___ ___

[issue15543] central documentation for 'universal newlines'

2012-08-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: Updating patch to tip again. -- Added file: http://bugs.python.org/file26799/issue-15543-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15543 ___

[issue15573] Support unknown formats in memoryview comparisons

2012-08-14 Thread Stefan Krah
Stefan Krah added the comment: Here is a patch implementing by-value comparisons for all format strings understood by the struct module. It is slightly longer than promised, since for larger arrays it is necessary to cache an unpacking object for acceptable performance. The fast path for

[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Richard Oudkerk
New submission from Richard Oudkerk: If the if __name__ == '__main__' idiom is not used on Windows you can get the recursive starting of new processes. This is because importing the main module in a child process starts a new child process as a side effect. There is a test intended to

[issue15647] isdir should be a local symbol, not exported

2012-08-14 Thread Matthias Klose
New submission from Matthias Klose: 2.7 only: isdir should not be exported, but a local symbol instead (this was accidentally changed after the 2.7.3 release. currently defined and used in Modules/getpath.c and Python/import.c, and used in Python/bltinmodule.c proposal to rename the

[issue6135] subprocess seems to use local encoding and give no choice

2012-08-14 Thread Chris Jerdonek
Chris Jerdonek added the comment: only one Popen instance (for the iconv call), but different encodings for stdin and stdout. Isn't that the exception rather than the rule? I think it actually makes sense, in at least 99.83% of cases ;-), to have a common encoding setting for all streams.

[issue15648] stderr refs output does not respect PYTHONIOENCODING

2012-08-14 Thread Chris Jerdonek
New submission from Chris Jerdonek: The --help documentation for the python executable says-- PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr. However, PYTHONIOENCODING doesn't seem to be respected for the python executable's refs output to stderr. For example, this-- args

[issue15645] 2to3 Grammar pickles not created when upgrading to 3.3.0b2

2012-08-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15645 ___ ___

[issue15646] multiprocessing can do equivalent of a fork bomb on Windows

2012-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset e4fe1daef9f7 by Richard Oudkerk in branch '2.7': Issue #15646: Prevent equivalent of a fork bomb when using multiprocessing http://hg.python.org/cpython/rev/e4fe1daef9f7 New changeset 20f8a2455ffb by Richard Oudkerk in branch '3.2': Issue #15646:

[issue15639] csv.Error description is incorrectly broad

2012-08-14 Thread Xavier Morel
Xavier Morel added the comment: Correction: csv also seems to raise csv.Error if the file contains NUL bytes: Error: line contains NULL byte -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15639

[issue14167] document return statement in finally blocks

2012-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset e0e8e70e4035 by Andrew Svetlov in branch '3.2': Issue #14167: Document return statement in finally blocks. http://hg.python.org/cpython/rev/e0e8e70e4035 New changeset 05714e9811fa by Andrew Svetlov in branch 'default': Issue #14167: Document return

[issue14167] document return statement in finally blocks

2012-08-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14167 ___

[issue15633] httplib.response is not closed after all data has been read

2012-08-14 Thread Nikolaus Rath
Nikolaus Rath added the comment: The call should be read(size), with size a number. I will make sure to check size, fp, length, chunked and chunk_left when it happens the next time. -- ___ Python tracker rep...@bugs.python.org

[issue15586] Provide some examples for usage of ElementTree methods/attributes

2012-08-14 Thread Daniel Ellis
Daniel Ellis added the comment: Thank you for the review Eli. I've made your changes and attached the updated patch. I did run all of the code snippets that are being added on 2.7, and the only thing I found different was the changed print statement. I don't believe I overlooked anything,

[issue9161] add_option in optparse no longer accepts unicode string

2012-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset ffd70c371fee by R David Murray in branch '2.7': #9161: Fix test to use standard optparse test pattern (what was I thinking?) http://hg.python.org/cpython/rev/ffd70c371fee -- ___ Python tracker

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-14 Thread Stefan Mihaila
Stefan Mihaila added the comment: Maybe we could postpone the review process for a few days until I fix some known issues -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15642 ___

[issue15644] after _bytesio.seek(0), _bytesio.getvalue() returned reversed data.

2012-08-14 Thread umedoblock
umedoblock added the comment: thanks Ned. I understood your comment. I'm happy! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15644 ___ ___

  1   2   >