However, what is effective in terms of computing resources is not always effective in … Lite rapid development with the Adobe Flash IDE and the powerful but simple Python programming … 2 1 Introduction This paper is the third in a series examining the possibilities of building Symbian OS applications by mixing multiple languages and runtime environments. The first paper 1 presented an overview of the runtimes that are available and the combinations which make sense. The paper also detailed a general pattern for implementing multi …
This paper is the third in a series examining the possibilities of building Symbian OS applications by mixing multiple languages and runtime environments. The first paper1 presented an overview of the runtimes that are available and the combinations which make sense. The paper also detailed a general pattern for implementing multi-language applications. The second paper2 described two example solutions which combine the strengths of Flash Lite for the UI with either Java ME or native Symbian C++ to access more features of the platform. In this paper we focus on the popular Python programming language. On Symbian OS, Python is available in the form of PyS60 on S60 devices, which is open source and actively maintained by engineers at Nokia. There is also PyUIQ for UIQ 2.1 and UIQ 3 devices, although the project on SourceForge ( sourceforge.net/projects/pyuiq/ ) is only in an ‘alpha’ state and hasn’t been updated for more than a year. The Python interpreter does not currently come pre-installed on any Symbian devices and must either be packaged with the application or installed beforehand by the user. PyS60 is based on a fairly old version of the Python interpreter (2.2.2 from October 2002), but it comes with a range of Symbian and S60-specific modules which enable very rapid prototyping of mobile applications. There is also a very active, enthusiastic and supportive developer community ( discussion.forum.nokia.com/forum/forumdisplay.php?f=102 ). For anyone new to Python or PyS60 programming there is an excellent introductory guide published by Symbian Press, Mobile Python: Rapid prototyping of applications on the mobile platform (more information is available at developer.symbian.com/main/documentation/books/books_files/python/index.jsp). From the perspective of multi-language programming, Python is interesting because it has a built- in extension mechanism, which makes it easy to wrap native Symbian C++ code and use it like any other Python module. In Section 2 of this paper, Mikko Ohtamaa and Jussi Toivola of Red Innovation ( www.redinnovation.com/ ) explain how to achieve this in detail. Another great feature of Python is that it’s very easy to learn, making it a good option for Flash Lite developers looking to extend the functionality available in the standard player. There are powerful and simple-to-use features for socket programming and string manipulation that allow the implementation of a local server to communicate with Flash Lite and interpret commands in a few tens of lines of code. Even this effort is unnecessary though, since Felipe Andrade has released the Flyer Framework under the open source Apache License.3 In Section 3, he explains what Flyer is and how you can use it. 2 Extending Python with Symbian C++ When two programming languages or two environments are co-operating, some sort of bridge must be formed between them: operating systems and user land applications have system calls and virtual machines running bytecode have native extensions. Written in a programming language which directly compiles into native binary format, the extensions offer a standardized way to wrap low level machine calls and byte structures to high level programming language constructs. The most notable extension mechanism today is JNI (Java Native Interface), which binds a Java runtime to its underlying operating system. Similarly, Python has Python extension modules. In this section we explore the possibility of extending the Python runtime with custom Symbian C++ elements.
http://www.pdfee.com/combining-python-with-flash-lite-and-symbian-c.html
Tags: Programming