
February 16th, 2002, 03:38 AM
|
|
Python Prophet
|
|
Join Date: Jun 2001
Location: Amersfoort, The Netherlands
Posts: 45
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:
Code:
class Search:
def __init__(self, Value):
self.Value = Value
def SubSearch(self):
# Function goes here.
SearchIt = Search(Value) # The value you want to search.
if structureorsmiles == SMILES:
SearchIt.SubSearch(self, SMI)
else:
SearchIt.SubSearch(self, struc_smi)
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
|