Re: [Tutor] (no subject)

2009-09-09 Thread C or L Smith
What about range(0, -n, -1) ? >>> That would need to have a starting value of -1 and an end value of >>> -(len(phrase)+1). Of else you can start at length - 1, end at zero >>> and a step value of -1. >> >> Another option, using "normal" range values but negative indexing is >> >> for

Re: [Tutor] wxpython question

2009-09-09 Thread Alan Gauld
"Kristina Ambert" wrote I'm not sure if I could ask questions about wx in this list or not, hopefully it's okay? If not I guess disregard this question. Yes its fine but you will get more complete answers in the wx mailing list. But, does anyone have any idea of if it's possible to make a fr

Re: [Tutor] wxpython question

2009-09-09 Thread Che M
Date: Wed, 9 Sep 2009 15:52:53 -0400 From: krissy.amb...@gmail.com To: tutor@python.org Subject: [Tutor] wxpython question Hi, I'm not sure if I could ask questions about wx in this list or not, hopefully it's okay? If not I guess disregard this question. But, does anyone have any idea of if i

Re: [Tutor] web2py vs django

2009-09-09 Thread mdipierro
Let's say you buy a car (spend time and money to learn a framework). It is a good advice to stick with it and don't change your car (framework) too often until the maintenance costs (keep up with changes, backward incompatibilities, integration with third party libraries) exceed the cost of buying

Re: [Tutor] web2py vs django

2009-09-09 Thread mdipierro
Since you said you know Django, perhaps this video will help jump start with web2py: http://www.vimeo.com/6504620 Massimo -- View this message in context: http://www.nabble.com/web2py-vs-django-tp25360012p25372849.html Sent from the Python - tutor mailing list archive at Nabble.com. ___

Re: [Tutor] web2py vs django

2009-09-09 Thread Steve Willoughby
On Wed, Sep 09, 2009 at 08:29:56PM +0100, Alan Gauld wrote: > But it is confusing, my advice is just pick one and stick with it! Yeah, that's probably the best advice. Each framework has its particular area of applicability it's been optimized for, so depending on what you plan to do most of the

[Tutor] wxpython question

2009-09-09 Thread Kristina Ambert
Hi, I'm not sure if I could ask questions about wx in this list or not, hopefully it's okay? If not I guess disregard this question. But, does anyone have any idea of if it's possible to make a frame that will latch on to the parent frame (e.g. if you resize the parent, the child also resizes, if y

Re: [Tutor] web2py vs django

2009-09-09 Thread Alan Gauld
"Kent Johnson" wrote That thread is about web.py, not web2py, they are different frameworks. I confess I too had missed that subtlety! Like editors and standards... The wonderful thing about Web Frameworks in Python - there are so many to choose from! But it is confusing, my advice is

Re: [Tutor] working with multiple sets

2009-09-09 Thread Kent Johnson
On Wed, Sep 9, 2009 at 7:48 AM, kevin parks wrote: > Then i can cast it as a dict and pick over that dictionary as i wish. There is no need for that. defaultdict is a subclass of dict and supports all the methods of dict. > Here > (as a bonus) I can transverse a range of keys that is inclusive

Re: [Tutor] web2py vs django

2009-09-09 Thread Kent Johnson
On Wed, Sep 9, 2009 at 3:36 AM, vishwajeet singh wrote: > I had asked this question earlier is django users google group you can find > the responses here > http://groups.google.co.in/group/django-users/browse_thread/thread/4c8bfa995c93b07b/f12442dd0d7f4fcd?q=#f12442dd0d7f4fcd That thread is abou

Re: [Tutor] working with multiple sets

2009-09-09 Thread kevin parks
Are any of these methods better than another for some reason? On Sep 9, 2009, at 10:12 PM, Lie Ryan wrote: kevin parks wrote: This discussion is making my brain melt. It is also showing how clever Bob was to do it the way he did... I found a solution that i think works, and think has not ye

