Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
On 22/12/2010 18:57, Jim Pharis wrote: > are you running make clean for good measure? Yes, i am. I am gong to try and uninstall Python2.7 from $HOME/local and see if that makes a difference. Maybe it interferes with the build process? Regards, Benedict -- http://mail.python.org/mailman/listinf

Re: simple games w/o pygame

2010-12-22 Thread scattered
On Dec 22, 11:40 am, William Gill wrote: > I am teaching an 11 year old who wants to learn programming.  I chose > Python, and it is working well.  I seem to remember lots of simple > script games, like quizzes, number games etc. that would be good for his > tutorial.  However, now all I can find

Re: Python programming

2010-12-22 Thread Dan Stromberg
If it's a big list and you're checking multiple times, you're probably better off converting the list to a set, and using "in" on the set. Once you have your list converted to a set, you can update both quickly. On Wed, Dec 22, 2010 at 5:22 PM, Maurice Shih wrote: > Dear python-list@python.org,

Re: Re: Python Web App

2010-12-22 Thread hidura
Which is exactly the problem with web apps that are highly interactive. My suggestion, is not to develope a web based IDE or use one. It just isn't something that the web was designed to do well. Is not a problem of the IDE, the problem is on what the developer expect as i said i you want someth

Re: Python Web App

2010-12-22 Thread Tim Harig
On 2010-12-23, Hidura wrote: > Ok, but you are comparing a web-based framework with a native-based > framework that use the components of the system to make all the things > that need, a web-based framewok use the resourses of the browser to Right. That is exactly what I am comparing. > make it

Re: general problem when subclassing a built-in class

2010-12-22 Thread Owen Jacobson
On 2010-12-22 20:22:36 -0500, kj said: Suppose that you want to implement a subclass of built-in class, to meet some specific design requirements. Where in the Python documentation can one find the information required to determine the minimal[1] set of methods that one would need to override t

Re: issubclass(dict, Mapping)

2010-12-22 Thread Steven D'Aprano
On Thu, 23 Dec 2010 01:41:08 +, kj wrote: > In <4d127d5e$0$29997$c3e8da3$54964...@news.astraweb.com> Steven D'Aprano > writes: > >>On Wed, 22 Dec 2010 14:20:51 +, kj wrote: > >>> Here's another example, fresh from today's crop of wonders: >>> >>> (v. 2.7.0) >> from collections impo

Re: How to pop the interpreter's stack?

2010-12-22 Thread Steven D'Aprano
On Wed, 22 Dec 2010 13:53:20 -0800, Carl Banks wrote: > On Dec 22, 8:52 am, kj wrote: >> In Robert Kern >> writes: >> >> >Obfuscating the location that an exception gets raised prevents a lot >> >of debugging... >> >> The Python interpreter does a lot of that "obfuscation" already, and I >> fin

Re: Python Web App

2010-12-22 Thread Hidura
Ok, but you are comparing a web-based framework with a native-based framework that use the components of the system to make all the things that need, a web-based framewok use the resourses of the browser to make it all, so the developer that use a framework on the web can't expect get the same resu

Re: Generator question

2010-12-22 Thread Victor Eijkhout
Dan Stromberg wrote: > You likely want a class variable: Sounds like an elegant solution. Thanks! Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Web App

2010-12-22 Thread Tim Harig
[Reordered to preserve context in bottom posting] On 2010-12-23, Hidura wrote: > 2010/12/22, Tim Harig : >> On 2010-12-22, Sean wrote: >>> Anybody know where I can find a Python Development Environment in the >>> form of a web app for use with Chrome OS. I have been looking for a >>> few days and

Re: Python programming

2010-12-22 Thread Anurag Chourasia
Here you go. $ python Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> A=[2,6,5] >>> if 5 in A: ... print 'Yes' ... else: ... print 'No' ... Yes

Re: Python programming

