From f245c8dc4cbf8cfdcfc03840818036157b9d00af Mon Sep 17 00:00:00 2001 From: Robert Klep Date: Sun, 10 Nov 2013 13:33:17 +0100 Subject: [PATCH] Made imports more specific to speed up start of app --- ToggleProxy.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ToggleProxy.py b/ToggleProxy.py index 51ec683..cb9f329 100644 --- a/ToggleProxy.py +++ b/ToggleProxy.py @@ -1,8 +1,9 @@ #!/usr/bin/env python -from Foundation import * -from AppKit import * -from SystemConfiguration import * +from Foundation import NSLog, kCFRunLoopCommonModes, kCFAllocatorDefault, CFDictionaryGetValue, CFRunLoopAddSource +from AppKit import NSObject, NSImage, NSStatusBar, NSVariableStatusItemLength, NSMenu, NSMenuItem, NSRunLoop, NSOnState, NSApp, NSLog, NSOffState, NSApplication +from SystemConfiguration import kSCNetworkProtocolTypeProxies, kSCPropNetProxiesFTPEnable, kSCPropNetProxiesHTTPEnable, kSCPropNetProxiesHTTPSEnable, kSCPropNetProxiesRTSPEnable, kSCPropNetProxiesSOCKSEnable, kSCNetworkProtocolTypeProxies +from SystemConfiguration import SCDynamicStoreCreate, SCNetworkServiceCopyProtocol, SCNetworkProtocolGetConfiguration, SCDynamicStoreCopyValue, SCPreferencesCreate, SCNetworkServiceCopyAll, SCNetworkServiceGetInterface, SCNetworkInterfaceGetBSDName, SCDynamicStoreSetNotificationKeys, SCDynamicStoreCreateRunLoopSource, SCDynamicStoreCopyProxies, SCNetworkServiceGetName import commands, re class ToggleProxy(NSObject):