3. Upload a Python Script to a Phone
Upload your Python script to the phone with Nokia PC Suite’s file manager
(Figure 2.2). Create a folder named Python on the phone’s memory card
(drive E: in Figure 2.3). Then copy the hello.py file from your computer
to the E:\Python folder on the phone. Now the script is ready to be
tested!
4. Test a Python Script
Start the PyS60 interpreter by clicking on the Python icon (Figure 2.1) on
the desktop or inside the appropriate folder on your phone. Once the
PyS60 interpreter has started up, select ‘Options’ (Figure 2.4(a)) and ‘Run
script’ (Figure 2.4(b)). Choose your script name, e:hello.py, from the
list and select ‘OK’. Your script should now start up and you should see
a green line stating Hello world! (Figure 2.5).
Congratulations! You have successfully written and executed your
script with PyS60! To go through all the examples in the book, repeat
steps 2–4 for each new script. Have fun with it!


No comments:
Post a Comment