Python for S60 3rd Edition and Platform Security

nokia.gifLast week, Nokia released a beta version of Python for Series 60 3rd Edition. The final 1.4.0 release will be out some time in the second half of 2006. The first thing of note is that bug fixes and new features for pre-3rd edition are on hold while work goes on to get the 3rd Edition version completed.

I was previously curious as to how Python (and interpreted code in general) could remain usable under Symbian Platform Security. In particular, how can a script gain access to features that are ordinarily protected under C++?

The answer is it can’t. Nokia have chosen to defer the complexities of capability requirements to the Python developer. This means that the Python developer has to understand Python platform security and sign certain applications. At first sight, this looks like a large barrier for the typical Python developer.

There are now two installs, one for the Interpreter and one for the shell that runs scripts. The Interpreter is (mainly) a DLL with a large number of capabilities. This DLL operates in the same way as other system DLLs – users of the DLL (e.g. the shell app) must have the same or lower capability and must be signed. Signing does not necessarily imply Symbian Signed testing. This depends on which capabilities you want to use. What does all this mean?

In practice, as long as you don’t use the GSM location or contacts functionality, you can still use the shell to run your scripts. If you want to run your script stand-alone then you can self-sign (no Symbian Signed testing needed) with the same capabilities as the shell app…

  • LocalServices
  • NetworkServices
  • ReadUserData
  • UserEnvironment
  • WriteUserData

If you need the GSM location, contacts or a 3rd party extension that requires extra capabilities then you will have to get your application Symbian Signed (tested). Currently there will be problems with some of the Symbian signed test cases (e.g. PyS60 does not report the possible low memory situation when it is started and if it is unable to run due to low memory). I expect the interpreter will need lots more work before end-user Python applications pass Symbian Signed.