Short answer: not really.
Long answer: sort of, but it's probably more trouble than it's worth, unless you really can't used the shell command for some reason. OS X doesn't really expose much system configuration to Python. Most scriptable interfaces to configure OS X are shell-based or AppleScript-based (and of course the various Objective-C APIs).
Getting the UUID is possible in AppleScript:
tell application "System Information"
set profile to system profile
quit
end tell
set delim to AppleScript's text item delimiters
set AppleScript's text item delimiters to "Hardware UUID: "
set uuid to paragraph 1 of text item 2 of profile
set AppleScript's text item delimiters to delim
uuid
But as you can see, it's a bit convoluted (and is much slower than the ioreg
method, as it has to process the entire system profile).
There is a way to bridge AppleScript to Python, known as Appscript, but it's no longer developed, and not recommended for new projects. However, if you're really determined, you could convert the above AppleScript into Python using Appscript. But to be honest, it seems like a lot of trouble to get a worse result.
In my experience, using Speakable Items for the rather, shall we say, complicated applications can get a bit tricky - but there's no reason it's not possible. Usually, if you use the "Make This Speakable" command whilst an application is in focus (i.e is your foreground app), a folder will be created for it in Application Speakable Items if it does not already exist.
As OS X is UNIX-based, my initial idea was to call the folder eclipse
, as the executable that the system sees (not the .app bundle itself) is actually called eclipse
as opposed to Eclipse
.
However, should that not work, Apple's official advice is to simply drag the folder to your desktop and then attempt to use the "Make This Speakable" command whilst using (in this case) Eclipse so that the computer will (or at least should) create the folder for you - at which point you can simply drag all the AppleScripts you have made into the newly-created folder.
From a programming / behind-the-scenes point of view, though, the answer may well hinge on what version of Java you are using! Should you be using Apple's own Java implementation, you will likely run into more problems than using the latest Java 7 release.
Eclipse uses the Standard Widget Toolkit (SWT), which wraps native controls (or more accurately, makes Java communicate with OS X like it would with, say, other *nix) so by those standards alone ought to already be accessible. I know that NetBeans is mostly, if not entirely accessible at least from a VoiceOver standpoint.
Browsing Eclipse's documentation and bug history reveals discussion of this back in 2007, and seems to suggest they were working on it in 2008, but there's no mention of having Eclipse controlled with AppleScript voice commands. It ought to be straightforward and simple, so if it seems like Eclipse and/or OS X is resisting every attempt to communicate with Java or the IDE itself via AppleScript(s), I'd be inclined to believe it's some quirk with Eclipse or its communication with the SpeechWorker and the rest of OS X.
Best Answer
Found out from someone at work...
Turns out that PyDev 3.x needs Java 7. Since I have Java 6, I need PyDev 2.x. I uninstalled, and then re-installed (unchecking the box that shows only the latest version) and now the PyDev perspective appears.