Re: [Tutor] web2py vs django

2009-09-09 Thread mdipierro
If you know Django you basically know web2py. Let me address some of you concerns below and then I will give you some examples: > web2py > Simpler syntax for doing things (This may be a nice factor, but then it > does do more 'magic') The only "magic" is that your code is executed in a context, n

[Tutor] Fwd: Python and google sites

2009-09-09 Thread Rich Lovely
Forgot to reply-all... -- Forwarded message -- From: Rich Lovely Date: 2009/9/9 Subject: Re: [Tutor] Python and google sites To: andy 2009/9/9 andy : > Hi people > > After searching pypy and google, I was wondering if anyone has any > experience/knowledge of a python module wh

Re: [Tutor] working with multiple sets

2009-09-09 Thread Lie Ryan
kevin parks wrote: This discussion is making my brain melt. It is also showing how clever Bob was to do it the way he did... I found a solution that i think works, and think has not yet been suggested. I quarantined Bob's code into a black box ... and then cast the output as a plain old fashi

Re: [Tutor] mapping/filtering a sequence

2009-09-09 Thread kevin parks
Prolly good to post final solutions for future goog'lerz (like when i forget) or anyone who was following along. Here's where i ended up with this... shows both ways. -- #!/usr/bin/env python my_map = { 38:34, 40:39, 45:44, 47:46, 52:51, 59:58, 55:56 } def filter_item(item): retu

Re: [Tutor] working with multiple sets

2009-09-09 Thread kevin parks
This discussion is making my brain melt. It is also showing how clever Bob was to do it the way he did... I found a solution that i think works, and think has not yet been suggested. I quarantined Bob's code into a black box ... and then cast the output as a plain old fashioned python built

[Tutor] Web Site for Temporarily Posting Pictures for Images of Dialogs?

2009-09-09 Thread Wayne Watson
Some months ago when I was active in modifying a Python program I needed to show members of the group pix of dialogs, and someone or two offered choices for web sites that allow temporary posts. Could someone send me links to some of these? -- Wayne Watson (Watson Adventures, Prop.,

Re: [Tutor] Encoding question

2009-09-09 Thread Kent Johnson
On Wed, Sep 9, 2009 at 5:06 AM, Oleg Oltar wrote: > Hi! > > One of my tests returned following text () > > The test: > from django.test.client import Client >  c = Client() > resp = c.get("/") > resp.content > > In [25]: resp.content > Out[25]: '\r\n\r\n\r\n Strict//EN" > "http://www.w3.org/TR/xht

[Tutor] Encoding question

2009-09-09 Thread Oleg Oltar
Hi! One of my tests returned following text () The test: from django.test.client import Client c = Client() resp = c.get("/") resp.content In [25]: resp.content Out[25]: '\r\n\r\n\r\nhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>\r\n\r\nhttp://www.w3.org/1999/xhtml";>\r\n \r\n\r\n \r

Re: [Tutor] web2py vs django

2009-09-09 Thread vishwajeet singh
I had asked this question earlier is django users google group you can find the responses here http://groups.google.co.in/group/django-users/browse_thread/thread/4c8bfa995c93b07b/f12442dd0d7f4fcd?q=#f12442dd0d7f4fcd On Wed, Sep 9, 2009 at 1:01 PM, Stefan Lesicnik wrote: > Hi guys. > > I am writi

[Tutor] web2py vs django

2009-09-09 Thread Stefan Lesicnik
Hi guys. I am writing this because i am little confused and wanted a more 'expert' opinion on the two frameworks. I am still quite a python newbie, and not really familiar with all the intricacies of it and the frameworks. I discovered Django as a framework first. I thought it was really great. T

[Tutor] Python and google sites

2009-09-09 Thread andy
Hi people After searching pypy and google, I was wondering if anyone has any experience/knowledge of a python module which would enable the interaction with Google sites? I'm looking for a method of scripted addition of pictyres to a page on a google site page and wondered if someone has been clev