document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # Script posted at: http://n8henrie.com/2013/02/quickly-import-pythonista-scripts-via-textexpander-or-bookmarklet
  2. # Script name: Import Pythonista Script from Clipboard
  3.  
  4. # I got help from here: http://twolivesleft.com/Codea/Talk/discussion/1652/what-others-do%3A-pythonista/p1
  5. # I got help from here: http://www.macdrifter.com/2012/09/pythonista-trick-url-to-markdown.html
  6.  
  7. import clipboard
  8. import urllib2
  9. import editor
  10. import os
  11.  
  12. url = clipboard.get()
  13. scriptName = os.path.basename(url)
  14. contents = urllib2.urlopen(url).read()
  15. editor.make_new_file(scriptName[:-3], contents)
');