Subject: mrjob v0.2.6 released

2011-05-25 Thread Jimmy Retzlaff
What is mrjob? - mrjob is a Python package that helps you write and run Hadoop Streaming jobs. mrjob fully supports Amazon's Elastic MapReduce (EMR) service, which allows you to buy time on a Hadoop cluster on an hourly basis. It also works with your own Hadoop cluster. Some

ANN: eGenix mxODBC - Python ODBC Database Interface 3.1.1

2011-05-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC - Python ODBC Database Interface Version 3.1.1 mxODBC is our commercially supported Python extension providing ODBC database connectivity to

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Xah Lee
On May 24, 3:06 pm, Rikishi42 skunkwo...@rikishi42.net wrote: On 2011-05-24, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I think that is a patronizing remark that under-estimates the intelligence of lay people and over-estimates the difficulty of understanding recursion.

Re: Beginner needs advice

2011-05-25 Thread Lew Schwartz
So, if I read between the lines correctly, you recommend Python 3? Does the windows version install with a development environment? -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining a full path name from file

2011-05-25 Thread Ulrich Eckhardt
RVince wrote: s = C:\AciiCsv\Gravity_Test_data\A.csv f = open(s,r) How do I obtain the full pathname given the File, f? Apart from the issue that the 'name' attribute is only the name used to open the file, there is another issue, though not on the platform you're using: Multiple directory

Re: Code Review

2011-05-25 Thread Peter Otten
ad wrote: Please review the code pasted below. I am wondering what other ways there are of performing the same tasks. This was typed using version 3.2. The script is designed to clean up a directory (FTP, Logs, etc.) Basically you pass two arguments. The first argument is an number of days

Re: Obtaining a full path name from file

2011-05-25 Thread Tim Golden
On 25/05/2011 07:36, Ulrich Eckhardt wrote: RVince wrote: s = C:\AciiCsv\Gravity_Test_data\A.csv f = open(s,r) How do I obtain the full pathname given the File, f? Apart from the issue that the 'name' attribute is only the name used to open the file, there is another issue, though not on the

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Thorsten Kampe
* Rikishi42 (Wed, 25 May 2011 00:06:06 +0200) On 2011-05-24, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I think that is a patronizing remark that under-estimates the intelligence of lay people and over-estimates the difficulty of understanding recursion. Why would

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Thorsten Kampe
* Chris Angelico (Wed, 25 May 2011 08:01:38 +1000) On Wed, May 25, 2011 at 3:39 AM, D'Arcy J.M. Cain da...@druid.net wrote: One of my favorite quotes (not sure if it was about Perl or APL) is I refuse to use a programming language where the proponents of it stick snippets under each

Re: File access denied after subprocess completion on Windows platform

2011-05-25 Thread Tim Golden
On 24/05/2011 21:18, Claudiu Nicolaie CISMARU wrote: Now. There is one more issue. Seems that on faster computers and/or Windows 7 (the Win32 thing I have tested on a HVM Xen machine with Windows XP) the os.rename is too fast after fp.close() and generates the same Exception. The code follows:

Re: Code Review

2011-05-25 Thread Chris Torek
In article 37ba7b40-3663-4094-b507-696fc598b...@l26g2000yqm.googlegroups.com ad adsquai...@gmail.com wrote: Please review the code pasted below. I am wondering what other ways there are of performing the same tasks. ... I imagine one enhancement would be to create a function out of some of this.

BEST WAY TO EARN DOLLARS FROM COMPANY JUST SUBSCRIBE AND SEE , JOIN NOW

2011-05-25 Thread shoba kasthuri
shoba.1...@rediffmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Xah Lee
On May 25, 12:26 am, Thorsten Kampe thors...@thorstenkampe.de wrote: * Rikishi42 (Wed, 25 May 2011 00:06:06 +0200) On 2011-05-24, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I think that is a patronizing remark that under-estimates the intelligence of lay people

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Chris Angelico
On Wed, May 25, 2011 at 5:51 PM, Xah Lee xah...@gmail.com wrote: well said. half of posts in this thread are from idiots. just incredible, but again, its newsgroups ... what am i thinking ...  Xah Thank you. As soon as we figure out which half of us you just publicly insulted, we'll see

