mobilite

 

mobsessed:pythonS60

Page history last edited by Nicola 1 yr ago

 

Coding tutorial references:

Jurgen Scheible tutorial (+Mobile Python book to follow)

How to think like computer scientist tutorial @openbookproject
A byte of python tutorial

Learning to program tutorial

Developer project/s coding references:                                

 

Python basics to remember:

.py; don't use notepad due to requiring indentation use e.g. IDLE, conTEXT; does not need compilation to binary, runs straight from source code; 3 types of error: syntax, runtime, semantic (incorrect indentation is error); no semicolons at end of lines and blocks should have same indentation; in s60 no need to declare data types or variables, but need to define functions; need(u"") for unicode otherwise Python doesn't recognise; selectable menus are Python lists;

 

Python keywords:

and continue else for import not raise assert def except from in or return break del exec global is pass try class elif finally if lambda print while

Can't be used as variable names, can be letters or numbers but must start with letter, upper case would be weird

 

appuifw functions:

note, query, multi_query, popup_menu, selection_list, multi_selection_list, define an exit handler, set an Active Object, create the application menu, define what shall happen it the exit button is pressed

 

Text input options

Raw input

For s60 e.g.

single line text entries:

import appuifw

appuifw.query(label, type)

data = appuifw.query(u"Type a word:", "text")

appuifw.note(u"The typed word was: " + data, "info")

 

 

 

Comments (0)

You don't have permission to comment on this page.