2010-12-22 Thread Max Countryman
>>> 5 in [2, 6, 5] True Sent from my iPhone On Dec 22, 2010, at 20:22, Maurice Shih wrote: > Dear python-list@python.org, > Thank you for taking the time to listen to my request. I'm a beginner > programmer and I se python 2.6. I am making a program that needs a command > that can check if a

Re: using python ftp

2010-12-22 Thread MRAB
On 23/12/2010 02:12, Anurag Chourasia wrote: Hi Matt, I have a snippet to "upload" files (that match a particular search pattern) to a remote server. Variable names are self explanatory. You could tweak this a little to "download" files instead. from ftplib import FTP ftp = FTP(hostname) ftp.l

Re: Python Web App

2010-12-22 Thread Hidura
My framework let you store online on a hosting server that the same framework provide. 2010/12/22, Hidura : > Use editarea, that's the best option if you want something small, but > as i said before i am developing a framework that allows you to create > app's from the web and is much more complet

Re: Python Web App

2010-12-22 Thread Hidura
Use editarea, that's the best option if you want something small, but as i said before i am developing a framework that allows you to create app's from the web and is much more complete than editarea. 2010/12/22, Sean : > I am wanting to learn python and I am test a Chrome OS notebook at the > sam

Re: using python ftp

2010-12-22 Thread Anurag Chourasia
Hi Matt, I have a snippet to "upload" files (that match a particular search pattern) to a remote server. Variable names are self explanatory. You could tweak this a little to "download" files instead. from ftplib import FTP ftp = FTP(hostname) ftp.login(user_id,passwd) ftp.cwd(remote_directory)

Re: Python Web App

2010-12-22 Thread Sean
Forgot to point out that Chrome OS has no local storage accessable to the user. Hence why I need a web based solution. On Dec 22, 8:51 pm, Sean wrote: > I am wanting to learn python and I am test a Chrome OS notebook at the > same time so I need something that will atleast tell me if I have any >

Re: Python Web App

2010-12-22 Thread Sean
I am wanting to learn python and I am test a Chrome OS notebook at the same time so I need something that will atleast tell me if I have any syntax errors. Although the more features the better that way learning is an easier experience. On Dec 22, 7:05 pm, Hidura wrote: > I am creating one, is on

Re: Toy http server

2010-12-22 Thread MRAB
On 22/12/2010 22:34, Stefan Sonnenberg-Carstens wrote: Sorry, this one is cross post. I posted my question below some time ago to then jython ml, because this hit me first with jython. Anyway, time passed, problem not solved. So, I'd like to know if some of you know where my error lies: [snip]

Re: issubclass(dict, Mapping)

2010-12-22 Thread kj
In <4d127d5e$0$29997$c3e8da3$54964...@news.astraweb.com> Steven D'Aprano writes: >On Wed, 22 Dec 2010 14:20:51 +, kj wrote: >> Here's another example, fresh from today's crop of wonders: >> >> (v. 2.7.0) > from collections import Mapping > issubclass(dict, Mapping) >> True > di

Re: Python programming

2010-12-22 Thread Noah Hall
The most Pythonic ways of checking if a value is within a list is to use the "in" keyword, for example, using your data - 5 in [2, 6, 5] Which will return True, as 5 is in the list. You can then use this in the following generic way - if variable in list: do_things Where variable is the varible y

Re: Python programming

2010-12-22 Thread Benjamin Kaplan
If you're just starting out, look at the Python tutorial http://docs.python.org/tutorial/index.html This question is answered in the tutorial- specifically in http://docs.python.org/tutorial/datastructures.html#more-on-conditions Also, there's a separate list, the tu...@python.org , for people ju

Python programming

2010-12-22 Thread Maurice Shih
Dear python-list@python.org, Thank you for taking the time to listen to my request. I'm a beginner programmer and I se python 2.6. I am making a program that needs a command that can check if a value is in a list. For example to check whether 5 is in [2, 6, 5,]. Thank you for hearing my

general problem when subclassing a built-in class

2010-12-22 Thread kj
Suppose that you want to implement a subclass of built-in class, to meet some specific design requirements. Where in the Python documentation can one find the information required to determine the minimal[1] set of methods that one would need to override to achieve this goal? In my experience,

