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
protocol DragViewDelegate { | |
var acceptedFileExtensions: [String] { get } | |
func dragView(dragView: DragView, didDragFileWith URL: NSURL) | |
} | |
class DragView: NSView { | |
required init?(coder: NSCoder) { | |
super.init(coder: coder) | |
registerForDraggedTypes([NSFilenamesPboardType, NSURLPboardType]) |
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
from PyPDF2 import PdfFileReader | |
from pprint import pprint | |
def walk(obj, fnt, emb): | |
''' | |
If there is a key called 'BaseFont', that is a font that is used in the document. | |
If there is a key called 'FontName' and another key in the same dictionary object | |
that is called 'FontFilex' (where x is null, 2, or 3), then that fontname is | |
embedded. | |
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
import objc | |
from AppKit import * | |
from Foundation import * | |
class Alert(object): | |
def __init__(self, messageText): | |
super(Alert, self).__init__() | |
self.messageText = messageText | |
self.informativeText = "" |