[RELEASED] Python 3.2 beta 2

2010-12-22 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm happy to announce the second beta preview release of Python 3.2. Python 3.2 is a continuation of the efforts to improve and stabilize the Python 3.x line. Since the final release of Python 2.7, the 2.x

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.

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.

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

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 the

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 issue

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

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 to you

Re: issubclass(dict, Mapping)

2010-12-22 Thread Antoine Pitrou
On Wed, 22 Dec 2010 14:20:51 + (UTC) kj no.em...@please.post 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

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

2010-12-22 Thread Xah Lee
On Dec 20, 10:06 pm, Jon Harrop use...@ffconsultancy.com 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

Re: issubclass(dict, Mapping)

2010-12-22 Thread Antoine Pitrou
On Wed, 22 Dec 2010 09:35:48 -0500 Adam Tauno Williams awill...@whitemice.org 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

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 understand

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 Brandlge...@python.org 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

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, compiled and

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: 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=entab=wi', fragment=''),

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: Regular expression for key = value pairs

2010-12-22 Thread Vlastimil Brom
2010/12/22 Ciccio franap...@gmail.com: 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')]

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

Re: How to pop the interpreter's stack?

2010-12-22 Thread kj
In mailman.65.1292517591.6505.python-l...@python.org Robert Kern robert.k...@gmail.com 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

Re: help with link parsing?

2010-12-22 Thread Jon Clements
On Dec 22, 4:24 pm, Colin J. Williams cjwilliam...@gmail.com 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',

Re: Regular expression for key = value pairs

2010-12-22 Thread Mark Wooding
Ciccio franap...@gmail.com 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

Re: Regular expression for key = value pairs

2010-12-22 Thread Mark Wooding
André andre.robe...@gmail.com 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: 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

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 is

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

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 virtualenv

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

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

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

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 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 employees for

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:

Re: Newbie question about importing modules.

2010-12-22 Thread cronoklee
On Wed, Dec 22, 2010 at 7:57 PM, Tim Roberts ti...@probo.com 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

Re: Modifying an existing excel spreadsheet

2010-12-22 Thread John Machin
On Dec 21, 8:56 am, Ed Keith e_...@yahoo.com 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/, 

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,

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 some

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: Question regarding Higher-Order-Programming in Python

2010-12-22 Thread Arnaud Delobelle
Mark Fink m...@mark-fink.de 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

Re: How to pop the interpreter's stack?

2010-12-22 Thread Carl Banks
On Dec 22, 8:52 am, kj no.em...@please.post wrote: In mailman.65.1292517591.6505.python-l...@python.org Robert Kern robert.k...@gmail.com writes: Obfuscating the location that an exception gets raised prevents a lot of debugging... The Python interpreter does a lot of that obfuscation

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 Don't

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

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

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

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

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__ (type 'object',) [issubclass(b, Mapping) for b in dict.__bases__] [False] So dict is 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: 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: simple games w/o pygame

2010-12-22 Thread Rhodri James
On Wed, 22 Dec 2010 16:40:21 -, William Gill nore...@domain.invalid 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

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

Re: How to pop the interpreter's stack?

2010-12-22 Thread kj
In 1f47c36d-a509-4d05-ba79-62b4a534b...@j19g2000prh.googlegroups.com Carl Banks pavlovevide...@gmail.com writes: On Dec 22, 8:52=A0am, kj no.em...@please.post wrote: In mailman.65.1292517591.6505.python-l...@python.org Robert Kern rober= t.k...@gmail.com writes: Obfuscating the location that

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

Re: Generator question

2010-12-22 Thread Dan Stromberg
On Wed, Dec 22, 2010 at 3:15 PM, Victor Eijkhout s...@sig.for.address 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

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

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 secr...@gmail.com: 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

Re: Python Web App

2010-12-22 Thread Tim Harig
On 2010-12-22, Sean secr...@gmail.com 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

Re: Python Web App

2010-12-22 Thread Hidura
Why grashtly? 2010/12/22, Tim Harig user...@ilthio.net: On 2010-12-22, Sean secr...@gmail.com 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

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 bavishi.dars...@gmail.com 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

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,

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#39;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

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

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

Re: issubclass(dict, Mapping)

2010-12-22 Thread kj
In 4d127d5e$0$29997$c3e8da3$54964...@news.astraweb.com Steven D'Aprano steve+comp.lang.pyt...@pearwood.info 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,

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:

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 hid...@gmail.com wrote: I am

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 secr...@gmail.com 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

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 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 secr...@gmail.com: I am wanting to learn python and I am test a Chrome OS

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 hid...@gmail.com: 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

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)

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 rockitout...@yahoo.com 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

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 Regards,

