New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Xah Lee
New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right or right to left. Addition is left associative, such that

Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions ( http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!). Unfortunately, when I do this I have no choice but to include a single

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Peter Otten
Guillaume Chorn wrote: Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions ( http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!). Unfortunately, when I do this I have no choice

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions (http://sports.yahoo.com/nba/players?type=lastnamefirst=1query=go=GO!

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Karim
Le 29/02/2012 10:01, Karim a écrit : Le 29/02/2012 09:25, Guillaume Chorn a écrit : Hello All, I have a .csv file that I created by copying and pasting a list of all the players in the NBA with their respective teams and positions

Why this fails??

2012-02-29 Thread Smiley 4321
Why below fails - #!/usr/bin/python import pickle class MyClass(object): Field1 = None Field2 = None def __init__(self, dictionary): self.__dict__.update(dictionary) my_List = {'Field1': 'Apple', 'Field2': 'Orange'} myInst = MyClass(my_List) with

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Guillaume Chorn
Thanks, the suggestion print name.decode(utf-8).strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read this http://docs.python.org/howto/unicode.html in the hopes of finding out. Anyway

use CTRL+L for clearing the screen

2012-02-29 Thread Jabba Laci
Hi, I'm working on an interactive script. With raw_input user input is read and the script produces some output and offers the prompt again. I would like to add a clear screen feature, which would be activated with CTRL+L. How to do that? Another thing: raw_input waits until Enter but I'd like to

Re: Problem using s.strip() to remove leading whitespace in .csv file

2012-02-29 Thread Dave Angel
On 02/29/2012 04:05 AM, Guillaume Chorn wrote: Thanks, the suggestion print name.decode(utf-8).strip() worked like a charm. When I did the print repr(name) I got exactly what you predicted. I'm not yet sure what all of this means, but I'm going to read

Re: Why this fails??

2012-02-29 Thread Dave Angel
On 02/29/2012 04:07 AM, Smiley 4321 wrote: Why below fails - #!/usr/bin/python import pickle class MyClass(object): Field1 = None Field2 = None def __init__(self, dictionary): self.__dict__.update(dictionary) my_List = {'Field1': 'Apple', 'Field2':

Re: use CTRL+L for clearing the screen

2012-02-29 Thread Ben Finney
Jabba Laci jabba.l...@gmail.com writes: I would like to add a clear screen feature, which would be activated with CTRL+L. How to do that? Another thing: raw_input waits until Enter but I'd like to clear the screen at the moment when CTRL+L is pressed. That sounds like a job for the standard

RE: Python-list Digest, Vol 101, Issue 164

2012-02-29 Thread Shambhu Rajak
Hi, I want building GNU debugger for mingw. Need the GDB to support python How should I go about it? Thanks, Shambhu This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 00:09:16 -0800, Xah Lee wrote: Personally, I think this whole issue of precedence in a programming language is over-rated. It seems to me that grouping of any non-trivial set of calculations should be done so as to remove any possible confusion as to intent. It is one

CrowdFinch Technologies

2012-02-29 Thread CrowdFinch
CrowdFinch Technologies is a leading professional custom web design and web development company specialized in Outsourced Web Development Services, Mobile Application Development, Web design, SEO Services. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Kiuhnm
On 2/29/2012 9:09, Xah Lee wrote: New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right or right to left.

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Devin Jeanpierre
On Wed, Feb 29, 2012 at 6:43 AM, Chiron chiron...@gmail.com wrote: Personally, I think this whole issue of precedence in a programming language is over-rated.  It seems to me that grouping of any non-trivial set of calculations should be done so as to remove any possible confusion as to

Re: python scripts solution for euler projects

2012-02-29 Thread alister
On Tue, 28 Feb 2012 19:59:40 -0800, scripts examples wrote: Got a web site setup for solving euler problems in python, perl, ruby and javascript. Feel free to give me any feedback, thanks. Failing to give a link to the site is a pretty fundamental failure -- Please take note: --

building GNU debugger (was: Re: Python-list Digest, Vol 101, Issue 164)

2012-02-29 Thread Ulrich Eckhardt
Three things up front: 1. Do not reply to digests. If you want to only read, you can use the digests, but they are not usable for replying, because it is completely unclear where in a discussion you are entering and what you are relating your answers to. 2. Do not start new threads by using the

On u'Unicode string literals' (Py3)

2012-02-29 Thread jmfauth
For those who do not know: The u'' string literal trick has never worked in Python 2. sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' print u'Un oeuf à zéro EURO uro' Un uf à zéro uro jmf -- http://mail.python.org/mailman/listinfo/python-list

Looking for a simple, generic Python module to provide a secure web service

2012-02-29 Thread David Shi
We are looking for a very simple, generic Python module to provide a secure web service.   Ideally, it can be put onto the computer and make it available via IIS.   Off we go.   Your help will be gratefully received.   Regards.   David-- http://mail.python.org/mailman/listinfo/python-list

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Rick Johnson
On Feb 28, 11:06 pm, John Salerno johnj...@gmail.com wrote: The book I'm reading about using Tkinter only does this when creating the top-level window: app = Application() app.mainloop() and of course the Application class has subclassed the tkinter.Frame class. However, in the Python

Fwd: Question about PyXML and python's stdlib xml

2012-02-29 Thread Roman Rakus
I'm forwarding this message to python-list, since I didn't get answer on xml-sig ML. Hopefully this is right list to question. Please keep me in CC. Original message is below. RR Original Message Subject:Question about PyXML and python's stdlib xml Date: Mon, 27 Feb

Re: Listing children processes

2012-02-29 Thread Giampaolo Rodolà
Il 28 febbraio 2012 22:47, Arnaud Delobelle arno...@gmail.com ha scritto: On 28 February 2012 21:39, Mihai Badoiu mbad...@gmail.com wrote: On Tue, Feb 28, 2012 at 4:35 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Feb 28, 2012 at 10:33 AM, Mihai Badoiu mbad...@gmail.com wrote: I'm trying

Re: Fwd: Question about PyXML and python's stdlib xml

2012-02-29 Thread Stefan Behnel
Roman Rakus, 29.02.2012 15:33: I'm forwarding this message to python-list, since I didn't get answer on xml-sig ML I didn't see a message from you on that list. I have concerns about PyXML and stdlib xml included directly in python. Currently (in Fedora) python is trying to import PyXML,

Re: On u'Unicode string literals' (Py3)

2012-02-29 Thread Dave Angel
Just who are you replying to? On 02/29/2012 08:45 AM, jmfauth wrote: For those who do not know: The u'' string literal trick has never worked in Python 2. No trick there. If you have something explicit to say, then say it. sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Rainer Weikusat
Xah Lee xah...@gmail.com writes: A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right or right to left. Addition is left associative, such that 2 + 3 + 4 evaluates 2 + 3

Re: On u'Unicode string literals' reintroduction (Py3)

2012-02-29 Thread jmfauth
On 29 fév, 14:45, jmfauth wxjmfa...@gmail.com wrote: For those who do not know: The u'' string literal trick has never worked in Python 2. sys.version '2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]' print u'Un oeuf à zéro EURO uro' Un  uf à zéro  uro jmf

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Kiuhnm
On 2/29/2012 16:15, Rainer Weikusat wrote: [...] 'mathematics' (an essentially outdated write-only programming language dating back to the times when humans had to perform computations themselves) [...] Theoretical Computer Science is a branch of mathematics. Are you saying it is outdated?

list comprehension question

2012-02-29 Thread Johann Spies
I understand the following: In [79]: instansie instansie Out[79]: 'Mangosuthu Technikon' In [80]: t = [x.alt_name for x in lys] t = [x.alt_name for x in lys] In [81]: t t Out[81]: [] In [82]: t.append(instansie) t.append(instansie) In [83]: t t Out[83]: ['Mangosuthu Technikon'] But then why

Re: list comprehension question

2012-02-29 Thread James Broadhead
On 29 February 2012 13:52, Johann Spies johann.sp...@gmail.com wrote: In [82]: t.append(instansie) t.append(instansie) In [83]: t t Out[83]: ['Mangosuthu Technikon'] In [84]: t = [x.alt_name for x in lys].append(instansie) t = [x.alt_name for x in lys].append(instansie) In [85]: t t

Re: list comprehension question

2012-02-29 Thread John Gordon
In mailman.298.1330534919.3037.python-l...@python.org James Broadhead jamesbroadh...@gmail.com writes: On 29 February 2012 13:52, Johann Spies johann.sp...@gmail.com wrote: In [82]: t.append(instansie) t.append(instansie) In [83]: t t Out[83]: ['Mangosuthu Technikon'] In [84]: t

Re: list comprehension question

2012-02-29 Thread Chris Rebert
On Wed, Feb 29, 2012 at 5:52 AM, Johann Spies johann.sp...@gmail.com wrote: I understand the following: In [79]: instansie instansie Out[79]: 'Mangosuthu Technikon' In [80]: t = [x.alt_name for x in lys] t = [x.alt_name for x in lys] In [81]: t t Out[81]: [] In [82]:

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread namekuseijin
On Feb 29, 5:09 am, Xah Lee xah...@gmail.com wrote: New Science Discovery: Perl Idiots Remain Idiots After A Decade! A excerpt from the new book 〈Modern Perl〉, just published, chapter 4 on “Operators”. Quote: «The associativity of an operator governs whether it evaluates from left to right

RE: Question about PyXML and python's stdlib xml

2012-02-29 Thread Prasad, Ramit
I'm forwarding this message to python-list, since I didn't get answer on xml-sig ML. Hopefully this is right list to question. Please keep me in CC. Original message is below. I have concerns about PyXML and stdlib xml included directly in python. Currently (in Fedora) python is trying to import

RE: Listing children processes

2012-02-29 Thread Prasad, Ramit
I've been told of by the BDFL for stating that people should not top post on any Python mailing list/news group. He's the BDFL of Python, not of mailing list etiquette. Incorrect, I was told off for this http://code.activestate.com/lists/python-ideas/14065/ Why the link? If that is supposed

Re: list comprehension question

2012-02-29 Thread Terry Reedy
On 2/29/2012 8:52 AM, Johann Spies wrote: Please post plain text, the standard for all python.org mailing lists and corresponding newsgroups, and not html. Some readers print the html as plain text, which is confusing and obnoxious. Other like mine, do skip the plain text version and print

Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
Hello Python Community, I work for a mobile gaming startup in San Francisco, and we're heavily staffing around skilled Python Developers. I've already submitted a job posting to the Python.org website, but I was curious if anyone else had some suggestions on where I could go to find some really

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-02-29 Thread Xah Lee
i missed a point in my original post. That is, when the same operator are adjacent. e.g. 「3 ▲ 6 ▲ 5」. This is pointed out by Kiuhnm 〔kiuhnm03.4t.yahoo.it〕 and Tim Bradshaw. Thanks. though, i disagree the way they expressed it, or any sense this is different from math. to clarify, amend my

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Greg Harezlak
Thank you so much for the help, Philipp! On Wed, Feb 29, 2012 at 3:48 PM, Philipp Hagemeister phi...@phihag.dewrote: If you're looking for skilled developers, the best way to find them is probably to search their current work. http://careers.stackoverflow.com/ and the more experimental

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Philipp Hagemeister
If you're looking for skilled developers, the best way to find them is probably to search their current work. http://careers.stackoverflow.com/ and the more experimental http://githire.com/ are two excellent developer-friendly solutions for that. - Philipp On 03/01/2012 12:08 AM, Greg Harezlak

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 9:24 AM, Rick Johnson wrote: On Feb 28, 11:06 pm, John Salernojohnj...@gmail.com wrote: However, in the Python documentation, I see this: root = Tk() app = Application(master=root) app.mainloop() root.destroy() I tried the above and I got the following error: Traceback

Re: Any Advice Would Be Greatly Appreciated

2012-02-29 Thread Rodrick Brown
LinkedIn is an excellent resource for finding great candidates, However your problem might be because your searching for Python Developers why not hire great programmers and have them learn Python? Sent from my iPhone On Feb 29, 2012, at 6:08 PM, Greg Harezlak g...@tinyco.com wrote: Hello

Re: python scripts solution for euler projects

2012-02-29 Thread scripts examples
On Feb 29, 4:21 am, alister alister.w...@ntlworld.com wrote: On Tue, 28 Feb 2012 19:59:40 -0800, scripts examples wrote: Got a web site setup for solving euler problems in python, perl, ruby and javascript.    Feel free to give me any feedback, thanks. Failing to give a link to the site

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Rick Johnson
On Feb 29, 6:17 pm, Terry Reedy tjre...@udel.edu wrote: On 2/29/2012 9:24 AM, Rick Johnson wrote: On Feb 28, 11:06 pm, John Salernojohnj...@gmail.com  wrote: However, in the Python documentation, I see this: root = Tk() app = Application(master=root) app.mainloop() root.destroy()

PyTut: Tkinter #1

2012-02-29 Thread Rick Johnson
PyTut: Tkinter #1 Graciously donated by the benevolent professor Richard Johnson The first step to creating a Tkinter GUI is to create a blank window. Tkinter has two classes that represent a GUI window: Toplevel and Tk. Both the classes are basically the same, but since a GUI can have an

Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Peter Rubenstein
Hi, I'd appreciate a bit of help on this problem. I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } } I'd like to be able to code something like:

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Peter Rubenstein
--Reposting in plan text, apologies-- Hi, I'd appreciate a bit of help on this problem.  I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } } I'd

lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Xah Lee
fun example. in-place algorithm for reversing a list in Perl, Python, Lisp http://xahlee.org/comp/in-place_algorithm.html plain text follows What's “In-place Algorithm”? Xah Lee, 2012-02-29 This page tells you what's “In-place algorithm”, using

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-02-29 Thread Seymour J.
In 87aa41k6x5@sapphire.mobileactivedefense.com, on 02/29/2012 at 03:15 PM, Rainer Weikusat rweiku...@mssgmbh.com said: 'mathematics' (an essentially outdated write-only programming language dating back to the times when humans had to perform computations themselves) ROTF,LMAO! You

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-02-29 Thread Seymour J.
In ubo3r.20367$kv1.9...@newsfe03.iad, on 02/29/2012 at 11:43 AM, Chiron chiron...@gmail.com said: Sure, mathematically it *should* go a particular way, No. Mathematically it should go the way that it is defined to go. There is nothing in Mathematics that either requires or prohibits infix

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Chris Rebert
On Wed, Feb 29, 2012 at 7:56 PM, Peter Rubenstein peter.rubenst...@hotmail.com wrote: Hi, I'd appreciate a bit of help on this problem.  I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'},

