>
> Using Python 2.7 for it, it seems to work fine, except that I can't
> see how the GUI helps. It opens only when I use the g option to find
> an entry already made. Useful for editing an entry, though.
>
Well the idea would be to build the app as a full-blown GUI. The GUI search
and edit funct
On Sat, Sep 10, 2011 at 4:36 PM, Richard D. Moores wrote:
> Your idea doesn't seem efficient for me --
> lots of typing and editing.
>
Not sure what you mean by that? I've updated the gist with a quick 5min
implementation of a GUI using Tkinter and the approach I outlined. I think
using a GUI i
On Sat, Sep 10, 2011 at 1:08 PM, Richard D. Moores wrote:
> So I've done quite a bit more work. With phone_book.py the user can
> not only access phone numbers by the person's initials, but can add
> items to the data file. I've also solved the problem of adding a
> person who's initials have alre
se enter (g)ood, (o)k or (b)ad: b
Oh dear
>>> ask()
Please enter (g)ood, (o)k or (b)ad: o
Good good
>>> ask()
Please enter (g)ood, (o)k or (b)ad: ok
Good good
Or you could also use something a bit more general like this...
def ask(question, list_of_responses):
ans
r when you tried
your code?
Traceback (most recent call last):
File "", line 1, in
NameError: name 'guess' is not defined
>From your question it sounds like I might be missing something though. If
that didn't help, please provide more details.
--
Jack Trades
Pointless Programming Blog <http://pointlessprogramming.wordpress.com>
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
one's best? I don't know. I know there are some profiling
tools that will give you a better idea about the performance of a function,
but I rarely use them so I'll let someone else give you advice on this.
For a quick-n-dirty test, either will work just fine. I usual
e
(for example if you had (True and False and True)) and returns False, which
is then negated by 'not'.
--
Jack Trades
Pointless Programming Blog <http://pointlessprogramming.wordpress.com>
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
alse,
obviously, evaluates to False, which causes 'and' to stop and return False.
This reduces the expression to...
not False
> 2)However, the "not" outside the parentheses flips the meaning of what
> is inside the parentheses, so false becomes "True." ?
>