Last active
December 18, 2015 22:59
-
-
Save fredrikw/5858168 to your computer and use it in GitHub Desktop.
A patch to change pybel.py from version 2.3.2 to apply commit df59c4a630cf753723d1318c40479d48b7507e1c (fixes Molecule.draw())
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ../scripts/python/pybel.py 2012-10-03 21:08:52.000000000 +0200 | |
+++ /usr/local/lib/pybel.py 2013-06-24 22:40:30.024896494 +0200 | |
@@ -495,7 +495,9 @@ | |
Tkinter and Python Imaging Library are required for image display. | |
""" | |
- if not "png2" in outformats: | |
+ obconversion = ob.OBConversion() | |
+ formatok = obconversion.SetOutFormat("_png2") | |
+ if not formatok: | |
errormessage = ("PNG output format not found. You should compile " | |
"Open Babel with PNG support. See installation " | |
"instructions for more information.") | |
@@ -529,7 +531,7 @@ | |
filedes, filename = tempfile.mkstemp() | |
- workingmol.write("png2", filename=filename, overwrite=True) | |
+ workingmol.write("_png2", filename=filename, overwrite=True) | |
if show: | |
if sys.platform[:4] == "java": |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment