Python on Android (was: PyPy 2.0 beta 1 released)

2012-11-22 Thread Stefan Behnel
Peter Funk, 23.11.2012 07:54: > Is it be possible to use PyPy to develop Apps for Android phones and tablets? > Or will it be possible to do so in the future? You can use CPython and kivy for that. Nik Klever gave a quick intro to Python on Android at this year's PyCon-DE: http://pyvideo.org/vid

Re: PyPy 2.0 beta 1 released

2012-11-22 Thread Peter Funk
Maciej Fijalkowski wrote 22.11.2012 12:54: > We're pleased to announce the 2.0 beta 1 release of PyPy. ... > It also supports ARM machines running Linux. ... Is it be possible to use PyPy to develop Apps for Android phones and tablets? Or will it be possible to do so in the future? Regards, Pete

Data manipulation tool built with bottle and redis

2012-11-22 Thread markcial
Hi, i have little expertise on python and redis, but i started a project on github, i'm looking for any guidelines, help, or advices, hope you don't mind my noob coding. https://github.com/Markcial/BottledJinn -- http://mail.python.org/mailman/listinfo/python-list

Re: 10 sec poll - please reply!

2012-11-22 Thread Steven D'Aprano
On Thu, 22 Nov 2012 10:00:54 -0800, Michael Herrmann wrote: > We took the fact that naming our one function 'type' was so difficult to > name as an indicator that it may be trying to do too many things: I don't think it is difficult to name at all. > On the one hand, it allows you to enter plain

Re: Migrate from Access 2010 / VBA

2012-11-22 Thread Jason Friedman
> I am the lone developer of db apps at a company of 350+ employees. Everything > is done in MS Access 2010 and VBA. I'm frustrated with the limitations of > this platform and have been considering switching to Python. I've been > experimenting with the language for a year or so, and feel comfor

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Steven D'Aprano
On Thu, 22 Nov 2012 16:51:27 +0100, Peter Otten wrote: > Marc Aymerich wrote: > >> Hi, >> >> I want to create a method within a class that is able to accept either >> a class or an instance. [...] > Why would you overload a method that way? The use-case I have is that I have a number of classe

Re: Yet another Python textbook

2012-11-22 Thread Alec Taylor
No worries, I've just sent you my pull-request :) On Thu, Nov 22, 2012 at 1:11 PM, Pavel Solin wrote: > Hi Alec, > >> Can you put your website—http://femhub.com/textbook-python/—on your >> github—https://github.com/femhub/nclab-textbook-python? > > Done, thank you so much. > > I edited the textb

Re: Migrate from Access 2010 / VBA

2012-11-22 Thread David Hutto
On Thu, Nov 22, 2012 at 10:19 PM, kgard wrote: > Greetings: > > I am the lone developer of db apps at a company of 350+ employees. Everything > is done in MS Access 2010 and VBA. I'm frustrated with the limitations of > this platform and have been considering switching to Python. I've been > ex

Re: Yet another Python textbook

2012-11-22 Thread Steven D'Aprano
On Thu, 22 Nov 2012 17:41:22 -0500, Colin J. Williams wrote: > You and I used __format__. I understand that the use of double > underscore functions is deprecated. Double leading and trailing underscore methods are not deprecated, they are very much part of the public interface. But they are re

Migrate from Access 2010 / VBA

2012-11-22 Thread kgard
Greetings: I am the lone developer of db apps at a company of 350+ employees. Everything is done in MS Access 2010 and VBA. I'm frustrated with the limitations of this platform and have been considering switching to Python. I've been experimenting with the language for a year or so, and feel co

Re: Spam source (Re: Horror Horror Horror!!!!!)

2012-11-22 Thread Steven D'Aprano
On Thu, 22 Nov 2012 14:08:58 -0800, Robert Miles wrote: > It now takes two people reporting the same spam to get google groups to > do much about it. I just reported this one as well, though. Speaking of spam, googlegroups, and other annoyances, please don't CC python-list@python.org as well as

Re: Print value from array

2012-11-22 Thread Mike
El jueves, 22 de noviembre de 2012 16:02:30 UTC-3, Alister escribió: > On Thu, 22 Nov 2012 10:44:02 -0800, Mike wrote: > > > > > Hello, > > > I am noob en python programing, i wrote a perl script for read from csv > > > but now i wish print value but the value must be within double quote and

Re: Managing multiple packages

2012-11-22 Thread Thomas Bach
On Tue, Nov 20, 2012 at 03:24:59PM -0600, Evan Driscoll wrote: > > Suppose I have packages A-C. In addition to being modules in the Python > sense, they are logically distinct, probably sit in different > repositories, etc., so there's a directory layout like > > [SNIP] > > Finally, suppose that

Re: Yet another Python textbook

2012-11-22 Thread Joshua Landau
On 22 November 2012 22:41, Colin J. Williams wrote: > On 22/11/2012 1:27 PM, Ian Kelly wrote: > >> On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams wrote: >> >>> From my reading of the docs, it seems to me that the three following >>> should >>> be equivalent: >>> >>>(a) formattingStr.for