Re: Python Web App

2010-12-22 Thread Tim Harig
[Reordered to preserve context in bottom posting] On 2010-12-23, Hidura hid...@gmail.com wrote: 2010/12/22, Tim Harig user...@ilthio.net: On 2010-12-22, Sean secr...@gmail.com wrote: Anybody know where I can find a Python Development Environment in the form of a web app for use with Chrome OS.

Re: Generator question

2010-12-22 Thread Victor Eijkhout
Dan Stromberg drsali...@gmail.com 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 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

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 no.em...@please.post wrote: In mailman.65.1292517591.6505.python-l...@python.org Robert Kern robert.k...@gmail.com writes: Obfuscating the location that an exception gets raised prevents a lot of debugging... The

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 steve+comp.lang.pyt...@pearwood.info 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

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

Re: Python Web App

2010-12-22 Thread Tim Harig
On 2010-12-23, Hidura hid...@gmail.com 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

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

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 rockitout...@yahoo.comwrote: Dear

Re: simple games w/o pygame

2010-12-22 Thread scattered
On Dec 22, 11:40 am, William Gill nore...@domain.invalid 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,

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 --

[issue9017] doctest option flag to enable/disable some chunk of doctests?

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: unit test needed - needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9017 ___

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What's the use case for this function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10755 ___

[issue9085] Version number inconsistency in email package

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: If there is no further discussion, I’d say the original bug is fixed anc this report should be closed. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9085

[issue8847] crash appending list and namedtuple

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: When maintaining an fd to implement a per thread current directory, you can use it to get a list of files in the directory. For security reasons, instead of a named path, you can keep an fd to a directory so that if the path is changed

[issue8885] markupbase declaration errors aren't recoverable

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo resolution: invalid - stage: - needs patch title: markerbase declaration errors aren't recoverable - markupbase declaration errors aren't recoverable versions: +Python 2.7 -Python 2.6

[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Do you want to work on a patch? -- nosy: +eric.araujo stage: - needs patch title: Method _sys_version() module Lib\platform.py does not parse correctly IronPython 2.x version - platform._sys_version does not parse correctly

[issue9074] subprocess closes standard file descriptors when it should not

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +needs review nosy: +astrand stage: - patch review title: [includes patch] subprocess module closes standard file descriptors when it should not - subprocess closes standard file descriptors when it should not versions: +Python

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2010-12-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: - needs patch versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4489 ___

[issue9399] Provide a 'print' action for argparse

2010-12-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thinking again about that, what’s wrong with argparse replacing \n with spaces and doing its own line wrapping? -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue8754] ImportError: quote bad module name in message

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I suppose it's not a good test, since your non-ascii name presumably was encoded in UTF-8, which is the encoding that PyUnicode_FromString uses. -- ___ Python tracker rep...@bugs.python.org

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Reference counting is not always correct. For example, in unlinkat if (res 0) return posix_error(); Py_DECREF(opath); (return None) the DECREF should be before the error check. (Note that you can use the Py_RETURN_NONE

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: New patch *should* have fixed up reference counting and version tags. I standardized all the error calls to posix_error. -- Added file: http://bugs.python.org/file20137/i4761_v4.patch ___

[issue10757] zipfile.write, arcname should be bytestring

2010-12-22 Thread Jacek Jabłoński
New submission from Jacek Jabłoński conexion2...@gmail.com: file = 'somefile.dat' filename = ółśąśółąś.dat zip = zipfile.ZipFile('archive.zip', 'w', zipfile.ZIP_DEFLATED) zip.write(file, filename) above produces very nasty filename in zip archive.

[issue10758] posix_access swallows all errors

2010-12-22 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: access(2) can return errnos that correspond to input errors or general system faults, such as EINVAL, EIO or ENOMEM. In this case, an exception should be raised instead of returning False. It is probably best to whitelist those errnos that

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks for the update! Three more comments: * the new constants doc should also get a versionadded * faccessat should check for EBADF, EINVAL and ENOTDIR and raise an error if they are returned, since these are input errors Or, alternately,

[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1

2010-12-22 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Antoine, a couple of questions: (1) Is there documentation for the 'smalltable' field of the Py_buffer struct anywhere? What are the requirements for the exporter here? E.g., is it / should it be a requirement that shape, strides and

  1   2   >