Re: how to handle output generated after execution of command/script on host unix machine?

2010-12-22 Thread Dan Stromberg
On Sun, Dec 19, 2010 at 11:38 PM, Darshak Bavishi wrote: > Hi Experts, > I am still struggling with handling output generated after execution of >  command/script on host unix machine using windows client machine > ssh code : > import sys > import datetime > import time > # setup logging > paramik

Re: Python Web App

2010-12-22 Thread Hidura
Why grashtly? 2010/12/22, Tim Harig : > On 2010-12-22, Sean wrote: >> Anybody know where I can find a Python Development Environment in the >> form of a web app for use with Chrome OS. I have been looking for a >> few days and all i have been able to find is some old discussions with >> python de

Re: Python Web App

2010-12-22 Thread Tim Harig
On 2010-12-22, Sean wrote: > Anybody know where I can find a Python Development Environment in the > form of a web app for use with Chrome OS. I have been looking for a > few days and all i have been able to find is some old discussions with > python developers talking about they will want one for

Re: Python Web App

2010-12-22 Thread Hidura
I am creating one, is on test, what kind of app do you want create? 2010/12/22, Sean : > Anybody know where I can find a Python Development Environment in the > form of a web app for use with Chrome OS. I have been looking for a > few days and all i have been able to find is some old discussions w

using python ftp

2010-12-22 Thread Matt Funk
Hi, i was wondering whether someone can point me whether the following already exists. I want to connect to a server , download various files (for whose name i want to be able to use a wildcard), and store those files in a given location on the hard drive. If the file already exists i do not want

Re: Generator question

2010-12-22 Thread Dan Stromberg
On Wed, Dec 22, 2010 at 3:15 PM, Victor Eijkhout wrote: > So I have a generator, either as a free function or in a class and I > want to generate objects that are initialized from the generated things. > > def generator(): >        for whatever: >                yield something > class Object(): >

Re: Generator question

2010-12-22 Thread Emile van Sebille
On 12/22/2010 3:15 PM Victor Eijkhout said... So I have a generator, either as a free function or in a class and I want to generate objects that are initialized from the generated things. def generator(): for whatever: yield something class Object(): def __init

Re: How to pop the interpreter's stack?

2010-12-22 Thread kj
In <1f47c36d-a509-4d05-ba79-62b4a534b...@j19g2000prh.googlegroups.com> Carl Banks writes: >On Dec 22, 8:52=A0am, kj wrote: >> In Robert Kern t.k...@gmail.com> writes: >> >> >Obfuscating the location that an exception gets raised prevents a lot of >> >debugging... >> >> The Python interpreter d

Generator question

2010-12-22 Thread Victor Eijkhout
So I have a generator, either as a free function or in a class and I want to generate objects that are initialized from the generated things. def generator(): for whatever: yield something class Object(): def __init__(self): self.data = # the next th

Re: simple games w/o pygame

2010-12-22 Thread Rhodri James
On Wed, 22 Dec 2010 16:40:21 -, William Gill wrote: I am teaching an 11 year old who wants to learn programming. I chose Python, and it is working well. I seem to remember lots of simple script games, like quizzes, number games etc. that would be good for his tutorial. However, no

Re: Trying to parse a HUGE(1gb) xml file

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 20.12.2010 20:34, schrieb spaceman-spiff: Hi c.l.p folks This is a rather long post, but i wanted to include all the details& everything i have tried so far myself, so please bear with me& read the entire boringly long post. I am trying to parse a ginormous ( ~ 1gb) xml file. 0. I am a

Re: Code review request

