Wow, thank you for your quick fix!
At first, I thought it is a documentation bug; the latter code sample is wrong. 
 But you haven't touched the Docs repository.

I grasped your commit 295fd79 on Sikulix repo and still have a question.
The variable 'myOS', or OS.MAC, does it behave like str?

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1864265

Title:
  Code example for Settings.getOS() contains error

Status in Sikuli:
  Fix Committed

Bug description:
  <https://sikulix-2014.readthedocs.io/en/latest/globals.html#Settings.getOS>
  provides two (similar) examples.  The former works fine but the latter
  does not.

  
  myOS = Settings.getOS()
  if myOS == "MAC" or myOS.startswith("M"):
          print "Mac " + myVer # e.g., Mac 10.6.3
  else:
          print "Sorry, not a Mac"

  
  The variable myOS is just an int; comparing with str "MAC" does not make 
sense and calling startswith causes AttributeError.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1864265/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to