def __init__(self, username, password): self.username = username self.password = password self.opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) self.encode = urllib.urlencode if PySnarl.snGetVersion() != False: (major, minor) = PySnarl.snGetVersion() print ('Found Snarl version', str(major) + "." + str(minor), 'running.') else: print ("Sorry Snarl does not appear to be running")
def notify_snarl(self, buff_str, title, wnd): # Title not supported yet # Icon path: icon_path = os.path.join(os.getcwd(), "icon.ico") title = 'Notification' if PySnarl.snGetVersion() != False: id = PySnarl.snShowMessage("Notification", buff_str, timeout=NOTIFY_TIMEOUT, iconPath=icon_path, replyWindow=wnd, replyMsg=win32con.WM_LBUTTONDOWN) # This isn't working; try TTM_RELAYEVENT
#! /usr/bin/python import PySnarl if PySnarl.snGetVersion() != False: (major, minor) = PySnarl.snGetVersion() print("Found Snarl version",str(major)+"."+str(minor),"running.") PySnarl.snShowMessage("Test Message", "Hello World!") else: print("Sorry Snarl does not appear to be running")
def test0002versionstopped(self): self.stopSnarl() self.assert_(PySnarl.snGetVersion() == False)
def test0001versionstarted(self): (a, b) = PySnarl.snGetVersion() self.assert_(type(a) == int or type(a) == long) self.assert_(type(b) == int or type(b) == long)
#! /usr/bin/python import PySnarl if PySnarl.snGetVersion() != False: (major, minor) = PySnarl.snGetVersion() print "Found Snarl version",str(major)+"."+str(minor),"running." PySnarl.snShowMessage("Test Message", "Hello World!") else: print "Sorry Snarl does not appear to be running"
def test0002versionstopped(self): self.stopSnarl() self.assert_(PySnarl.snGetVersion() == False)
def test0001versionstarted(self): (a, b) = PySnarl.snGetVersion() self.assert_(type(a) == int or type(a) == long) self.assert_(type(b) == int or type(b) == long)