Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; '16,': 0.03; 'diff': 0.05; 'indexes': 0.09; 'pause': 0.09; 'python:': 0.09; '"python': 0.16; 'fine.': 0.16; 'integers,': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'string:': 0.16; 'subject:simple': 0.16; 'you."': 0.16; 'wrote:': 0.17; 'integer': 0.17; 'url:view': 0.18; '>>>': 0.18; 'all,': 0.21; 'supposed': 0.21; 'posted': 0.22; 'example': 0.23; 'programming': 0.23; 'work.': 0.23; 'absolute': 0.23; 'insert': 0.23; "i've": 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'looks': 0.26; 'am,': 0.27; 'language.': 0.27; 'question': 0.27; 'there.': 0.28; 'correct': 0.28; 'along.': 0.29; 'existence': 0.29; 'received:192.168.1.3': 0.29; "i'm": 0.29; 'error': 0.30; 'code': 0.31; 'file': 0.32; 'getting': 0.33; 'anywhere': 0.33; 'to:addr:python-list': 0.33; "can't": 0.34; 'text': 0.34; 'wrong': 0.34; 'done': 0.34; 'same.': 0.35; 'doing': 0.35; 'subject:?': 0.35; 'but': 0.36; 'url:org': 0.36; 'why': 0.37; 'moment': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'delete': 0.38; 'page': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'application': 0.40; 'received:192.168': 0.40; 'help': 0.40; 'most': 0.61; 'first': 0.61; 'more': 0.63; 'become': 0.65; 'total': 0.65; 'secret': 0.71; 'absolutely': 0.84; 'subject:this': 0.84; '2013': 0.84; 'acquainted': 0.84; '"that\'s': 0.91; 'book:': 0.91 Date: Sat, 16 Mar 2013 11:48:41 -0400 From: Mitya Sirenef User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: python-list@python.org Subject: Re: What am I doing wrong in this simple tkinter example? References: <1e8ab690-c0e8-464a-ab13-cd109fc15327@googlegroups.com> In-Reply-To: <1e8ab690-c0e8-464a-ab13-cd109fc15327@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 95 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1363448930 news.xs4all.nl 6983 [2001:888:2000:d::a6]:40607 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:41321 On 03/16/2013 11:16 AM, Yves S. Garret wrote: > On Saturday, March 16, 2013 11:10:07 AM UTC-4, Mitya Sirenef wrote: >> On 03/16/2013 10:53 AM, Yves S. Garret wrote: >> >>> Hi all, I'm well into "Python Programming for the Absolute Beginner" in order to >> > become more acquainted with the language. However, when I got to page >> >> 304 and >> >> > did my first example: >> >> > >> >> > http://bin.cakephp.org/view/1107093008 >> >> > >> >> > And this is the error that I'm getting: >> >> > >> >> > http://bin.cakephp.org/view/399711843 >> >> > >> >> > This is the code that came with the book: >> >> > >> >> > http://bin.cakephp.org/view/514822432 >> >> > >> >> > >> >> > What I don't understand is, why am I getting that error? I've done >> >> diff -w >> >> > and the code looks for the most part the same. What am I doing wrong >> >> when I >> >> > put the application together? >> >> >> >> >> >> The error is that indexes are supposed to be integers, instead you have >> >> a text string: >> >> >> >> "That's not the correct password, so I can't s hare the secret with you." >> >> >> >> >> >> -m >> >> >> >> >> >> -- >> >> Lark's Tongue Guide to Python: http://lightbird.net/larks/ >> >> >> >> The existence of any evil anywhere at any time absolutely ruins a total >> >> optimism. George Santayana > *shrug* > > In the example that I have posted from the book it works just fine. I also used > this batch file to help me along. > > longevity.py > pause > > Hence the question mark over my head at the moment :) . You are giving a message to the delete call, but delete call needs an integer to work. In the book, it's not a delete call but an insert call that's why it works there. -m -- Lark's Tongue Guide to Python: http://lightbird.net/larks/