Re: [Rdkit-discuss] SDMolSupplier, next()

2019-10-16 Thread Greg Landrum
Paolo provided the answer, I will fix the docs. :-) -greg On Tue, Oct 15, 2019 at 11:12 PM Paolo Tosco wrote: > Dear Jean-Marc, > > in Python 3 you need to use next(suppl) or suppl.__next__(). > > Cheers, > p. > > On 10/15/19 21:34, Jean-Marc Nuzillard wrote: > > Dear all, > > The code: > >

Re: [Rdkit-discuss] SDMolSupplier, next()

2019-10-15 Thread Paolo Tosco
Dear Jean-Marc, in Python 3 you need to use next(suppl) or suppl.__next__(). Cheers, p. On 10/15/19 21:34, Jean-Marc Nuzillard wrote: Dear all, The code: from rdkit import Chem sdfnamein = "simple.sdf" suppl = Chem.SDMolSupplier(sdfnamein) m = suppl.next() print(m.GetNumAtoms()) prints:

[Rdkit-discuss] SDMolSupplier, next()

2019-10-15 Thread Jean-Marc Nuzillard
Dear all, The code: from rdkit import Chem sdfnamein = "simple.sdf" suppl = Chem.SDMolSupplier(sdfnamein) m = suppl.next() print(m.GetNumAtoms()) prints: Traceback (most recent call last):   File "demo.py", line 4, in     m = suppl.next() AttributeError: 'SDMolSupplier' object has no