![]() |
Nokia N9-How to use python to run py file
i use Nokia N9. I read some topic that N9 can install python. I installed python for N9 by Terminal (apt-get install python) but after i cant play *.py or i dont know how to run.
i used Symbian, this OS run py file very easy. just install python pack, and click py. Can you guide me how to use full python, espicial run py file from Nokia N9? TKS! |
Re: Nokia N9-How to use python to run py file
in terminal type:
Code:
python /path/to/file.py |
Re: Nokia N9-How to use python to run py file
Usually, it is enough to simply enter the path to the file. So, if the path to the file is /home/user/my_script.py, just type that in the terminal and press enter. Sometimes, you may need to tell the shell to use the python environment, in which case you would type
Code:
python /home/user/my_script.py |
Re: Nokia N9-How to use python to run py file
Quote:
My py file (used good in Symbian S60) is a application which can call someone automatic, when they answer the application automatic hangup and call again.....:p. maybe this app is bomb call:cool: |
Re: Nokia N9-How to use python to run py file
i tried. in Terminal say error line 1: no modules name appuifw.
BTW, in my code of py application have one more module name "telephone". So , how can i install module for this python app? sr 4 my bad English :) PS: my Py code i used in Python Symbian: import appuifw import telephone import e32 soDTbomb = appuifw.query(u"Victim number?","text") nm = appuifw.query(u"how much bomb:","number") def handleCall((callState, number)): if callState == telephone.EStatusConnected: e32.ao_sleep(0.2) telephone.hang_up() e32.ao_sleep(0.7) telephone.dial(soDTbomb) e32.ao_sleep(0.2) telephone.call_state(handleCall) for PS in range(nm): print "(^_^)Bombed %d"%(PS+1) telephone.dial(soDTbomb) try: e32.ao_sleep(0.7) telephone.dial(soDTbomb) except: telephone.call_state(handleCall) e32.ao_sleep(40) telephone.hang_up() e32.ao_sleep(0.7) print "Done %d call."%(PS+1) |
Re: Nokia N9-How to use python to run py file
In python language the "import" statement loads a code module for use, so you need to get the modules from somewhere.
I kind of guess that this "telephone" module is something that needs to be ported to the platform you are using, it propably does not exist for Harmattan yet. |
Re: Nokia N9-How to use python to run py file
Quote:
|
All times are GMT. The time now is 07:13. |
vBulletin® Version 3.8.8