[其他] 有人在手机上玩Python么?
NO1111
2008-10-12
# -*- coding: utf-8 -*- import appuifw, e32 ## Simple MyFormView class to demonstrate the use of forms. class MyFormView( object ): ## The constructor. def __init__( self ): ## Bool self._iIsSaved = False ## Model list. self._iModels = [u'6600', u'6630', u'7610', u'N90', u'N70'] ## Form fields. self._iFields = [( u'Mobile', 'text', u'Nokia'), ( u'Model', 'combo', ( self._iModels, 0 ) ), ( u'Amount','number', 5 ), ( u'Date','date' ), ( u'Time','time' )] ## Displays the form. def setActive( self ): self._iIsSaved = False self._iForm = appuifw.Form(self._iFields, appuifw.FFormEditModeOnly) self._iForm.save_hook = self.mainForm self._iForm.flags = appuifw.FFormEditModeOnly self._iForm.execute( ) ## save_hook send True if the form has been saved. def _markSaved( self, aBool ): self._iIsSaved = aBool ## _iIsSaved getter. def isSaved( self ): return self._iIsSaved ## Return mobile field value. def getMobile( self ): ## This returns the mobile; In one case I needed to have UTF-8 encoding return self._iForm[0][2].encode( "utf-8" ) def mainForm(self, aBool): if aBool: print u'for test.......' menus = [u'pinfo', u'acct mang', u'acct trans'] appuifw.app.body = appuifw.Listbox(menus) if __name__ == "__main__": app_lock = e32.Ao_lock() appuifw.app.title = u'Try Forms' myForm = MyFormView( ) myForm.setActive( ) if not myForm.isSaved( ): pass #print myForm.getMobile( )谁知道这个程序为什么能打出'for test.....',但必需要等按右边的返回键才可以么?我想让它马上显示listbox,为什么不行呢? |
|
poson
2009-06-21
mikel 写道 我用手机写python程序,坐公交时候编程
我崇拜你... |
|
fendydeng
2009-07-08
用PED写
|
相关讨论
相关资源推荐
- 如何在你的Android手机上配置 Python 环境?
- python编辑器安卓手机版,Python可以在手机上运行吗?
- 苹果手机上运行python_手机上运行Python
- python能在ipad上运行吗_如何用iPad运行Python代码?
- 想学python但是有好多英文不认识?python常用英文单词都在这
- 如何在手机上配置 Python 环境
- 手机可以python编程吗_如何在安卓手机上编程Python代码并运行-百度经验
- 教你用Python爬取手机App数据!居然有人说爬不了APP
- python京东抢购手机攻略_Python实现自动上京东抢手机
- 30个Python小游戏,上班摸鱼我能玩一天【内附源码】