Re: New Science Discovery: Perl Detracters Remain Idiots After A Decade!

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 23:06:42 -0500, Shmuel (Seymour J.) Metz wrote: In ubo3r.20367$kv1.9...@newsfe03.iad, on 02/29/2012 at 11:43 AM, Chiron chiron...@gmail.com said: Sure, mathematically it *should* go a particular way, No. Mathematically it should go the way that it is defined to go.

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
It is not necessarily to call Tk explicitly, which i think is a bug BTW. Sure, for simple scripts you can save one line of code but only at the expense of explicitness and intuitiveness. Observe ## START CODE ## import Tkinter as tk root = tk.Tk() root.title('Explicit Root')

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Steven D'Aprano
On Wed, 29 Feb 2012 20:07:49 -0800, Xah Lee wrote: Here's in-place algorithm for reversing a list: # python # in-place algorithm for reversing a list list_a = [a, b, c, d, e, f, g] list_length = len(list_a) for i in range(list_length/2): x = list_a[i] list_a[i] = list_a[

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Dan Stromberg
On Wed, Feb 29, 2012 at 8:07 PM, Xah Lee xah...@gmail.com wrote: fun example. in-place algorithm for reversing a list in Perl, Python, Lisp http://xahlee.org/comp/in-place_algorithm.html plain text follows What's “In-place Algorithm”? Xah Lee,

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots Af

