February 16th, 2002, 03:38 AM
Join Date: Jun 2001
Location: Amersfoort, The Netherlands
Time spent in forums: < 1 sec
Reputation Power: 12
What are you trying to do? In the code you post nothing is printed to the screen, so it's right nothing gets printed.
Anyway, there's something wrong with your class definition:
class search(self, value):
Anything you put between these parentheses are the classes you want to inherit from. I don't think that's what you want here, You probably want something like this:
def __init__(self, Value):
self.Value = Value
# Function goes here.
SearchIt = Search(Value) # The value you want to search.
if structureorsmiles == SMILES:
You know, you should really try reading a good beginners book on CS and Python. I'd recommend this one:
How to think like a computer scientist: Learning with Python
Also, try putting your code within [ code][ /code] blocks(omit the spaces).
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs