Hi,
I'm having trouble trying to figure out how to create multiple
objects that contain duplicate entries that can be uniquely identified
within a Tkinter GUI.
I want a user to define an item and then
define multiple characteristics about that item,
save a dictionary of items,
and then reloa
-- Forwarded message --
Date: Sun, 20 Mar 2005 00:05:07 -0500
From: Jay Loden <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Prepend to a list?
Thanks for the replies everyone,
I ended up changing my approach so that it won't require appending to the
On 03/17/2005-10:15AM, Mike Hall wrote:
>
> Very nice sir. I'm interested in what you're doing here with
> the caret metacharacter. For one thing, why enclose it and the
> whitespace flag within a character class?
A caret as the first charachter in a class is a negation.
So this [^\s]+ means
Sorry, I meant Menu Editor... I'm not sure how you would handle your
global menubar. You could have one parent window with a menu, and none
of the children windows have menus.
But, when you open the children, your parent will lose focus, if
that's going to be a problem.
Ummm... if none of your chi
On Sat, 19 Mar 2005, Jay Loden wrote:
> How can I prepend something to a list? I thought that I could do
> list.prepend() since you can do list.append() but apparently not. Any
> way to add something to a list at the beginning, or do I just have to
> make a new list?
Hi Jay,
Liam and Sean po
Jay Loden wrote:
How can I prepend something to a list? I thought that I could do
list.prepend() since you can do list.append() but apparently not. Any way to
add something to a list at the beginning, or do I just have to make a new
list?
>>> a = []
help(a.insert)
insert(...)
L.i
Hi Jay,
>>> x = [2,3,4,5,6,7,8]
>>> x.insert(0,1)
>>> print x
[1, 2, 3, 4, 5, 6, 7, 8]
>>> print x.insert.__doc__
L.insert(index, object) -- insert object before index
Or
>>> a = [2,3,4,5,6,7,8]
>>> a.reverse()
>>> a.append(1)
>>> a.reverse()
>>> print a
[1, 2, 3, 4, 5, 6, 7, 8]
>>> print a.
How can I prepend something to a list? I thought that I could do
list.prepend() since you can do list.append() but apparently not. Any way to
add something to a list at the beginning, or do I just have to make a new
list?
-Jay
___
Tutor maillist -
Oh thanks!!
Sometimes I just look blind...
Jacob
Jacob S. wrote:
Hi everyone. Very simple set up for the problem, strange problem.
class Deck:
def __init__(self):
self.cards = []
for suit in range(4):
for rank in range(1,14):
self.cards.append(Card(suit,ra
Jacob S. wrote:
Hi everyone. Very simple set up for the problem, strange problem.
class Deck:
def __init__(self):
self.cards = []
for suit in range(4):
for rank in range(1,14):
self.cards.append(Card(suit,rank))
def __str__(self):
for card in sel
On 19 Mrz 2005, [EMAIL PROTECTED] wrote:
[Code]
> Maybe sombody likes to compare these algorithms to the
> ones mentioned before in this thread. I would be
> interested in the results.
I did it and on my machine here (a slow one) the following straight
forward version is the fastest one.
It's no
Hi everyone. Very simple set up for the problem, strange problem.
Cards.py ###
## Taken almost directly from Thinking Like a Computer Scientist
class Card:
suitList = ["Clubs","Diamonds","Hearts","Spades"]
rankList =
["","Ace","2","3","4","5","6","7","8","9","10","Jack","Queen","King"]
12 matches
Mail list logo