2012-02-29 Thread Chiron
On Wed, 29 Feb 2012 23:10:48 -0500, Shmuel (Seymour J.) Metz wrote: ROTF,LMAO! You obviously don't have a clue as to what Mathematics means. Free hint: it doesn't mean Arithmetic. You're as bigoted as Xah Lee, Hmm... maybe, instead of just ridiculing him, you could explain where he is

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 10:22 PM, Rick Johnson wrote: I do not know what book the OP is referring to, but the current doc example is http://docs.python.org/py3k/library/tkinter.html#a-simple-hello-world-program My current replacement (see below) can be downloaded from the tracker:

Re: Help needed: dynamically pull data from different levels of a dict

2012-02-29 Thread Terry Reedy
On 2/29/2012 11:04 PM, Peter Rubenstein wrote: I'd appreciate a bit of help on this problem. I have some data that I've converted to a dict and I want to pull out individual pieces of it. Simplified version-- a={'1':'a', '2':'b', '3':{4:'d'}, '5':{'6': {'7': [ {'8':'e'}, {'9':'f'} ] } } }

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Terry Reedy
On 2/29/2012 11:41 PM, John Salerno wrote: window? If you only want the Windows X button to close the window, then is it okay to leave out any call to destroy()? Yes. You must leave it out. the latter, then where in the code do you put the call to destroy so it won't conflict with the user

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Xah Lee
On Feb 29, 9:01 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: You don't need a temporary variable to swap two values in Python. A better way to reverse a list using more Pythonic idioms is: for i in range(len(list_a)//2):     list_a[i], list_a[-i-1] = list_a[-i-1],

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
Yes, but i think the REAL problem is faulty code logic. Remove the last line root.destroy() and the problem is solved. Obviously the author does not have an in-depth knowledge of Tkinter. The faulty code is not my own, which is part of the reason I asked the question. The book I'm reading

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
On Wednesday, February 29, 2012 11:40:45 PM UTC-6, Terry Reedy wrote: On 2/29/2012 11:41 PM, John Salerno wrote: window? If you only want the Windows X button to close the window, then is it okay to leave out any call to destroy()? Yes. You must leave it out. the latter, then where

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
What exactly is the purpose of doing that? Does Tk do some extra work that a simple call to Frame won't do? More specifically, what is the benefit of doing: root = tk.Tk() app = Application(master=root) app.mainloop() as opposed to: app = Application() app.mainloop() Also, in the first

