Hi all.

I have a class with the attribute 'log_file', opened out of the class:
class ProteinCluster:
   def __init__(self,cluster_name,log_file):
      ...
      self.log_file = log_file
      ...
Then i have a private method which write in the log_file:
   def _read_structure(self, pdb_code):
      ...
      ...
      self.log_file.write('blablabla')
      ...
      ...
When i run the script, it raises the error:
AttributeError: ProteinCluster instance has no attribute 'log_file'

My question is, the class attributes are valids in private methods, like in publics methods?

Thanks


--
Yasser Almeida Hernández, BSc
Center of Molecular Inmunology (CIM)
Nanobiology Group
P.O.Box 16040, Havana, Cuba
Phone: (537) 214-3178
alme...@cim.sld.cu

----------------------------------------------------------------
Correo FENHI



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to