2010-12-22 Thread Steven Howe
On 12/22/2010 10:34 AM, Jason Staudenmayer wrote: Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (

Re: issubclass(dict, Mapping)

2010-12-22 Thread Steven D'Aprano
On Wed, 22 Dec 2010 14:20:51 +, kj wrote: > Here's another example, fresh from today's crop of wonders: > > (v. 2.7.0) from collections import Mapping issubclass(dict, Mapping) > True dict.__bases__ > (,) [issubclass(b, Mapping) for b in dict.__bases__] > [False] > > > S

Toy http server

2010-12-22 Thread Stefan Sonnenberg-Carstens
Sorry, this one is cross post. I posted my question below some time ago to then jython ml, because this hit me first with jython. Anyway, time passed, problem not solved. So, I'd like to know if some of you know where my error lies: Hi all, I've played around with some code-kata of mine from t

Re: issubclass(dict, Mapping)

2010-12-22 Thread Terry Reedy
On 12/22/2010 9:20 AM, kj wrote: from collections import Mapping Documented as an *ABSTRACT* base class. ABCs were added in 3.0 and backparted to 2.7. One can be quite competant in Python completely ignoring ABCs. issubclass(dict, Mapping) True Yes, dict is a concrete Mapping class. I

Re: Trying to parse a HUGE(1gb) xml file

2010-12-22 Thread John Nagle
On 12/20/2010 12:33 PM, Adam Tauno Williams wrote: On Mon, 2010-12-20 at 12:29 -0800, spaceman-spiff wrote: I need to detect them& then for each 1, i need to copy all the content b/w the element's start& end tags& create a smaller xml file. Yep, do that a lot; via iterparse. 1. Can you po

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 22.12.2010 20:28, schrieb mpnordland: ok, I'll give one more chance. First, to pacify those who hate google groups: What is a good usenet client? second, How should I set up this proxy so that when a connection is made, it request's authentication, and then log's the request, if authentication

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread Steven D'Aprano
On Mon, 20 Dec 2010 20:35:54 -0500, Steve Holden wrote: > On 12/20/2010 12:54 PM, mpnordland wrote: >> I give up, I will never try to use a usenet group again. For the ones >> of you who tried to help thank you. You helped to identify some of my >> troubles, as for you @usernet, you are a troll >

Re: How to pop the interpreter's stack?

2010-12-22 Thread Carl Banks
On Dec 22, 8:52 am, kj wrote: > In Robert Kern > writes: > > >Obfuscating the location that an exception gets raised prevents a lot of > >debugging... > > The Python interpreter does a lot of that "obfuscation" already, and I > find the resulting tracebacks more useful for it. > > An error mess

Re: Question regarding Higher-Order-Programming in Python

2010-12-22 Thread Arnaud Delobelle
Mark Fink writes: > so far I have never noticed chain.from_iterable, but many thanks to > you Peter, I have now a beautiful solution to this problem. from itertools import chain comb = it.combinations(dims, 2) l = chain.from_iterable(it.imap(get_products, comb)) You can also write

Python Web App

2010-12-22 Thread Sean
Anybody know where I can find a Python Development Environment in the form of a web app for use with Chrome OS. I have been looking for a few days and all i have been able to find is some old discussions with python developers talking about they will want one for the OS to be a success with them. -

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread Steve Holden
On 12/22/2010 2:28 PM, mpnordland wrote: > ok, I'll give one more chance. > First, to pacify those who hate google groups: What is a good usenet > client? Thunderbird is OK for me (I follow about three groups normally). I access the comp.lang.python group vie the Gmane ("Main") service, where for

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread Emile van Sebille
On 12/22/2010 11:28 AM mpnordland said... ok, I'll give one more chance. ... which probably won't be enough -- this is potentially a huge question you're asking with lots of little bits to put together. I have an installation where I did somthing similar seven-ish years ago using squid, squ

Re: Modifying an existing excel spreadsheet

2010-12-22 Thread John Machin
On Dec 21, 8:56 am, Ed Keith wrote: > I have a user supplied 'template' Excel spreadsheet. I need to create a new > excel spreadsheet based on the supplied template, with data filled in. > > I found the tools > herehttp://www.python-excel.org/, andhttp://sourceforge.net/projects/pyexcelerator/.

Re: Newbie question about importing modules.

2010-12-22 Thread cronoklee
On Wed, Dec 22, 2010 at 7:57 PM, Tim Roberts wrote: cronoklee wrote: > > Thanks Tim - You've certainly shed some light. I presume the PIL > installer is setup.py and installation is simple a case of running it? Yes: python setup.py install That scheme is called "distutils". Since it became p

RE: [SPAM] - Re: Code review request

2010-12-22 Thread Jason Staudenmayer
-Original Message- From: python-list-bounces+jasons=adventureaquarium@python.org [mailto:python-list-bounces+jasons=adventureaquarium@python.org] On Behalf Of Stefan Sonnenberg-Carstens Sent: Wednesday, December 22, 2010 3:24 PM To: python-list@python.org Subject: [SPAM] - Re: Co

Re: Code review request

2010-12-22 Thread MRAB
> """ > Created on Tue Dec 21 13:39:41 2010 > @author: jason > > Usage: cmd_drug_testing.py [options]... > Will select a random employee from the local database (located in the current directory) > and display the name by default. > > This program (Drug Testing) was written to help select employ

RE: Code review request

2010-12-22 Thread Gerald Britton
Hi Jason, There are a couple of things that I noticed: 1. You might want to check out PEP 8 -- a Python style guide. Among other things, some lines are very long and you are not consistent with putting a space after a comma in a list or between arguments in a function call. e.g. opts, args =

Re: Code review request

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 22.12.2010 19:34, schrieb Jason Staudenmayer: Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (n

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread mpnordland
ok, I'll give one more chance. First, to pacify those who hate google groups: What is a good usenet client? second, How should I set up this proxy so that when a connection is made, it request's authentication, and then log's the request, if authentication is not gotten, how do I have it block (or

Code review request

2010-12-22 Thread Jason Staudenmayer
Hi All, I'm a python newbie so please be kind. I've been reading book after book and have written a script or two but this is my first real "program". Just looking for any suggestions and pointers. I've done some work with bash scripts and php (not OOP) a while a go. I'm not a programmer but wou

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Jim Pharis
are you running make clean for good measure? On Wed, Dec 22, 2010 at 3:33 AM, Benedict Verheyen < benedict.verhe...@gmail.com> wrote: > Hi, > > > i'm trying to compile Python 2.7.1 on Debian (Virtual Box). > Compiling end successfully but readline and curses fail to build. > > I'm working with vi

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Stefan Sonnenberg-Carstens
Am 22.12.2010 09:33, schrieb Benedict Verheyen: Hi, i'm trying to compile Python 2.7.1 on Debian (Virtual Box). Compiling end successfully but readline and curses fail to build. I'm working with virtualenv and I install all my packages in $HOME/local. I've downloaded readline, compiled and ins

Re: simple games w/o pygame

2010-12-22 Thread Andre Alexander Bell
On 22.12.2010 17:40, William Gill wrote: > I am teaching an 11 year old who wants to learn programming. I chose > Python, and it is working well. I seem to remember lots of simple > script games, like quizzes, number games etc. that would be good for his > tutorial. However, now all I can find i

Re: issubclass(dict, Mapping)

2010-12-22 Thread Ethan Furman
kj wrote: In a message (<4cf97c94$0$30003$c3e8da3$54964...@news.astraweb.com>) on a different thread, Steven D'Aprano tells me: I suspect you're trying to make this more complicated than it actually is. You keep finding little corner cases that expose implementation details (such as the heap-t

Re: Regular expression for "key = value" pairs

2010-12-22 Thread Mark Wooding
André writes: > How about the following: > > >>> s = 'a=b,c=d' > >>> t = [] > >>> for u in s.split(','): > ... t.extend(u.split('=')) s = 'a = b = c, d = e' => ['a ', ' b ', ' c', ' d ', ' e'] Ugh. -- [mdw] -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expression for "key = value" pairs

2010-12-22 Thread Mark Wooding
Ciccio writes: > suppose I have: > > s='a=b, c=d' > > and I want to extract sub-strings a,b,c and d from s (and in general > from any longer list of such comma separated pairs). [...] > In [12]: re.findall(r'(.+)=(.+)', s) > Out[12]: [('a=b, c', 'd')] I think there are two logically separate job

Re: help with link parsing?

2010-12-22 Thread Jon Clements
On Dec 22, 4:24 pm, "Colin J. Williams" wrote: > On 21-Dec-10 12:22 PM, Jon Clements wrote: > > > import lxml > > from urlparse import urlsplit > > > doc = lxml.html.parse('http://www.google.com') > > print map(urlsplit, doc.xpath('//a/@href')) > > > [SplitResult(scheme='http', netloc='www.google.

Re: How to pop the interpreter's stack?

2010-12-22 Thread kj
In Robert Kern writes: >Obfuscating the location that an exception gets raised prevents a lot of >debugging... The Python interpreter does a lot of that "obfuscation" already, and I find the resulting tracebacks more useful for it. An error message is only useful to a given audience if that

simple games w/o pygame

2010-12-22 Thread William Gill
I am teaching an 11 year old who wants to learn programming. I chose Python, and it is working well. I seem to remember lots of simple script games, like quizzes, number games etc. that would be good for his tutorial. However, now all I can find is more complex games using Pygame. Can anyon

Re: Regular expression for "key = value" pairs

2010-12-22 Thread Vlastimil Brom
2010/12/22 Ciccio : > Hi all, > suppose I have: > > s='a=b, c=d' > > and I want to extract sub-strings a,b,c and d from s (and in general from > any longer list of such comma separated pairs). > Some failed attempts: > > In [12]: re.findall(r'(.+)=(.+)', s) > Out[12]: [('a=b, c', 'd')] > > [...] >

Re: Regular expression for "key = value" pairs

2010-12-22 Thread André
On Wednesday, December 22, 2010 12:22:22 PM UTC-4, Francesco Napolitano wrote: > Hi all, > suppose I have: > > s='a=b, c=d' > > and I want to extract sub-strings a,b,c and d from s (and in general > from any longer list of such comma separated pairs). > Some failed attempts: > > In [12]: re.fin

Re: help with link parsing?

2010-12-22 Thread Colin J. Williams
On 21-Dec-10 12:22 PM, Jon Clements wrote: import lxml from urlparse import urlsplit doc = lxml.html.parse('http://www.google.com') print map(urlsplit, doc.xpath('//a/@href')) [SplitResult(scheme='http', netloc='www.google.co.uk', path='/imghp', query='hl=en&tab=wi', fragment=''), SplitResult(s

Regular expression for "key = value" pairs

2010-12-22 Thread Ciccio
Hi all, suppose I have: s='a=b, c=d' and I want to extract sub-strings a,b,c and d from s (and in general from any longer list of such comma separated pairs). Some failed attempts: In [12]: re.findall(r'(.+)=(.+)', s) Out[12]: [('a=b, c', 'd')] In [13]: re.findall(r'(.+?)=(.+)', s) Out[13]:

Re: compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
On 22/12/2010 9:33, Benedict Verheyen wrote: > Hi, > > > i'm trying to compile Python 2.7.1 on Debian (Virtual Box). > Compiling end successfully but readline and curses fail to build. > > I'm working with virtualenv and I install all my packages in $HOME/local. > I've downloaded readline, compi

Re: [python-committers] [RELEASED] Python 3.2 beta 2

2010-12-22 Thread Eric Smith
On 12/22/2010 8:46 AM, Georg Brandl wrote: Am 22.12.2010 02:15, schrieb Nick Coghlan: On Wed, Dec 22, 2010 at 6:18 AM, Georg Brandl wrote: Since PEP 3003, the Moratorium on Language Changes, is in effect, there are no changes in Python's syntax and built-in types in Python 3.2. Minor nit - w

Re: issubclass(dict, Mapping)

2010-12-22 Thread Steve Holden
On 12/22/2010 9:20 AM, kj wrote: [...] > I suspect this is another abstraction leak ("dict is *supposed* to > be a Python class like all others, but in fact it's not *really*. > You see, once upon a time..."). > So your suspicions are to be placed above the knowledge of those who really do underst

Re: issubclass(dict, Mapping)

2010-12-22 Thread Antoine Pitrou
On Wed, 22 Dec 2010 09:35:48 -0500 Adam Tauno Williams wrote: > > IMO, the "object model" isn't "leaky", it is simply "adhoc" and not > really a "model" at all [write as many 800 page books as you want: if it > walks like a zombie duck, smells like a zombie duck - it is still a > zombie duck]. P

Re: Google AI challenge: planet war. Lisp won.

2010-12-22 Thread Xah Lee
On Dec 20, 10:06 pm, "Jon Harrop" wrote: > Wasn't that the "challenge" where they wouldn't even accept solutions > written in many other languages (including both OCaml and F#)? Ocaml is one of the supported lang. See: http://ai-contest.com/starter_packages.php there are 12 teams using OCaml. S

Re: issubclass(dict, Mapping)

2010-12-22 Thread Antoine Pitrou
On Wed, 22 Dec 2010 14:20:51 + (UTC) kj wrote: > > So dict is a subclass of Mapping, even though none of the bases of > dict is either Mapping or a subclass of Mapping. Great. > > I suspect this is another abstraction leak ("dict is *supposed* to > be a Python class like all others, but in

Re: Question regarding Higher-Order-Programming in Python

2010-12-22 Thread Mark Fink
> >>> list(chain.from_iterable(starmap(product, izip(izip(dims.iterkeys()), > > dims.itervalues() > [('special', '+'), ('special', '-'), ('number', 1), ('number', 2), > ('number', 3), ('letter', 'a'), ('letter', 'b')] > > Peter so far I have never noticed chain.from_iterable, but many thanks t

Re: issubclass(dict, Mapping)

2010-12-22 Thread Adam Tauno Williams
On Wed, 2010-12-22 at 14:20 +, kj wrote: > In a message (<4cf97c94$0$30003$c3e8da3$54964...@news.astraweb.com>) > on a different thread, Steven D'Aprano tells me: > >I suspect you're trying to make this more complicated than it actually > >is. You keep finding little corner cases that expose i

issubclass(dict, Mapping)

2010-12-22 Thread kj
In a message (<4cf97c94$0$30003$c3e8da3$54964...@news.astraweb.com>) on a different thread, Steven D'Aprano tells me: >I suspect you're trying to make this more complicated than it actually >is. You keep finding little corner cases that expose implementation >details (such as the heap-types iss

Re: Question regarding Higher-Order-Programming in Python

2010-12-22 Thread Peter Otten
Mark Fink wrote: > I am about to learn Higher-Order-Programming with Lisp, Haskell, and > Python. Some people who have gone completely out of their mind call > this FP. > > In Haskell I learned that when I use map on a list it starts nesting > as soon as I start adding elements. If I do not like

Mo Better Lisp Jobs

2010-12-22 Thread kenny
Check it out: http://lispjobs.wordpress.com/2010/12/22/lisp-developer-mcna-fort-laurderdale-florida/ We already have six splendid folks but business is booming and at least one contract bid has to happen faster than we thought (potential client moved it up) so we are looking to take on a couple m

Question regarding Higher-Order-Programming in Python

2010-12-22 Thread Mark Fink
I am about to learn Higher-Order-Programming with Lisp, Haskell, and Python. Some people who have gone completely out of their mind call this FP. In Haskell I learned that when I use map on a list it starts nesting as soon as I start adding elements. If I do not like the nesting I use ConcatMap.

compiling Python 2.7.1 with readline module fails on Debian (Virtualbox)

2010-12-22 Thread Benedict Verheyen
Hi, i'm trying to compile Python 2.7.1 on Debian (Virtual Box). Compiling end successfully but readline and curses fail to build. I'm working with virtualenv and I install all my packages in $HOME/local. I've downloaded readline, compiled and installed it in $HOME/local, same with ncurses. Both