Python Language Lesson list

The values that make up a list are called its elements or items. The items can be of any type, such as strings or integers. Items of the list do not have to be of the same type, so you can have a list that contains both strings and integers. There are several ways to create a new list. The simplest is to enclose the elements in square brackets mylist uSymbian, uPyS60, uMobileArt Each item in the list can be accessed by its index in square brackets after the...

Example Bluetooth chat

Server socket.socket socket.AF_BT, socket.SOCK_STREAM channel server.bind , channel server.listen 1 server, True, socket.RFCOMM socket.set_security server, socket.AUTH socket.AUTHOR print Waiting for clients conn socket.socket socket.AF_BT, socket.SOCK_STREAM address, services socket.bt_discover print Connected to server appuifw.note uTarget is not running a btchat server, The function chat_server may look a bit convoluted, but actually it just performs some housekeeping to prepare the system...

Using a Phone as a Web Service

Accessing the phone's resources by way of the web is a 'bleeding-edge' approach that might be used as a springboard for many kinds of unprecedented applications. We have already seen some examples where a PyS60 program fetches some information from the web. Many more examples along these lines follow in Chapter 9. In this section, however, we consider the opposite case the phone could serve information to the web see Figure 8.7 . Figure 8.7 Phone providing a web service Figure 8.7 Phone...