Re: Code Review

2011-05-25 Thread Ulrich Eckhardt
ad wrote: Please review the code pasted below. I am wondering what other ways there are of performing the same tasks. On a unix system, you would call find with according arguments and then handle the found files with -exec rm ... or something like that, but I see you are on MS Windows.

pyGTK identify a button

2011-05-25 Thread Tracubik
Hi all, i'm trying to write a simple windows with two button in GTK, i need a way to identify wich button is pressed. Consider that: the two button are connected (when clicked) to infoButton(self, widget, data=None) infoButton() is something like this infoButton(self, widget, data=None):

Re: File access denied after subprocess completion on Windows platform

2011-05-25 Thread Claudiu Nicolaie CISMARU
There used to be a problem with subprocess fds being held by a traceback. IIRC, the problem could be triggered by having an except clause around a subprocess call within which something attempted to, eg, remove one of the affected files. I have no subprocess call.. in this last issue. And

Re: pyGTK identify a button

2011-05-25 Thread Claudiu Nicolaie CISMARU
the two button are connected (when clicked) to infoButton(self, widget, data=None) From documentation: handler_id = object.connect(name, func, func_data) So: button1.connect(when is pressed, your_function, 1) button2.connect(when is pressed, your_function, 2) (This code is conception, I

Re: Hotshoting recursive function

2011-05-25 Thread Gabriel Genellina
En Sun, 22 May 2011 10:42:08 -0300, Selvam s.selvams...@gmail.com escribió: I am using hotshot module to profile my python function. I used the details from ( http://code.activestate.com/recipes/576656-quick-python-profiling-with-hotshot/ ). The function I profile is a recursive one and I

Re: Link errors embedding Python 3.2

2011-05-25 Thread Chris Angelico
Followup. I'm now using Python 3.3 straight from Mercurial, and am seeing the same issues. I've managed to get the compilation step to succeed by naming the library for full inclusion and adding -lutil -ldl (sounding rather Donizetti there), and my program runs. However, it's unable to import all

Re: pyGTK identify a button

2011-05-25 Thread Tracubik
On 25/05/2011 10:44, Claudiu Nicolaie CISMARU wrote: the two button are connected (when clicked) to infoButton(self, widget, data=None) From documentation: handler_id = object.connect(name, func, func_data) So: button1.connect(when is pressed, your_function, 1) button2.connect(when is

Re: pyGTK identify a button

2011-05-25 Thread Chris Angelico
On Wed, May 25, 2011 at 6:18 PM, Tracubik affdfsdfds...@b.com wrote: Hi all, i'm trying to write a simple windows with two button in GTK, i need a way to identify wich button is pressed. Consider that: the two button are connected (when clicked) to infoButton(self, widget, data=None) I'm

Re: pyGTK identify a button

2011-05-25 Thread Claudiu Nicolaie CISMARU
thanks but, as i've sayed before, i can't use func_data 'cause i don't know how to set it on glade3.8, that is the program i use to create the GUI. Anyway, i think this is the only way to identify the button :-/ Hack into the generated source! -- Claudiu Nicolaie CISMARU GNU GPG

Re: Beginner needs advice

2011-05-25 Thread Jean-Michel Pichavant
Lew Schwartz wrote: So, if I read between the lines correctly, you recommend Python 3? Does the windows version install with a development environment? If you want to use python 3, make sure before that all the good stuff you need (==modules) have been ported to python 3. If you are a

Re: pexpect: TIMEOUT no longer clears child.before

2011-05-25 Thread Gabriel Genellina
En Thu, 19 May 2011 08:29:21 -0300, Adrian Casey m...@agcasey.com escribió: The behaviour of pexpect has changed between version 2.1 and 2.3. In version 2.1, the following code would result in child.before being cleared -: child.expect(pexpect.TIMEOUT,1) In version 2.3, this is no

[pyodbc] Setting values to SQL_* constants while creating a connection

2011-05-25 Thread srinivasan munisamy
Hi, I would like to know how to set values to values to SQL_* constants while creating a db connection through pyodbc module. For example, i am getting a connection object like below: In [27]: dbh1 = pyodbc.connect(DSN=dsn;UID= uid;PWD=pwd;DATABASE=database;APP=app_name) In [28]:

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 08:14:27 +1000, Chris Angelico wrote: On Wed, May 25, 2011 at 3:40 AM, Xah Lee xah...@gmail.com wrote: On May 23, 9:28 pm, Chris Angelico ros...@gmail.com wrote: Because I do not consider its behaviour to be errant. And I suspect its main developers won't either. That's

Re: Obtaining a full path name from file

2011-05-25 Thread Dave Angel
On 01/-10/-28163 02:59 PM, RVince wrote: s = C:\AciiCsv\Gravity_Test_data\A.csv f = open(s,r) How do I obtain the full pathname given the File, f? (which should equal C:\AciiCsv\Gravity_Test_data). I've tried all sorts of stuff and am just not finding it. Any help greatly appreciated ! I saw

ANN: eGenix mxODBC - Python ODBC Database Interface 3.1.1

2011-05-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC - Python ODBC Database Interface Version 3.1.1 mxODBC is our commercially supported Python extension providing ODBC database connectivity to

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Roy Smith
In article mailman.2052.1306303508.9059.python-l...@python.org, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 24 May 2011 13:39:02 -0400, D'Arcy J.M. Cain da...@druid.net declaimed the following in gmane.comp.python.general: My point was that even proponents of the language can

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Chris Angelico
On Wed, May 25, 2011 at 9:36 PM, Roy Smith r...@panix.com wrote: Remembering that I, J, K, L, M, and N were integer was trivial if you came from a math background.  And, of course, Fortran was all about math, so that was natural.  Those letters are commonly used for integers in formulae.  If I

Re: Why did Quora choose Python for its development?

2011-05-25 Thread John Bokma
Dennis Lee Bieber wlfr...@ix.netcom.com writes: Python books than after six months of trying to understand PERL... And Perl is the language, and perl is what runs Perl. -- John Bokma j3b Blog: http://johnbokma.com/Perl

Re: Why did Quora choose Python for its development?

2011-05-25 Thread John Bokma
Thorsten Kampe thors...@thorstenkampe.de writes: * Chris Angelico (Wed, 25 May 2011 08:01:38 +1000) On Wed, May 25, 2011 at 3:39 AM, D'Arcy J.M. Cain da...@druid.net wrote: One of my favorite quotes (not sure if it was about Perl or APL) is I refuse to use a programming language where

Unable to make ironpython run in browser with silverlight

2011-05-25 Thread ErichCart ErichCart
Basically i am following this tutorial: http://blog.jimmy.schementi.com/2010/03/pycon-2010-python-in-browser.html According to it, this code should run fine: !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head script type=text/javascript

mresh

2011-05-25 Thread Vijayakumar Vijayakumar
website -- www.srilakshmi.infoinyohyou -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Roy Smith
In article mailman.2069.1306324514.9059.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Wed, May 25, 2011 at 9:36 PM, Roy Smith r...@panix.com wrote: Remembering that I, J, K, L, M, and N were integer was trivial if you came from a math background.  And, of course, Fortran

Re: Beginner needs advice

2011-05-25 Thread Colin J. Williams
On 25-May-11 02:22 AM, Lew Schwartz wrote: So, if I read between the lines correctly, you recommend Python 3? Does the windows version install with a development environment? It would be safer to stick with Python 2.7 initially and then consider the transition to 3.2 later. No, there is

Newbie string questions

2011-05-25 Thread Matty Sarro
Hey everyone, This is a super noob question, so please be gentle. I am working my way through Learn Python the Hard Way using both python 2.7 and python 3.1 (I want to get a handle on the differences between the two - the intention to write things in python 3 but be able to understand things from

Re: Newbie string questions

2011-05-25 Thread Chris Angelico
On Wed, May 25, 2011 at 11:06 PM, Matty Sarro msa...@gmail.com wrote: Right now what is stumping me... what exactly does %r do? You're talking about the formatting operator? It's like the repr function: http://docs.python.org/library/functions.html#repr Chris Angelico --

Re: Newbie string questions

2011-05-25 Thread Chris Guidry
On Wednesday, May 25, 2011 9:06:02 AM UTC-4, Matty Sarro wrote: can't seem to find some of the items in the documentation. Right now what is stumping me... what exactly does %r do? I can't find it in the documentation anywhere. Matty, %r in a format string is very much like %s. %s calls

Re: Newbie string questions

2011-05-25 Thread Matty Sarro
Thanks guys! I appreciate it. I was wondering why %r was always showing things enclosed in single-quotes. On Wed, May 25, 2011 at 9:13 AM, Chris Guidry ch...@theguidrys.us wrote: On Wednesday, May 25, 2011 9:06:02 AM UTC-4, Matty Sarro wrote: can't seem to find some of the items in the

FW: python

2011-05-25 Thread Shawnta Henman
python We should take a look at how this latest good fortune is going to change your lifestyle. Don't you remember all of those times I said how hard it's been just to get by? Alright you know what?, Your computer is going to be your very best pal once you try out this thing for one month's

Re: Unable to make ironpython run in browser with silverlight

2011-05-25 Thread ErichCart ErichCart
Here is how it looks on free webhosting account: http://silverlighttest.zzl.org/silverlighttest.html It is supposed to show a window with Hello from python, but it shows smth else completely. -- http://mail.python.org/mailman/listinfo/python-list

Re: Code Review

2011-05-25 Thread ad
On May 25, 4:06 am, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: ad wrote: Please review the code pasted below. I am wondering what other ways there are of performing the same tasks. On a unix system, you would call find with according arguments and then handle the found files

Re: Why did Quora choose Python for its development?

2011-05-25 Thread D'Arcy J.M. Cain
On Wed, 25 May 2011 07:36:40 -0400 Roy Smith r...@panix.com wrote: Remembering that I, J, K, L, M, and N were integer was trivial if you came from a math background. And, of course, Fortran was all about The easiest way to remember was that the first two letters of INteger gave you the

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Chris Angelico
On Thu, May 26, 2011 at 12:23 AM, D'Arcy J.M. Cain da...@druid.net wrote: The easiest way to remember was that the first two letters of INteger gave you the range. G for Green and R for Right, which are the first two letters of Green. (I wonder how many Pythonistas are familiar with that?)

Re: Code Review

2011-05-25 Thread Iain King
On May 25, 2:44 pm, ad adsquai...@gmail.com wrote: On May 25, 4:06 am, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: ad wrote: Please review the code pasted below. I am wondering what other ways there are of performing the same tasks. On a unix system, you would call find

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 10:23:59 -0400, D'Arcy J.M. Cain wrote: On Wed, 25 May 2011 07:36:40 -0400 Roy Smith r...@panix.com wrote: Remembering that I, J, K, L, M, and N were integer was trivial if you came from a math background. And, of course, Fortran was all about The easiest way to

Kind of OT - Books on software development?

2011-05-25 Thread Matty Sarro
Hey everyone, I am looking at some projects coming up, which may or may not involve python. So I figured I would throw the question out there and see what everyone thinks. I am looking for some books on software engineering/development... something that discusses techniques from ideation, up

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Matty Sarro
I hate using L for anything, namely because if you type it lowercase you always have to wonder if its an l or a 1 in a terminal window. -Matthew On Wed, May 25, 2011 at 10:56 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 25 May 2011 10:23:59 -0400, D'Arcy J.M. Cain

Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
I do not have my library with me, but I remember a book that fits the bill exactly, is was from Microsoft Press, I think it was called Writing Solid Code Hope this helps, -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com --- On Wed, 5/25/11, Matty Sarro msa...@gmail.com wrote:

Re: Kind of OT - Books on software development?

2011-05-25 Thread gregarican
On May 25, 11:45 am, Ed Keith e_...@yahoo.com wrote: I do not have my library with me, but I remember a book that fits the bill exactly, is was from Microsoft Press, I think it was called Writing Solid Code Hope this helps,    -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com

Re: Kind of OT - Books on software development?

2011-05-25 Thread Verde Denim
Hey everyone, I am looking at some projects coming up, which may or may not involve python. So I figured I would throw the question out there and see what everyone thinks. I am looking for some books on software engineering/development... something that discusses techniques from ideation, up

Re: pyGTK identify a button

2011-05-25 Thread Cousin Stanley
Tracubik wrote: Hi all, i'm trying to write a simple windows with two button in GTK, i need a way to identify wich button is pressed. #!/usr/bin/env python import gtk def console_display( button , args ) : a0 , a1 , a2 = args print '%s %s %s ' % ( a0 , a1 , a2 )

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Terry Reedy
On 5/25/2011 8:01 AM, John Bokma wrote: to. Like I already stated before: if Python is really so much better than Python readability wise, why do I have such a hard time dropping Perl and moving on? [you meant 'than Perl'] You are one of the people whose brain fits Perl (or vice versa)

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Ethan Furman
Terry Reedy wrote: On 5/25/2011 8:01 AM, John Bokma wrote: to. Like I already stated before: if Python is really so much better than Python readability wise, why do I have such a hard time dropping Perl and moving on? [you meant 'than Perl'] You are one of the people whose brain fits Perl

Re: Kind of OT - Books on software development?

2011-05-25 Thread Ed Keith
--- On Wed, 5/25/11, Ed Keith e_...@yahoo.com wrote: I do not have my library with me, but I remember a book that fits the bill exactly, is was from Microsoft Press, I think it was called Writing Solid Code I have done some research at amazon.com, and while Writing Solid Code is an excellent

super() in class defs?

2011-05-25 Thread Jess Austin
I may be attempting something improper here, but maybe I'm just going about it the wrong way. I'm subclassing http.server.CGIHTTPRequestHandler, and I'm using a decorator to add functionality to several overridden methods. def do_decorate(func): . def wrapper(self): . if appropriate(): .

Cherrypy

2011-05-25 Thread Bryton
Is anyone having a step by step tutorial of cherrypy(or book title).I have used the tutorial in their site as well as the book (cherrypy essentials) and I would like to have a one that is a bit more step by step...Please help... -- Regards, Bryton. --

Newbie question about SQLite + Python and twitter

2011-05-25 Thread Jayme Proni Filho
Helo guys, I'm building a local application for twitter for my brother's store. I'm in the beginning and I have some newbie problems, so: I create a table called tb_messages with int auto increment and varchar(140) fields; I did three SQL funcionts, insert_tweet, delete_tweet, select_tweet

Re: super() in class defs?

2011-05-25 Thread Ian Kelly
On Wed, May 25, 2011 at 11:54 AM, Jess Austin jess.aus...@gmail.com wrote: So I guess that when super() is called in the context of a class def rather than that of a method def, it doesn't have the information it needs. Now I'll probably just say:    do_GET =

Re: Why did Quora choose Python for its development?

2011-05-25 Thread John Bokma
Ethan Furman et...@stoneleaf.us writes: Terry Reedy wrote: On 5/25/2011 8:01 AM, John Bokma wrote: to. Like I already stated before: if Python is really so much better than Python readability wise, why do I have such a hard time dropping Perl and moving on? [you meant 'than Perl'] You are

Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread tkp...@hotmail.com
The following function that returns the last line of a file works perfectly well under Python 2.71. but fails reliably under Python 3.2. Is this a bug, or am I doing something wrong? Any help would be greatly appreciated. import os def lastLine(filename): ''' Returns the last line

bdist_wininst: install_script not run on uninstall

2011-05-25 Thread Wilbert Berendsen
Hi, according to the docs the installer bdist_wininst creates will run the install-script on install with -install (which works perfectly) and on uninstall with the -remove argument (which seemingly never happens). However I want to cleanup some registry stuff on uninstall so I want the

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread MRAB
On 25/05/2011 20:33, tkp...@hotmail.com wrote: The following function that returns the last line of a file works perfectly well under Python 2.71. but fails reliably under Python 3.2. Is this a bug, or am I doing something wrong? Any help would be greatly appreciated. import os def

Re: super() in class defs?

2011-05-25 Thread Eric Snow
On Wed, May 25, 2011 at 12:31 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Wed, May 25, 2011 at 11:54 AM, Jess Austin jess.aus...@gmail.com wrote: So I guess that when super() is called in the context of a class def rather than that of a method def, it doesn't have the information it

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ian Kelly
On Wed, May 25, 2011 at 2:00 PM, MRAB pyt...@mrabarnett.plus.com wrote: You're opening the file in text mode, and seeking relative to the end of the file is not allowed in text mode, presumably because the file contents have to be decoded, and, in general, seeking to an arbitrary position

using masks and numpy record arrays

2011-05-25 Thread Catherine Moroney
Hello, I am trying to work with a structured array and a mask, and am encountering some problems. For example: xtype = numpy.dtype([(n, numpy.int32), (x, numpy.float32)]) a = numpy.zeros((4), dtype=xtype) b = numpy.arange(0,4) a2 = numpy.zeros((4), dtype=xtype) mask = numpy.where(b%2 ==

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Matty Sarro
On Wed, May 25, 2011 at 3:14 PM, John Bokma j...@castleamber.com wrote: Ethan Furman et...@stoneleaf.us writes: Terry Reedy wrote: On 5/25/2011 8:01 AM, John Bokma wrote: to. Like I already stated before: if Python is really so much better than Python readability wise, why do I have such a

Re: using masks and numpy record arrays

2011-05-25 Thread Robert Kern
On 5/25/11 3:27 PM, Catherine Moroney wrote: Hello, I am trying to work with a structured array and a mask, and am encountering some problems. You will want to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists For example: xtype = numpy.dtype([(n,

Re: Why did Quora choose Python for its development?

2011-05-25 Thread theg...@nospam.net
On 5/24/2011 1:39 PM, D'Arcy J.M. Cain wrote: [snip] One of my favorite quotes (not sure if it was about Perl or APL) is I refuse to use a programming language where the proponents of it stick snippets under each other's nose and say 'I bet you can't guess what this does.' I dunno. That sounds

Re: super() in class defs?

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 12:31:33 -0600, Ian Kelly wrote: I would recommend against using super() in general. http://fuhm.net/super-harmful/ If you actually read that article, carefully, without being fooled by the author's provocative ex-title and misleading rhetoric, you will discover that

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread MRAB
On 25/05/2011 21:54, Ian Kelly wrote: On Wed, May 25, 2011 at 2:00 PM, MRABpyt...@mrabarnett.plus.com wrote: You're opening the file in text mode, and seeking relative to the end of the file is not allowed in text mode, presumably because the file contents have to be decoded, and, in general,

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 09:26:11 +0200, Thorsten Kampe wrote: Naming something in the terms of its implementation details (in this case recursion) is a classical WTF. *If* that's true, it certainly doesn't seem to apply to real-world objects. Think about the exceptions: microwave oven vacuum

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 00:06:06 +0200, Rikishi42 wrote: On 2011-05-24, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I think that is a patronizing remark that under-estimates the intelligence of lay people and over-estimates the difficulty of understanding recursion. Why would

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 07:01:07 -0500, John Bokma wrote: if Python is really so much better than Python [Perl] readability wise, why do I have such a hard time dropping Perl and moving on? My guess is that you have an adversarial view of computer languages, therefore after investing so much

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 08:01:38 +1000, Chris Angelico wrote: On Wed, May 25, 2011 at 3:39 AM, D'Arcy J.M. Cain da...@druid.net wrote: When I first looked at Perl it looked like line noise.  When I first looked at Python it looked like pseudo-code. When I first looked at assembly language it

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread tkp...@hotmail.com
Thanks for the guidance - it was indeed an issue with reading in binary vs. text., and I do now succeed in reading the last line, except that I now seem unable to split it, as I demonstrate below. Here's what I get when I read the last line in text mode using 2.7.1 and in binary mode using 3.2

Re: super() in class defs?

2011-05-25 Thread Carl Banks
On Wednesday, May 25, 2011 10:54:11 AM UTC-7, Jess Austin wrote: I may be attempting something improper here, but maybe I'm just going about it the wrong way. I'm subclassing http.server.CGIHTTPRequestHandler, and I'm using a decorator to add functionality to several overridden methods. def

Re: super() in class defs?

2011-05-25 Thread Ian Kelly
On Wed, May 25, 2011 at 3:40 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: If you actually read that article, carefully, without being fooled by the author's provocative ex-title and misleading rhetoric, you will discover that super is not harmful. What is harmful is making

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ethan Furman
tkp...@hotmail.com wrote: Thanks for the guidance - it was indeed an issue with reading in binary vs. text., and I do now succeed in reading the last line, except that I now seem unable to split it, as I demonstrate below. Here's what I get when I read the last line in text mode using 2.7.1 and

Re: bdist_wininst: install_script not run on uninstall

2011-05-25 Thread Mark Hammond
On 26/05/2011 5:28 AM, Wilbert Berendsen wrote: Hi, according to the docs the installer bdist_wininst creates will run the install-script on install with -install (which works perfectly) and on uninstall with the -remove argument (which seemingly never happens). However I want to cleanup some

Re: super() in class defs?

2011-05-25 Thread Raymond Hettinger
On May 25, 4:31 pm, Ian Kelly ian.g.ke...@gmail.com wrote: Right.  It's unnecessary, so why saddle yourself with it? FWIW, I expect to release a blog post tomorrow about the principal use cases for super() and how to use it effectively. With just a little bit of know-how, it can be an important

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Steven D'Aprano
On Wed, 25 May 2011 17:30:48 -0400, theg...@nospam.net wrote: On 5/24/2011 1:39 PM, D'Arcy J.M. Cain wrote: [snip] One of my favorite quotes (not sure if it was about Perl or APL) is I refuse to use a programming language where the proponents of it stick snippets under each other's nose and

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread MRAB
On 26/05/2011 00:25, tkp...@hotmail.com wrote: Thanks for the guidance - it was indeed an issue with reading in binary vs. text., and I do now succeed in reading the last line, except that I now seem unable to split it, as I demonstrate below. Here's what I get when I read the last line in text

Re: Why did Quora choose Python for its development?

2011-05-25 Thread RainyDay
On May 25, 3:14 pm, John Bokma j...@castleamber.com wrote: Ethan Furman et...@stoneleaf.us writes: Terry Reedy wrote: On 5/25/2011 8:01 AM, John Bokma wrote: to. Like I already stated before: if Python is really so much better than Python readability wise, why do I have such a hard time

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ethan Furman
MRAB wrote: On 26/05/2011 00:25, tkp...@hotmail.com wrote: Thanks for the guidance - it was indeed an issue with reading in binary vs. text., and I do now succeed in reading the last line, except that I now seem unable to split it, as I demonstrate below. Here's what I get when I read the last

Re: Unable to make ironpython run in browser with silverlight

2011-05-25 Thread Jimmy Schementi
You need to run it from a web-server; it doesn't work when running from file:// due to Silverlight's security sandbox. Read the comments on my blog-post, it mentions the web-server there. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python-list Digest, Vol 92, Issue 221

2011-05-25 Thread Richard Parker
Writing code is primarily for *human readers*. Once you've compiled the code once, the computer never need look at it again, but human being come back to read it over and over again, to learn from it, or for maintenance. We rightfully value our own time and convenience as more valuable

Re: Python 3.2 bug? Reading the last line of a file

2011-05-25 Thread Ian Kelly
On Wed, May 25, 2011 at 3:52 PM, MRAB pyt...@mrabarnett.plus.com wrote: What do you mean by may include the decoder state in its return value? It does make sense that the values returned from tell() won't be in the middle of an encoded sequence of bytes. If you take a look at the source code,

Re: Cherrypy

2011-05-25 Thread Miki Tebeka
I wrote http://drdobbs.com/showArticle.jhtml?articleID=199102936queryText=query way back then. It might be of some help. If you have any specific questions, feel free to post them to the group. -- http://mail.python.org/mailman/listinfo/python-list

Re: Odp: Re: Strange behaviour of input() function (Python 3.2)

2011-05-25 Thread Algis Kabaila
On Wednesday 25 May 2011 06:27:52 sunrrrise wrote: Ok, another time I'd like to thank you for your help. I gave up, I'm going to get used to IDLE GUI... at least this one works! With IDLE, after any changes to the program, you are asked to save file. IDLE knows that a file in python needs to

Re: Unable to make ironpython run in browser with silverlight

2011-05-25 Thread Sunny
On May 26, 9:44 am, Jimmy Schementi jscheme...@gmail.com wrote: You need to run it from a web-server; it doesn't work when running from file:// due to Silverlight's security sandbox. Read the comments on my blog-post, it mentions the web-server there. I see.. But here:

Re: Newbie question about SQLite + Python and twitter

2011-05-25 Thread Philip Semanchuk
On May 25, 2011, at 2:17 PM, Jayme Proni Filho wrote: Helo guys, I'm building a local application for twitter for my brother's store. I'm in the beginning and I have some newbie problems, so: I create a table called tb_messages with int auto increment and varchar(140) fields; I did

Re: Unable to make ironpython run in browser with silverlight

2011-05-25 Thread ErichCart ErichCart
On May 26, 9:44 am, Jimmy Schementi jscheme...@gmail.com wrote: You need to run it from a web-server; it doesn't work when running from file:// due to Silverlight's security sandbox. Read the comments on my blog-post, it mentions the web-server there. I see.. But here:

Re: Why did Quora choose Python for its development?

2011-05-25 Thread John Bokma
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: On Wed, 25 May 2011 07:01:07 -0500, John Bokma wrote: if Python is really so much better than Python [Perl] readability wise, why do I have such a hard time dropping Perl and moving on? My guess is that you have an adversarial

Re: English Idiom in Unix: Directory Recursively

2011-05-25 Thread Chris Angelico
On Thu, May 26, 2011 at 8:58 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: ... For everyone else, I'll use an ordinary adult vocabulary, and that includes the word recursion or recursive. Overheard yesterday: Our conversation was recursing... I don't know what they were

Re: Python-list Digest, Vol 92, Issue 221

2011-05-25 Thread Chris Angelico
On Thu, May 26, 2011 at 10:58 AM, Richard Parker r.richardpar...@comcast.net wrote: It's time to stop having flame wars about languages and embrace programmers who care enough about possible future readers of their code to thoroughly comment it. Comments are far more valuable than the actual

Re: Why did Quora choose Python for its development?

2011-05-25 Thread Ben Finney
Get a life. Or better, just fuck off and die. It will improve both the world and the Python community, of which you are nothing but a little, smelly shitstain. That abuse is entirely unwelcome in this community, against any person. Please desist. If you find any contributing members so

Parse config file and command-line arguments, to get a single collection of options

2011-05-25 Thread Ben Finney
Howdy all, Python's standard library has modules for configuration file parsing (configparser) and command-line argument parsing (optparse, argparse). I want to write a program that does both, but also: * Has a cascade of options: default option values, overridden by config file options,

  1   2   3   >