Re: Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread Evan Driscoll
On 2/29/2012 23:05, Dan Stromberg wrote: On Wed, Feb 29, 2012 at 8:07 PM, Xah Lee xah...@gmail.com mailto:xah...@gmail.com wrote: This page tells you what's “In-place algorithm”, using {python, perl, emacs lisp} code to illustrate. Aren't in-place reversals rather

Re: pyusb and microchip mcp2210 interface

2012-02-29 Thread Tim Roberts
jobattle jobat...@gmail.com wrote: Has anybody out there had any experience in using the PYUSB library with the new Microchip MCP2210 USB to SPI chip? It appears to the system as a HID device. You don't need to use PyUSB -- it already has a driver. Check libhid -- it has a Python binding. --

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread WJ
Xah Lee wrote: fun example. in-place algorithm for reversing a list in Perl, Python, Lisp http://xahlee.org/comp/in-place_algorithm.html plain text follows What's “In-place Algorithm”? Xah Lee, 2012-02-29 This page tells you what's

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread John Salerno
Yes. You must leave it out. Now I'm reading a Tkinter reference at http://infohost.nmt.edu/tcc/help/pubs/tkinter/minimal-app.html and it has this example: #!/usr/local/bin/python from Tkinter import * class Application(Frame): def __init__(self, master=None):

