Ori Amiga is a Group Program Manager over in the Live Framework team whom you might have seen at PDC08 delivering the Lap Around LiveFX & Mesh Services and LiveFX Programming Model Architecture and Insights talks. And apparently, he’s an IronPython fan as posted a small LiveFX Python module to his blog. It’s pretty simple – it only wraps Connect and ConnectLocal – but it does cut about ten lines of path appending, reference adding and module importing code into a single import statement. Here’s the profile access script from my last post rewritten to use Ori’s LiveOE module.
import LiveOE from devhawk import linq uid = raw_input("Enter Windows Live ID: ") pwd = raw_input("Enter Password: ") loe = LiveOE.Connect(uid, pwd) general = linq.Single(loe.Profiles.Entries, lambda e: e.Resource.Type == LiveOE.ProfileResource.ProfileType.General) print loe.Mesh.ProvisionedUser.Name print loe.Mesh.ProvisionedUser.Email print general.Resource.ProfileInfo.PersonalStatusMessage print linq.Count(loe.Contacts.Entries)
FYI, make sure you update the sdkLibsPath in LiveOE.py – I’m not sure where Ori has installed the LiveFX SDK, but it’s *not* in the location suggested by the read me file.
BTW, it turns out the WL Profile information is read only which answers a question I had. However, reading the thread it sounds like they will eventually get around to making it read-write at some point.