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
예제 #3
0
#! /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")
예제 #4
0
 def test0002versionstopped(self):
     self.stopSnarl()
     self.assert_(PySnarl.snGetVersion() == False)
예제 #5
0
 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)
예제 #6
0
파일: example.py 프로젝트: myelin/tcpsnarl
#! /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"
예제 #7
0
 def test0002versionstopped(self):
     self.stopSnarl()
     self.assert_(PySnarl.snGetVersion() == False)
예제 #8
0
 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)