Forwarding the answer back to the list.

On 11/04/2019 14:41, Andrew Dalke wrote:
Ahh, look like I read the pybel code wrong.

When I get confused about the OB API, I look there first to see how Noel did it.

Here's the relevant code:

         if filename:
             if isinstance(filename, bytes):
                 gzextension = b'.gz'
             else:
                 gzextension = '.gz'
             if os.path.splitext(filename)[1] == gzextension:
                 self.obconversion.AddOption('z', self.obConversion.GENOPTIONS)


So, try obConversion.GENOPTIONS ?


                                Andrew
                                da...@dalkescientific.com



On Apr 11, 2019, at 15:31, Tim Dudgeon <tdudgeon...@gmail.com> wrote:

Unfortunately that doesn't work either. Still writes uncompressed.

On 11/04/2019 14:15, Andrew Dalke wrote:
obConversion.AddOption("z")
Try:

obConversion.AddOption("z", obConversion.OUTOPTIONS)

                                Andrew
                                da...@dalkescientific.com





_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to