Re: Is it necessary to call Tk() when writing a GUI app with Tkinter?

2012-02-29 Thread Steven D'Aprano
On Wed, 29 Feb 2012 22:41:53 -0800, John Salerno wrote: Yes. You must leave it out. Now I'm reading a Tkinter reference at http://infohost.nmt.edu/tcc/help/pubs/tkinter/minimal-app.html and it has this example: [...] Could you please stop posting the same message twice? It's very annoying.

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-02-29 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: + f = open(self.procfile, 'r') 'rb' mode is enough here, no need of Unicode ;-) Why? At least to me, 'r' stands for text I/O, whereas 'rb' stands for binary I/O: here, I want to read /proc/PID/statm, which is a textual

[issue14149] argparse usage model requires argument names to be python identifiers

2012-02-29 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: For optional flags like --foo-bar, argparse does munge the dest to foo_bar, following optparse. For positional arguments, arpgarse doesn't munge things this way, but if you want the argument named foo-bar in help messages and foo_bar

[issue13405] Add DTrace probes

2012-02-29 Thread Philip Jenvey
Changes by Philip Jenvey pjen...@underboss.org: -- nosy: -pjenvey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list

[issue13968] Support recursive globs

2012-02-29 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: FWIW, I've also come around to the point of view that it's worthwhile to provide stdlib support for the ** convention (specifically due to the UI aspect that Michael mentions). -- ___ Python

