On 8/24/07, Chris Calloway <[EMAIL PROTECTED]> wrote
Thanks everybody for their assistance! Makes my code a lot more elegant.
-Tino
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Ara Kooser wrote:
> Hello all,
>
>I am working on trying to understand classes by creating a
> character generator for a rpg. I know I am doing something silly but I
> am not sure what.
This is a procedural program wrapped in a class declaration. Just get
rid of "class Main:" and outdent ev
"Eric Abrahamsen" <[EMAIL PROTECTED]> wrote
>> Welcome to the wacky world of recursion.
>> You call __upp from inside __upp so you do indeed generate
>> a new layer, in fact you start a new while loop. You need to
>
> So all those "yes"s were actually backing out of multiple while
> loops... Shoul
> Welcome to the wacky world of recursion.
> You call __upp from inside __upp so you do indeed generate
> a new layer, in fact you start a new while loop. You need to
> move the while loop out into init, something like this:
So all those "yes"s were actually backing out of multiple while
loops..
"Eric Abrahamsen" <[EMAIL PROTECTED]> wrote
> The new problem is the while loop inside __upp. Every time I say
> "no", and it generates a new set of attributes, it seems to add
> another "layer" of unfinished = True, so that once I've got
> attributes I like, I need to say "yes" as many times as
Paul W Peterson wrote:
>
> Greeting!
Greeting.
Can you please make a new message next time you post to the list,
instead of replying to an existing message and changing the subject line?
There is more to an e-mail than just the subject, and threaded mail
clients notice whether an e-mail is comple
On Aug 25, 2007, at 12:59 PM, Ara Kooser wrote:
> Hello all,
>
>I am working on trying to understand classes by creating a
> character generator for a rpg. I know I am doing something silly but I
> am not sure what. When I run the program I and type no when prompted I
> get the following messa
Dick Moores wrote:
> At 12:12 PM 8/24/2007, Kent Johnson wrote:
>> Dick Moores wrote:
>>> At 10:22 AM 8/24/2007, Kent Johnson wrote:
So you actually pasted that code into timeit.py?
>>> Yeah. :-( I think I learned on the Tutor list to do it that way, but
>>> I'm not sure. Thanks for showing m
"Ara Kooser" <[EMAIL PROTECTED]> wrote
> I am working on trying to understand classes by creating a
> character generator for a rpg.
You are so ar off base at the moment that I suggest you
go back to basics and try a much simpler class.
Your MAIN is not really a class at all, it's a function
"Trey Keown" <[EMAIL PROTECTED]> wrote
I just spotted something.
> for (tag,val) in attrs.iteritems():
>for tag in window_attrs_key_order:
> print "%s%s = Tk()" %(whitespace, val)
etc...
You set tag and val in the outer loop, then you change
tag in the innrter loop but you never chan
"Trey Keown" <[EMAIL PROTECTED]> wrote
> window_attrs_key_order = ["name", "title", "icon"]
> for (tag,val) in attrs.iteritems():
> for (tag,val) in attrs.iteritems():
> if tag in window_attrs_key_order:
> for tag in window_attrs_key_order:
> if tag == u"name":
> print
wormwood_3 wrote:
>>> Umm, so just put the ampersand at the end of the command string and
>>> call os.system()
>>>
>
> Not sure what the point of this variation would be if os is being deprecated
> along with commands...
>
He was pointing out that you already had a workable solution with
12 matches
Mail list logo