×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    Philippines
    Posts
    3

    Unhappy Please help installing Python libraries on S60

    Can someone please give me some help or directions on getting pyton libraries installed on my N80.

    I'm trying to use PUTools but I have no idea how to install the libraries and the scripts. The procedure described says that if you send the *.py files to your phone, the python installer will ask you if you want to install as a script or install as a library.

    Well, my phone doesn't ask anything. If I send the files through bluetooth, they end up in my mailbox and if I open them I just see the content (python code) in the note application. I can save the file but I have no idea where it gets saved.

    This is an extract from the Getting Started PDF but this doesn't seem to work on my phone.

    4.6 Using Python Installer Program
    The Python Installer program makes it possible for the users to install Python scripts and library modules to the phone by sending them to the phone as such. Python Installer is installed simultaneously with Python for Series 60, but it is not necessary when using an SDK.
    The Python Installer comes with a MIME (Multipurpose Internet Mail Extensions) type recognizer. It recognizes files with filename extensions .py, .pyc, .pyo, and .pyd.
    The Python Installer asks on installation whether the file is to be installed as a "Python script" (under Python execution environment) or as a "Python lib module" (library component). Files with the extension .pyc, .pyo, or .pyd can only be installed as a library (see Table 3).


    Python (1.3.11) is running fine on the phone and so is the bluetooth console.
    My phone is a 3rd edition (N80) firmware 4.0623.0.41.

    I also tried to copy the files to C:\System\libs, C:\System\Lib, C:\Python (this is where my sample scripts were installed) but no effect.
    If I try to run the script phpush.py I get the error No module named phcomm.

    I found a lot of python scripts and/or modules in C:\Resources but my file manager (Y-browser) wont let me copy any files to that directory.

    Please help!
    Eric Roijen.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    9

    Re: Please help installing Python libraries on S60

    I just copy my python files in E:\Python and that seems to work. Sometimes I need to adjust the include path in the scripts as well to point to E:\Python.

    Johan

  3. #3
    Registered User
    Join Date
    Oct 2006
    Location
    Philippines
    Posts
    3

    Angry Re: Please help installing Python libraries on S60

    Thanks for your answer. But no luck.
    I tried but the result is the same.

    There really is a problem with my Python installation I guess.
    I gave my N80 a factory reset and installed Python again.
    This time I installed 1.3.12.

    Still .py files are not picked up by the Python installer as documented in the PDF's.

    Can someone please help me getting this right.

    I really regret buying an N80. This is the worst phone I ever owned.
    The hardware is ok but the software really sucks. Many times programs get stuck or the phone just reboots. I think S60 3rd edition is a major mistake.
    It's incompatible with all the older S60 software.

    I'm really hoping for the day there will be hardware like the N80 but with Windows Mobile instead of Symbian. I think the N80 was my last Symbian phone.

  4. #4
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Please help installing Python libraries on S60

    Hi ericroijen,

    the N80 is a 3rd edition phone, if you check previous threads on the forum, you'll see that the Python installer for 3rd edition phones doesn't work or is not ready. The development team has difficulties with a bug they hardly understand. So we'll have to be patient for the automatic install. The putools documentation was made for 2nd edition phones, so not available for your case.

    There's an easy way for you to install you scripts, on your E: drive (memory card), use your bluetooth file manager and create a python folder, so e:\\python. Then simply push your scripts in this folder and you'll me able to get them from Options > Run script.

    See http://students.oamk.fi/~dlefevre/th...he-thesis-work if you want to understand why this works

    Try this!

    LFD

  5. #5
    Registered User
    Join Date
    Oct 2006
    Location
    Philippines
    Posts
    3

    Re: Please help installing Python libraries on S60

    LFD, thanks for your reply.

    I did read most of the posts about Python in this (and other) forum but I must have missed the one stating that the installer doesn't work on S603rd. I did read the changelog, release notes and everything else I could find but nowhere it states that the installer doesn't work.

    I don't mind that some things don't work but I do mind if something important as that is not in the release notes or changelogs. I even checked the bug list on Sourceforge but I did not see it mentioned. It is so very frustrating for newbies to Symbian and Python if things don't work, whatever you try.

    My problem is not getting script to run, the example scripts run fine.
    The problem is scripts that depend on modules don't run because I cannot install some scripts as libraries. Can you offer any advice how to get some scripts to run if they depend on other modules (that I cannot install).

    Is there a default.py script after installing Python on S60 3rdEdition? I search my phone, using Y-Browser but there seems to be no default.py script.
    Is this correct?
    If so, when I want a default.py script, where do I put that script?

    Eric Roijen.
    Last edited by ericroijen; 2006-10-26 at 10:18.

  6. #6
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Please help installing Python libraries on S60

    To install libraries for now I think there's no other choices than making installation packages.

    You won't be able to locate the library folder (c:\\resource) cause you are not root on the phone and it is a protected folder.

    Step one. Create a .sis file. For this you need a .pkg file like lib.pkg for example with:
    Code:
    &EN
    #{"libname"},(0x00005000),1,0,0, TYPE=SA    <---- choose a good uid
    %{"Vendor-EN"}
    :"Vendor"
    [0x101F7961], 0, 0, 0, {"S60ProductID"}
    "libname.py"-"c:\resource\libname.py"
    Step2. This will work with the .pkg in the same folder than the .py script:
    Code:
    makesis lib.pkg
    Now to be able to install a package on 3rd edition phone you need to self-sign it unless you want to pay for all testing signing process
    Step3.
    Code:
    makekeys -cert -password yourpassword -len 2048 -dname "CN=libname OU=Development" mykey.key mycert.cer
    Type enough caracters or move the mouse that it start to generate the key and certificate.

    Step4. sign the package
    Code:
    signsis libname.sis libname.sisx mycert.cer mykey.key yourpassword
    Finaly, push the .sisx sign package to your 3rd edition phone.

    I hope this will work

    LFD

  7. #7
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Please help installing Python libraries on S60

    And btw, the default.py is in c:\\private\\F0201515\\default.py but private area on the phone, so you won't see it from Y-Browser even if it's there

    LFD

  8. #8
    Registered User
    Join Date
    Aug 2006
    Posts
    6

    Smile Re: Please help installing Python libraries on S60

    A slightly off-topic reply:

    Quote Originally Posted by ericroijen
    I really regret buying an N80. This is the worst phone I ever owned. The hardware is ok but the software really sucks. Many times programs get stuck or the phone just reboots. I think S60 3rd edition is a major mistake.
    It's incompatible with all the older S60 software.
    Ericroijen, I also have a N80, which replaced a 6600, and have found it to be very stable. If you are having stability concerns, I highly recommend upgrading to the latest firmware. This can be done either at a nokia service center, or now even at home from your PC (Windows only unfortunately).

    Firmware updates here:
    http://www.nokia.co.uk/nokia/0,1522,...softwareupdate

    More help here at the N80 forum on AAS:
    http://www.allaboutsymbian.com/forum...splay.php?f=84

    Aside from the current 3rd ed pys60 limitation on installing modules/libraries, I have found my N80 to be _the best_ phone/PDA I have ever owned - and that's after using Palm OS for a longtime, and using Mac OS X as my primary (only) desktop OS (both syncing PIM data with the Mac and developing on the Mac are remarkably straight forward).

    As soon as I finish a couple of apps I'm working on for my N80, it will completely replace my Palm PDA. (**Raises beer to the pys60 team**)

    (If you do upgrade your firmware, backup your phone first.)

  9. #9
    Registered User
    Join Date
    Mar 2006
    Posts
    1

    Re: Please help installing Python libraries on S60

    Quote Originally Posted by ericroijen View Post
    Can someone please give me some help or directions on getting pyton libraries installed on my N80.

    I'm trying to use PUTools but I have no idea how to install the libraries and the scripts. The procedure described says that if you send the *.py files to your phone, the python installer will ask you if you want to install as a script or install as a library.

    Well, my phone doesn't ask anything. If I send the files through bluetooth, they end up in my mailbox and if I open them I just see the content (python code) in the note application. I can save the file but I have no idea where it gets saved.

    This is an extract from the Getting Started PDF but this doesn't seem to work on my phone.

    4.6 Using Python Installer Program
    The Python Installer program makes it possible for the users to install Python scripts and library modules to the phone by sending them to the phone as such. Python Installer is installed simultaneously with Python for Series 60, but it is not necessary when using an SDK.
    The Python Installer comes with a MIME (Multipurpose Internet Mail Extensions) type recognizer. It recognizes files with filename extensions .py, .pyc, .pyo, and .pyd.
    The Python Installer asks on installation whether the file is to be installed as a "Python script" (under Python execution environment) or as a "Python lib module" (library component). Files with the extension .pyc, .pyo, or .pyd can only be installed as a library (see Table 3).


    Python (1.3.11) is running fine on the phone and so is the bluetooth console.
    My phone is a 3rd edition (N80) firmware 4.0623.0.41.

    I also tried to copy the files to C:\System\libs, C:\System\Lib, C:\Python (this is where my sample scripts were installed) but no effect.
    If I try to run the script phpush.py I get the error No module named phcomm.

    I found a lot of python scripts and/or modules in C:\Resources but my file manager (Y-browser) wont let me copy any files to that directory.

    Please help!
    Eric Roijen.
    Hi,
    I had the same problem. Just renamed the "libs" directory under e:\Python to "lib" and push works fine.

    HTH,
    Radek

  10. #10
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Please help installing Python libraries on S60

    hi rskokan
    A warm welcome to you at the forum nokia discussion boards
    great that you sort with your problem on your own and thanks for sharing the fact in the forum.

    Enjoy Pythoning
    Gaba88

  11. #11
    Registered User
    Join Date
    Jul 2009
    Posts
    1

    Re: Please help installing Python libraries on S60

    yeaa....i wonder how you do that on the N95. I cant seem to find it anywhere. From the Filemgr i see the python folder created on the mem card. and i see some files in it. PY files i think. how do i do wat u say?

  12. #12
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Please help installing Python libraries on S60

    Quote Originally Posted by vbn_in View Post
    yeaa....i wonder how you do that on the N95. I cant seem to find it anywhere. From the Filemgr i see the python folder created on the mem card. and i see some files in it. PY files i think. how do i do wat u say?
    It would help you describe the situation in detail: what exactly do you want to achieve and what have you tried so far?

Similar Threads

  1. Python S60 Emulator
    By NAYSAMBO in forum Symbian
    Replies: 25
    Last Post: 2009-04-08, 10:22
  2. Replies: 2
    Last Post: 2006-10-19, 17:53
  3. Required SDK for s60 python language
    By mohib in forum Symbian
    Replies: 2
    Last Post: 2006-10-11, 22:09
  4. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×