Sanox
5th February 2009, 00:13
How to write a Python program and install it to the phone (s60v3)
1.First you need to get this software products:
-PythonForS60_1_4_5_2ndEdFP2 if your phone has Feature Pack 2 : (Nokia N79, N85) or PythonForS60_1_4_5_2ndEdFP1 (N82,N73...). Install this program to your phone.
- python-2.5.4 – this is the programming language for Windows-environment.There are newer versions, check the official site.
- openssl-0.9.8h-1-setup – this will help you create the Sis package.
- ensymble_python2.5-0.26 – this script compiles the sis file.
2. Now that we installed everything we will start from the beginning by whting a program written in 1974 called HelloWorld.
3. Open notepad.exe or some other text editor and write :
#This command imports the user interface module
import appuifw
#Creates an alert, which is shown in the interface. You can write whatever you want in the parenthesis (no curse words though )
appuifw.note(u"Hello World","info")
#do some math
print (1.2+2.3+3.4)/5
4.Save the file as helloworld.py (if you are working with notepad save not as ТХТ but as ALL FILES.
5.Now we must add OpenSSL in Windows System Path. Go to Start > Control Panel > System > Advanced > Environment Variables > System Variables > Path and show where you have installed OpenSSL. For example: ;C:\Program Files\GnuWin32\bin
[Only registered and activated users can see links]
6. It is time to copy stuff now :D
-copy the script that you wrote helloworld.py in the same directory : For example C:\Program Files\GnuWin32\bin
-copy there again ensymble_python2.5-0.26 and rename it to ensymble.py
-copy all exe-from python folder C:\Python2.5: python, python25, pythonw, pythonw25 in the bin directory of OpenSSL. For example in C:\Program Files\GnuWin32\bin.
7. Go to Start > Run and write cmd. If you cannot find command prompt-a its in C:\Windows\System32\cmd.exe
8. lets review some DOS commands from back when we were students in highschool:
Cd – change directory no comment here :D
Dir/p – directory/page – directory arranged in pages
Cd.. - gets you one step backward
Cd\ - gets you to the root like C:\ ... D:\ or whatever you have
If you want to change from C: to D: write D: when in С: (C:\D: )
Get to the directory in which the bin file of SSL is located . For example get to C:\Program Files\GnuWin32\bin.
[Only registered and activated users can see links]
9. Now write the following :
[Only registered and activated users can see links]
In General write:
python ensymble.py py2sis --uid=0x01234555 --appname=[1] --icon=[2] --version=1.0.0 --cert=[3] --privkey=[3] --passphrase=12345 --vendor=[4] --verbose myapp.py myapp.sis
where :
[1] is the name of your app that is displayed in the phone menu after installation
[2] is the .svg image that will be the icon of your program. It's optional
[3] You need a certificate and key file to install the app on a phone, but not to make it. So don't write these for now, if this is your first application.
[4] is your name
Now that the program is assembled we can install it to our phones !!!
Here is the end product :
[Only registered and activated users can see links]
Keep in mind that this is only the beginning. There are many books about python out there so if you feel like becoming a famous python coder feel free to explore :D
There is a book in the archive I hope you find it usefull.
Sources: [Only registered and activated users can see links]
DOWNLOAD:
[Only registered and activated users can see links]
1.First you need to get this software products:
-PythonForS60_1_4_5_2ndEdFP2 if your phone has Feature Pack 2 : (Nokia N79, N85) or PythonForS60_1_4_5_2ndEdFP1 (N82,N73...). Install this program to your phone.
- python-2.5.4 – this is the programming language for Windows-environment.There are newer versions, check the official site.
- openssl-0.9.8h-1-setup – this will help you create the Sis package.
- ensymble_python2.5-0.26 – this script compiles the sis file.
2. Now that we installed everything we will start from the beginning by whting a program written in 1974 called HelloWorld.
3. Open notepad.exe or some other text editor and write :
#This command imports the user interface module
import appuifw
#Creates an alert, which is shown in the interface. You can write whatever you want in the parenthesis (no curse words though )
appuifw.note(u"Hello World","info")
#do some math
print (1.2+2.3+3.4)/5
4.Save the file as helloworld.py (if you are working with notepad save not as ТХТ but as ALL FILES.
5.Now we must add OpenSSL in Windows System Path. Go to Start > Control Panel > System > Advanced > Environment Variables > System Variables > Path and show where you have installed OpenSSL. For example: ;C:\Program Files\GnuWin32\bin
[Only registered and activated users can see links]
6. It is time to copy stuff now :D
-copy the script that you wrote helloworld.py in the same directory : For example C:\Program Files\GnuWin32\bin
-copy there again ensymble_python2.5-0.26 and rename it to ensymble.py
-copy all exe-from python folder C:\Python2.5: python, python25, pythonw, pythonw25 in the bin directory of OpenSSL. For example in C:\Program Files\GnuWin32\bin.
7. Go to Start > Run and write cmd. If you cannot find command prompt-a its in C:\Windows\System32\cmd.exe
8. lets review some DOS commands from back when we were students in highschool:
Cd – change directory no comment here :D
Dir/p – directory/page – directory arranged in pages
Cd.. - gets you one step backward
Cd\ - gets you to the root like C:\ ... D:\ or whatever you have
If you want to change from C: to D: write D: when in С: (C:\D: )
Get to the directory in which the bin file of SSL is located . For example get to C:\Program Files\GnuWin32\bin.
[Only registered and activated users can see links]
9. Now write the following :
[Only registered and activated users can see links]
In General write:
python ensymble.py py2sis --uid=0x01234555 --appname=[1] --icon=[2] --version=1.0.0 --cert=[3] --privkey=[3] --passphrase=12345 --vendor=[4] --verbose myapp.py myapp.sis
where :
[1] is the name of your app that is displayed in the phone menu after installation
[2] is the .svg image that will be the icon of your program. It's optional
[3] You need a certificate and key file to install the app on a phone, but not to make it. So don't write these for now, if this is your first application.
[4] is your name
Now that the program is assembled we can install it to our phones !!!
Here is the end product :
[Only registered and activated users can see links]
Keep in mind that this is only the beginning. There are many books about python out there so if you feel like becoming a famous python coder feel free to explore :D
There is a book in the archive I hope you find it usefull.
Sources: [Only registered and activated users can see links]
DOWNLOAD:
[Only registered and activated users can see links]