Re: Inconsistent behaviour os str.find/str.index when providing optional parameters

2012-11-22 Thread Joshua Landau
If you reply through Google Groups, please be careful not to do it the traditional way as us poor saps get hundreds of lines of ">" added in. I believe (but this is mere recollection) that a good way to use the site is by selecting the text you want to quote before replying (even if it is the whol

Re: Yet another Python textbook

2012-11-22 Thread Colin J. Williams
On 22/11/2012 1:27 PM, Ian Kelly wrote: On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams wrote: From my reading of the docs, it seems to me that the three following should be equivalent: (a) formattingStr.format(values) with (b) format(values, formattingStr) or (c) tupleOfValues.__

Re: Yet another Python textbook

2012-11-22 Thread Terry Reedy
On 11/22/2012 7:24 AM, Colin J. Williams wrote: From my reading of the docs, it seems to me that the three following should be equivalent: We read differently... (a) formattingStr.format(values) Where 'values' is multiple arguments with (b) format(values, formattingStr) "format(

Re: Spam source (Re: Horror Horror Horror!!!!!)

2012-11-22 Thread Robert Miles
On Sunday, November 18, 2012 8:18:53 PM UTC-6, Mark Lawrence wrote: > On 18/11/2012 19:31, Terry Reedy wrote: > > > The question was raised as to how much spam comes from googlegroups. > > I don't know the answer but I take the greatest pleasure in hurtling > onto the dread googlegroups and gman

Re: 10 sec poll - please reply!

2012-11-22 Thread Michael Herrmann
Hi, thanks for your prompt reply; I agree that there is also this ambiguity. This would go away if we were to use `type` but as I said we don't dare to do that. That's the problem with short names - they're always ambiguous at least to some extent. The only alleviation I can offer for the val

Re: 10 sec poll - please reply!

2012-11-22 Thread Chris Angelico
On Fri, Nov 23, 2012 at 5:00 AM, Michael Herrmann wrote: > In our gut feeling, the words apart from `type` that would most normally be > used in an everyday conversation to express the three examples I have given > in my first mail are: > press(CTRL + 'a') > enter("Hello World")

Re: Print value from array

2012-11-22 Thread Alister
On Thu, 22 Nov 2012 10:44:02 -0800, Mike wrote: > Hello, > I am noob en python programing, i wrote a perl script for read from csv > but now i wish print value but the value must be within double quote and > I can not do this. > > For example now the output is: > > ma user@domain displayName Na

Print value from array

2012-11-22 Thread Mike
Hello, I am noob en python programing, i wrote a perl script for read from csv but now i wish print value but the value must be within double quote and I can not do this. For example now the output is: ma user@domain displayName Name SecondName givenName Name sn SecondName cn Name and i wish

Re: Yet another Python textbook

2012-11-22 Thread Ian Kelly
On Thu, Nov 22, 2012 at 5:24 AM, Colin J. Williams wrote: > From my reading of the docs, it seems to me that the three following should > be equivalent: > > (a) formattingStr.format(values) > with > (b) format(values, formattingStr) > or > (c) tupleOfValues.__format__(formattingStr > > Examp

Re: Inconsistent behaviour os str.find/str.index when providing optional parameters

2012-11-22 Thread Giacomo Alzetta
Il giorno giovedì 22 novembre 2012 09:44:21 UTC+1, Steven D'Aprano ha scritto: > On Wed, 21 Nov 2012 23:01:47 -0800, Giacomo Alzetta wrote: > > > > > Il giorno giovedì 22 novembre 2012 05:00:39 UTC+1, MRAB ha scritto: > > >> On 2012-11-22 03:41, Terry Reedy wrote: It can't return 5 because 5 >

Re: 10 sec poll - please reply!

2012-11-22 Thread Michael Herrmann
Dear all, thank you for your replies. After experimenting with your suggestions, we have arrived at a solution that we believe fits well with our existing API. However, before we implement this solution, we would like to ask you one last time to sign off on our proposal or raise any serious pro

Re: Constructing JSON data structures from non-string key python dictionaries

2012-11-22 Thread saikari78
Thanks for all these very clarifying and useful replies -- http://mail.python.org/mailman/listinfo/python-list

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Marc Aymerich
On Thursday, November 22, 2012 5:26:59 PM UTC+1, Dave Angel wrote: > On 11/22/2012 11:12 AM, Thomas Bach wrote: > > > On Thu, Nov 22, 2012 at 10:52:56AM -0500, Dave Angel wrote: > > >> On 11/22/2012 10:14 AM, Marc Aymerich wrote: > > >>> I want to create a method within a class that is able to a

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Marc Aymerich
On Thursday, November 22, 2012 4:51:30 PM UTC+1, Peter Otten wrote: > Marc Aymerich wrote: > > > > > Hi, > > > > > > I want to create a method within a class that is able to accept either a > > > class or an instance. > > > > > > class MyClass(object): > > > @magic_decorator > > >

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Dave Angel
On 11/22/2012 11:12 AM, Thomas Bach wrote: > On Thu, Nov 22, 2012 at 10:52:56AM -0500, Dave Angel wrote: >> On 11/22/2012 10:14 AM, Marc Aymerich wrote: >>> I want to create a method within a class that is able to accept either a >>> class or an instance. >>> >> I haven't tried it, but how about i

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Thomas Bach
On Thu, Nov 22, 2012 at 10:52:56AM -0500, Dave Angel wrote: > On 11/22/2012 10:14 AM, Marc Aymerich wrote: > > I want to create a method within a class that is able to accept either a > > class or an instance. > > > > I haven't tried it, but how about if you do a @classmethod decorator, > and the

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Dave Angel
On 11/22/2012 10:14 AM, Marc Aymerich wrote: > Hi, > > I want to create a method within a class that is able to accept either a > class or an instance. > > class MyClass(object): > @magic_decorator > def method(param): > # param can be MyClass (cls) or an instance of MyClass (self)

Re: method that can be called from a class and also from an instance

2012-11-22 Thread Peter Otten
Marc Aymerich wrote: > Hi, > > I want to create a method within a class that is able to accept either a > class or an instance. > > class MyClass(object): > @magic_decorator > def method(param): > # param can be MyClass (cls) or an instance of MyClass (self) > > so I can do some

method that can be called from a class and also from an instance

2012-11-22 Thread Marc Aymerich
Hi, I want to create a method within a class that is able to accept either a class or an instance. class MyClass(object): @magic_decorator def method(param): # param can be MyClass (cls) or an instance of MyClass (self) so I can do something like: instance = MyClass() MyClass.

Re: Yet another Python textbook

2012-11-22 Thread Colin J. Williams
From Yet another Python textbook On 21/11/2012 5:17 PM, Chris Angelico wrote: On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams wrote: On 20/11/2012 4:00 PM, Chris Angelico wrote: To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 strings. Take no notice; the rest of the world s

Re: Simple Question regarding running .py program

2012-11-22 Thread Duncan Booth
Grant Edwards wrote: > [1] OK, so I'm am annoyed with them after my Google phone updated to > Android 4.2 this afternoon and the lock-screen clock is now > _physically_painful_ to look at. However, I'm convinced that's > not evil -- just a complete and utter lack of visual design >

Re: Suitable software stacks for simple python web service

2012-11-22 Thread Kev Dwyer
Dieter Maurer wrote: > > From your description (so far), you would not need a web framework > but could use any way to integrate Python scripts into a web server, > e.g. "mod_python", "cgi", "WSGI", > Check what ways your web server will suport. Hello Dieter Thanks for your comment. I ce

Re: Update slider widget range

2012-11-22 Thread Mark Lawrence
On 21/11/2012 13:59, moadeep wrote: I am trying to write a small bit of code that interactively deletes selected slices in an image series using matplotlib. I have created a button 'delete' which stores a number of indices to be deleted when the button 'update' is selected. However, I am curre

Re: Web Frameworks Excessive Complexity

2012-11-22 Thread Thomas Bach
On Wed, Nov 21, 2012 at 12:49:52PM -0800, rh wrote: > > wheezy + "myvirtualenv" = 3.3MB > pyramid = 92MB $ mkvirtualenv --no-site-packages -p python2.7 pyramid $ pip install -U distribute $ pip install pyramid $ du -h .virtualenvs/pyramid 22M .virtualenvs/pyramid $ du

Re: Constructing JSON data structures from non-string key python dictionaries

2012-11-22 Thread Paul Kölle
Am 21.11.2012 17:04, schrieb hfo...@gmail.com: Thanks for your reply, but the javascript function expects option names to be unquoted, otherwise it won't work. Others have shown you how to solve this, but I would like to note that the function does NOT expect JSON but a simple javascript object

Re: Inconsistent behaviour os str.find/str.index when providing optional parameters

2012-11-22 Thread Steven D'Aprano
On Wed, 21 Nov 2012 23:01:47 -0800, Giacomo Alzetta wrote: > Il giorno giovedì 22 novembre 2012 05:00:39 UTC+1, MRAB ha scritto: >> On 2012-11-22 03:41, Terry Reedy wrote: It can't return 5 because 5 >> isn't an index in 'spam'. >> >> >> >> It can't return 4 because 4 is below the start index.

Re: mysql insert with tuple

2012-11-22 Thread Christian
Am Mittwoch, 21. November 2012 20:49:14 UTC+1 schrieb Hans Mulder: > On 21/11/12 18:19:15, Christian wrote: > > > Hi , > > > > > > my purpose is a generic insert via tuple , because the number of fields > > and can differ. But I'm stucking . > > > > > > ilist=['hello',None,7,None,None] >