[issue13053] Add Capsule migration documentation to cporting

2012-02-29 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - committed/rejected versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13053 ___

[issue13086] Update howto/cporting.rst so it talks about Python 3 instead of 3.0

2012-02-29 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: patch review - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13086 ___

[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2012-02-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: test_shutil contains partial tests for the archiving functionality. I plan to rewrite some tests so that for example you can see a skip message when bz2 is not available, instead of silent non-testing. Also, the internal functions

[issue14154] reimplement the bigmem test memory watchdog as a subprocess

2012-02-29 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: + f = open(self.procfile, 'r') 'rb' mode is enough here, no need of Unicode ;-) Why? The parent process doesn't read the file content, only the child. The parent only needs a file descriptor. + self.mem_watchdog =

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2012-02-29 Thread Thomas Atkinson
Thomas Atkinson cptn.britt...@gmail.com added the comment: This bug is happening in python 3.2 when trying to build pycrypto on Microsoft Windows 7 -- nosy: +Thomas.Atkinson versions: +Python 3.2 -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue10713] re module doesn't describe string boundaries for \b

2012-02-29 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fc89e09ca2fc by Ezio Melotti in branch '2.7': #10713: Improve documentation for \b and \B and add a few tests. Initial patch and tests by Martin Pool. http://hg.python.org/cpython/rev/fc89e09ca2fc New changeset

[issue10713] re module doesn't describe string boundaries for \b

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the patch! -- assignee: docs@python - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14152] setup.py: Python header file dependencies

