Skip to content

Instantly share code, notes, and snippets.

@derekbrokeit
Created December 12, 2012 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derekbrokeit/4269280 to your computer and use it in GitHub Desktop.
Save derekbrokeit/4269280 to your computer and use it in GitHub Desktop.
patch for pymol pmg_tk to install on OSX with free glut
--- pymol/modules/pmg_tk/skins/normal/__init__.py 2012-12-13 01:19:10.000000000 +0900
+++ pymol_new/modules/pmg_tk/skins/normal/__init__.py 2012-12-13 01:15:42.000000000 +0900
@@ -250,7 +250,7 @@
self.buttonArea.destroy()
def my_show(self,win,center=1):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') and (sys.platform!='darwin'):
win.show()
else: # autocenter, deiconify, and run mainloop
# this is a workaround for a bug in the
@@ -269,13 +269,13 @@
# win.show()
def my_withdraw(self,win):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') or (sys.platform!='darwin'):
win.withdraw()
else:
win.destroy()
def my_activate(self,win,center=1,focus=None):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') and (sys.platform!='darwin'):
win.activate()
else: # autocenter, deiconify, and run mainloop
# this is a workaround for a bug in the
@@ -296,7 +296,7 @@
win.mainloop()
def my_deactivate(self,win):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') or (sys.platform!='darwin'):
win.deactivate()
else: # autocenter, deiconify, and run mainloop
win.destroy()
--- pymol/modules/pmg_tk/PMGApp.py 2012-12-13 01:19:10.000000000 +0900
+++ pymol_new/modules/pmg_tk/PMGApp.py 2012-12-13 01:15:42.000000000 +0900
@@ -184,7 +184,7 @@
self.fifo.put(cmmd)
def my_show(self,win,center=1):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') and (sys.platform!='darwin'):
win.show()
else: # autocenter, deiconify, and run mainloop
# this is a workaround for a bug in the
@@ -202,7 +202,7 @@
win.deiconify()
def my_withdraw(self,win):
- if sys.platform!='linux2':
+ if (sys.platform!='linux2') or (sys.platform!='darwin'):
win.withdraw()
else:
win.destroy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment