I am trying with NSArray.arrayWithContentsOfFile_("bla.sdef") but that returns None.
I also tried NSDictionary.dictionaryWithContentsOfFile_("bla.sdef") but that also returns None.
I am trying to get a NSDictionary object in the end in a form where parts of it are conforming to the dict for NSScriptCommandDescription initWithSuiteName:commandName:dictionary:.
(Note: I don’t want to know here how to load scripting definitions into NSScriptSuiteRegistry. I really just want to know here how to read the sdef-file.)
Those methods are for reading property-list files. An sdef file is not a property list; it follows a different, purpose-specific XML schema, defined in sdef(5).
I don’t think there is a public API for reading sdef files directly into a dictionary or more scripting-specific object; you’ll need to do it yourself using an XML parser (either one of Cocoa’s or one of Python’s).