I too am a little confused what exactly you're going for, but here is a shot
at the two things I think you could be asking for:
If you're trying to create a world where you have it populated with several
different types of cells at different coordinates, and you'd like to make it
so the user can s
Ara Kooser wrote:
Your question is not very clear but I made some guesses below.
> zz = raw_iput("What kind of yeast cell do you want to add?
> Options:GoodYeast")
> #Here I want to call this instace of GoodYeast from yeast_cell.py
So you want the user to input the name of a class
"Ara Kooser" <[EMAIL PROTECTED]> wrote
> In the main program at the function def add_yeast(world): I want to
> instance the class GoodYeast and have the global variable @ change
> to
> G on the world. I tried just creating an instance but that did not
> go
> over so well.
"did no go over so we
I'm not sure I understnad your quesiton..
You can put classes into lists, dictionaries, et cetera. For example:
##
class Foo(object):
pass
class Bar(object):
pass
class Baz(object):
pass
my_classes = { 'foo':Foo, 'bar':Bar, 'baz':Baz }
thing = my_classes['bar']()
##
It seems qui
Thank you for your help on classes. I am working on an old program I
started in 2005. This time around I am trying to model cell behavior
using a PD model. I have the main program and then a file called
yeast_cell.py that contains the classes I want to instance.
In the main program at the function