OS.MAC at the Java level is an enum To us it like string: OSMACasString = str(OS.MAC)
-- 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

