Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6846
| References | <4de73c5d$0$38638$4fafbaef@reader1.news.tin.it> |
|---|---|
| Date | 2011-06-02 18:04 +1000 |
| Subject | Re: help me reviewing and organizing my code =) |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2384.1307001873.9059.python-list@python.org> (permalink) |
On Thu, Jun 2, 2011 at 5:31 PM, Tracubik <affdfsdfdsfsd@b.com> wrote:
> UNAME_CODE = ['uname']
> LS_CODE = ['cd /home/myUserId/Images/SashaGray',
> 'ls *.jpg']
>
> command_list = {
> "uname" : UNAME_CODE,
> "ls" : LS_CODE
> }
>
> 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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
help me reviewing and organizing my code =) Tracubik <affdfsdfdsfsd@b.com> - 2011-06-02 07:31 +0000 Re: help me reviewing and organizing my code =) Chris Angelico <rosuav@gmail.com> - 2011-06-02 18:04 +1000 Re: help me reviewing and organizing my code =) Peter Otten <__peter__@web.de> - 2011-06-02 12:41 +0200
csiph-web