Last active
December 18, 2015 19:39
-
-
Save ctrueden/5834247 to your computer and use it in GitHub Desktop.
I still don't like Python (even though I try!). I use [xpra](http://xpra.org/) via [Homebrew](http://mxcl.github.io/homebrew/), thanks to [ska-sa's awesome xpra formula](https://github.com/ska-sa/homebrew-tap). However, Apple removed the Carbon Python API, so I get an annoying stack trace whenever my xpra wants to issue a system bell. I hacked t…
This file contains hidden or 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
File "/Users/curtis/brew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/xpra/darwin/gui.py", line 137 | |
def get_gtk_keymap(self): | |
^ | |
IndentationError: expected an indented block |
This file contains hidden or 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
--snip-- | |
def system_bell(self, window, device, percent, pitch, duration, bell_class, bell_id, bell_name): | |
import Carbon.Snd #@UnresolvedImport | |
Carbon.Snd.SysBeep(1) | |
def get_gtk_keymap(self): | |
return get_gtk_keymap() | |
--snap-- |
This file contains hidden or 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
--snip-- | |
def system_bell(self, window, device, percent, pitch, duration, bell_class, bell_id, bell_name): | |
# CTR: silence annoying stack trace | |
#import Carbon.Snd #@UnresolvedImport | |
#Carbon.Snd.SysBeep(1) | |
def get_gtk_keymap(self): | |
return get_gtk_keymap() | |
--snap-- |
This file contains hidden or 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
--snip-- | |
def system_bell(self, window, device, percent, pitch, duration, bell_class, bell_id, bell_name): | |
import Carbon.Snd #@UnresolvedImport | |
# CTR: silence annoying stack trace | |
#Carbon.Snd.SysBeep(1) | |
def get_gtk_keymap(self): | |
return get_gtk_keymap() | |
--snap-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python supports empty functions using the keyword pass: