Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'dictionary': 0.07; 'pm,': 0.10; 'wrote:': 0.14; '40+': 0.16; 'angelico': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'literal.': 0.16; 'module?': 0.16; 'overly': 0.16; 'subject:organizing': 0.16; 'subject:reviewing': 0.16; 'suggest': 0.19; 'subject:help': 0.20; 'header:In-Reply-To:1': 0.21; 'framework': 0.22; 'thu,': 0.22; 'received:209.85.210.174': 0.23; 'received:mail-iy0-f174.google.com': 0.23; 'subject:code': 0.23; 'code': 0.24; "i'm": 0.27; 'message-id:@mail.gmail.com': 0.28; 'beyond': 0.28; "won't": 0.30; 'to:addr:python-list': 0.33; 'familiar': 0.33; 'it?': 0.33; "i'll": 0.34; 'chris': 0.34; 'that,': 0.34; 'using': 0.35; '8bit%:8': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.37; 'subject:: ': 0.38; 'some': 0.38; "i'd": 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'simply': 0.60; 'skip:/ 30': 0.67; 'placed': 0.76; 'advise,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=eqHq7YFSviZhWsRH9D0imofoDJUkQuWk1I2i4blv0kw=; b=C3jhIQ+vqvS/wZ3aRZIy0kQrx37y6l/PEKnhtvm4I1enwvCdYqN4oouLRyCpxjahWk wVHLxZUL/HKnhDF0HOraytn0+aMPP+IIkdHWc42VU5s7J+zYudNo2kPrH8T5xWtNZK2L q+RH5oPHpT331qfsU0OVqOfqFButpxDvaRSWg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qABrWAH1u6Wh0s6zi9lIBfcgRo3oYrnHDbkOjQ4pUlyAWEXZPLtowL06S9/WqyWFOt Ik1thqzANfxhR3rgU2ixMBx6nc2dHsG6LPEk2mlZcb3KSppPtVfQrdrzDM4SfQeGkbiG 1BLB2/PqirfRah9DgzsNMVJ8UBbwyLnx6X0uY= MIME-Version: 1.0 In-Reply-To: <4de73c5d$0$38638$4fafbaef@reader1.news.tin.it> References: <4de73c5d$0$38638$4fafbaef@reader1.news.tin.it> Date: Thu, 2 Jun 2011 18:04:30 +1000 Subject: Re: help me reviewing and organizing my code =) From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 20 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307001873 news.xs4all.nl 49042 [::ffff:82.94.164.166]:46292 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6846 On Thu, Jun 2, 2011 at 5:31 PM, Tracubik wrote: > =A0 =A0UNAME_CODE =3D ['uname'] > =A0 =A0LS_CODE =3D ['cd /home/myUserId/Images/SashaGray', > =A0 =A0 =A0 =A0 =A0 =A0 =A0 'ls *.jpg'] > > =A0 =A0command_list =3D { > =A0 =A0"uname" : UNAME_CODE, > =A0 =A0"ls" =A0 =A0: LS_CODE > =A0 =A0} > > do you like it? > considering i'll have about 40+ buttons, do you suggest me to move some > part of code outside in a different module? I'd dispense with the indirection and simply build the dictionary as a single literal. Beyond that, I won't advise, as you're using a framework I'm not overly familiar with - others will be better placed to give recommendations. Chris Angelico