2012-02-29 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Dependency support added: 1be93dd179df Last good version (all Include/*.h): 9705ef3fdb22 Current behavior (only pyconfig.h): fa69e891edf4 To answer your question: Neither of the last two revisions builds in an out-of-source directory.

[issue14152] setup.py: Python header file dependencies

2012-02-29 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file24676/issue14152.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14152

[issue14155] Deja vu in re's documentation

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Patch attached. -- assignee: docs@python - ezio.melotti components: +Regular Expressions keywords: +patch nosy: +mrabarnett stage: - patch review Added file: http://bugs.python.org/file24677/issue14155.diff

[issue14152] setup.py: Python header file dependencies

2012-02-29 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Removed file: http://bugs.python.org/file24673/arraymodule_deps.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14152 ___

[issue14152] setup.py: Python header file dependencies

2012-02-29 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- stage: - patch review versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14152 ___

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2012-02-29 Thread Matt Joiner
New submission from Matt Joiner anacro...@gmail.com: If an argument of '-' is handled by argparse.FileType, it defaults to sys.stdin. However a mode of 'rb' is ignored, the returned file object does not work with raw bytes. -- components: Library (Lib) messages: 154612 nosy: anacrolix

[issue14149] argparse: Document how to use argument names that are not Python identifiers

2012-02-29 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: - docs@python components: +Documentation -Library (Lib) keywords: +easy nosy: +docs@python stage: - needs patch title: argparse usage model requires argument names to be python identifiers - argparse: Document how to use argument

[issue14155] Deja vu in re's documentation

2012-02-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Didn’t review all lines in detail but looks globally good. I would not remove Fred’s name though, but move it to another section or the top-level of the file. -- nosy: +eric.araujo ___ Python tracker

[issue14149] argparse: Document how to use argument names that are not Python identifiers

2012-02-29 Thread Joseph Birr-Pixton
Joseph Birr-Pixton jpix...@gmail.com added the comment: I don’t understand, can you rephrase? Sorry, I mean making Namespace subscriptable. eg: v = argparse.Namespace(abc = 123) v Namespace(abc=123) v.abc 123 v['abc'] Traceback (most recent call last): File stdin, line 1, in module

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2012-02-29 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +bethard, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14156 ___ ___ Python-bugs-list

[issue14152] setup.py: Python header file dependencies

2012-02-29 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: To answer your question: Neither of the last two revisions builds in an out-of-source directory. My question was more whether the last known good revision did :) Here's a patch. Tested with Python built in the top-level dir and in another dir,

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-02-29 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I'm busy adding the C-API changes to the docs. Regarding the stable ABI: The general mood was to *keep* the removal of the buffer interface for some time, did I get that right? In that case this removal (especially of the Py_buffer

[issue14155] Deja vu in re's documentation

2012-02-29 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 3958121a027f by Ezio Melotti in branch '2.7': #14155: remove duplication about search vs match in re doc. http://hg.python.org/cpython/rev/3958121a027f New changeset 4114e816a71b by Ezio Melotti in branch '3.2':

[issue14155] Deja vu in re's documentation

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed. I changed something, as suggested by Éric. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14157] time.strptime without a year fails on Feb 29

2012-02-29 Thread Martin Morrison
New submission from Martin Morrison martin.morri...@gmail.com: time.strptime without a year fails on Feb 29 with: time.strptime(Feb 29, %b %d) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/_strptime.py, line 454, in _strptime_time return

[issue8170] Wrong Paths for distutils build --plat-name=win-amd64

2012-02-29 Thread Robin Becker
Robin Becker rgbec...@users.sourceforge.net added the comment: That would be a solution if we had a separate 64 bit machine extra versions of Visual Studio, but the actual bug is with the cross-compiling behaviour. If it's not supposed to work then this isn't a bug and section 5.4 should go;

[issue14150] AIX, crash loading shared module into another process than python like operator.so results in 0509-130

2012-02-29 Thread Jan Stürtz
Jan Stürtz stue...@googlemail.com added the comment: Created a patch to fix the configure script, to get the right python.exp File. -- keywords: +patch Added file: http://bugs.python.org/file24678/Python-2.7.2-configure.aix.patch ___ Python tracker

[issue14089] Patch to increase fractions lib test coverage

2012-02-29 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8e00de3acb44 by Ezio Melotti in branch '2.7': #14089: increase coverage of the fractions module. Patch by Oleg Plakhotnyuk. http://hg.python.org/cpython/rev/8e00de3acb44 New changeset 0bbc2549e1ee by Ezio Melotti

[issue14089] Patch to increase fractions lib test coverage

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: patch review - committed/rejected status: open - closed type: behavior - enhancement ___ Python tracker

[issue13394] Patch to increase aifc lib test coverage

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Converting prints to warnings on 3.2 might not be a good idea. I can probably still apply the rest of the patch there, and change the warnings on 3.3 only. -- ___ Python tracker

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2012-02-29 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Matthew, do you think this should be documented somewhere or that the behavior should be changed (e.g. raising a warning when 65535 is used)? If not I'll just close the issue. -- ___ Python

  1   2   >