Skip to content

Instantly share code, notes, and snippets.

@pudquick
Created July 14, 2017 13:48
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pudquick/a52b036424bd9975d719f224ca8cc8d5 to your computer and use it in GitHub Desktop.
Save pudquick/a52b036424bd9975d719f224ca8cc8d5 to your computer and use it in GitHub Desktop.
Search my gists ;p
#!/usr/bin/python
from Foundation import NSWorkspace, NSURL
import urllib
def show_gists():
NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_('https://gist.github.com/search?q=%40pudquick&ref=searchresults'))
def search_gists(search_string):
NSWorkspace.sharedWorkspace().openURL_(NSURL.URLWithString_('https://gist.github.com/search?q=%%40pudquick+%s&ref=searchresults' % search_string))
@clburlison
Copy link

The imports are wrong. Should be:

from AppKit import 
from Foundation import NSURL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment