Jacob (et al):
Unfortunately at this point I'm rendering the text, not printing it
(using text = font.render). So I need to know if there is a hard
character or something I can type, since 50*" " (space) isnt lining
them up right.
Thanks!
~Denise
On 4/27/05, Jacob S. <[EMAIL PROTECTED]> wrote:
def displaybalance():
for score, name in mylist:
slip = 30 - len(name)
slip_amt = slip*" "
print "%s%s%s" % (name,slip_amt,score)
(I did this with the print command to make sure it would produce what
I wanted, three strings for the three sample scores I put in this
dummy
P.S. I should also add that the "print" commands embedded within the
add_score function ARE displaying at the appropriate time (i.e.,
before I have to hit y/n). Of course they're in the text/console
window, but it does tell me that it's executing that add_score
function at the right point in time
Max (et al.):
I tried to do it that way ("score, name, posY" etc) and it told me
"too many values to unpack". But I did get it to work the following
way:
# Display some text
x, y = 230, 270
for score, name in mylist:
slip = 30 - len(name)
slip_amt = slip*
On Apr 27, 2005, at 01:36, D. Hartley wrote:
I haven't programmed in C (python is my first language!), but I *have*
done something like this before, only with the print command:
def displaybalance():
for score, name in mylist:
slip = 30 - len(name)
slip_amt = slip*" "
pr
On Apr 26, 2005, at 23:57, D. Hartley wrote:
But in any case, font/text will only take strings - i cant pass in a
list, or an index to an item in a list (which is, in this case, a
tuple), and since the items in the list will be changed and updated
obviously i cant just type in the items as strings