×

Discussion Board

Page 4 of 10 FirstFirst 12345678910 LastLast
Results 46 to 60 of 142

Thread: Python for UIQ

  1. #46
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Can any moderator change the thread title to "Python for UIQ 2"? (as long as this thread is about UIQ 2; if anybody is able to apply these posts to UIQ 3, please tell us!)

  2. #47
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Python for UIQ

    cassioli, you can compile a version of PyS60 without the user interface by omitting the app and appui directories from the build. Note that you will need to provide your own EXE that loads and starts the interpreter.

  3. #48
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Quote Originally Posted by jplauril
    cassioli, you can compile a version of PyS60 without the user interface by omitting the app and appui directories from the build. Note that you will need to provide your own EXE that loads and starts the interpreter.
    can I start the interpreter from ESHELL command line, just for testing? I mean, is it just a .exe file?

    And, to omit app and appui folder is it enough to properly edit the makefilesbefore compiling? (.MMP file, right?)

  4. #49
    Registered User
    Join Date
    Jul 2005
    Posts
    33

    Re: Python for UIQ

    Quote Originally Posted by cassioli
    About programming in jython: do you know which phone features jython can access? Things like contacts, messages, ToDos.... can they be accessed using standard jython functions? I guess not...
    If not, do you think it is possible to "tune" the s60 c++ version of Python to get it UIQ compatible? Even without any GUI it would be very useful: I know s60 python can access even complex phone features with just a few lines of code!
    It'll be great,if there is something like CPython on UIQ.And I'll love to use it.
    Now we can use Python Language on UIQ with Jython.
    But If You try to use Symbian resources such as Contact database,agenda,SMS.
    You need C++,or JNI.(We can't do it easily now,don't mean we can't do it easily in the future.)

    You can call Symbian app. by using this command...

    >>> import java.lang
    >>> java.lang.Runtime.getRuntime().exec("Z:\\System\\Programs\\AppRun.exe D:\\System\\Apps\\HelloWorld\\HelloWorld.app")

    It'll call D:\\System\\Apps\\HelloWorld\\HelloWorld.app

    Jython can read&write file,by using Python syntax.
    Here is some Jython examples,that can run on UIQ.
    http://isiam.blogspot.com/2007/01/jython-examples.html

  5. #50
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Quote Originally Posted by bpitk
    You can call Symbian app. by using this command...

    [...]
    Jython can read&write file,by using Python syntax.
    Does this mean that I could write a multiplatform c++ .exe program and a single Pyhton source which interacts with it, so obtaining a multiplatform application for both s60 and UIQ???

    Here is some Jython examples,that can run on UIQ.
    http://isiam.blogspot.com/2007/01/jython-examples.html
    Thank you very much.

  6. #51
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    66

    Re: Python for UIQ

    Does Jpython work for UIQ 3 ?
    Ottorino Bruni
    [url]http://www.8mobile.org[/url]

  7. #52
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Really interesting sources, bptik! I didn't imagine writing GUIs with Jython was that simple!
    And also reading a file is very easy!
    Now I miss only one thing: how to read/write a file in c++ Any clue/tip/reference? How many hundreds of c++ code lines are needed to read "hello world" from a file and write it back to another file?

    About jython integration with the OS: being jython based on PersonalJava, can it also access JavaPhone API? It allows accessing phone features (contacts, activities,...).

  8. #53
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Quote Originally Posted by spaceman76
    Does Jpython work for UIQ 3 ?
    Only if your device supports PersonalJava.

  9. #54
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    66

    Re: Python for UIQ

    Quote Originally Posted by cassioli
    Only if your device supports PersonalJava.
    Yes i know it, but there is an installer for UIQ 3 ?
    Ottorino Bruni
    [url]http://www.8mobile.org[/url]

  10. #55
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Quote Originally Posted by spaceman76
    Yes i know it, but there is an installer for UIQ 3 ?
    I don't know how to build a .SIS file for UIQ3.
    Anyway, what a .SIS file does can easily be done by hand, on UIQ2. Is it possible to install applications by hand in UIQ3? In UIQ2 I have just to create a folder in \system\apps . I think \system folder is protected in UIQ3 , but maybe you can access it on a memory card connected to a PC?
    If so, try this:

    Download the jython ZIP file.
    Unpack the .SIS file (for example with SISRead)
    Copy Jython (or Python? can't rememeber...) folder to your memory card
    Create \system\apps\JythonQ folder on the memory card
    Copy app, aif and txt file into the folder .
    Restarting the phone with the card inserted should result in JythonQ installed & working.
    Last edited by cassioli; 2007-01-23 at 11:13.

  11. #56
    Registered User
    Join Date
    Jan 2007
    Posts
    2

    Re: Python for UIQ

    can you help me our and tell me which API are supported on P990i UIQ3?

    how can i install s60 Python on P990i, since it has most of the API supported?

  12. #57
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Quote Originally Posted by c4
    can you help me our and tell me which API are supported on P990i UIQ3?

    how can i install s60 Python on P990i, since it has most of the API supported?
    Python for s60 is NOT compatible with p990! But maybe Jython is: do you know if p990i supports PersonalJava? It's all you need for jython to work.

  13. #58
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Python for UIQ

    Ok, I see that p990i should be back-compatible with PJ 1.1, as it implements CDC PersonalProfile.

    To start Jython (once you copied jython folder to d: on your phone), you probably need a .j9 file.
    I THINK it should just contain this line:
    -cp d:\jython -Dpython.home=d:\jython org.python.util.jython d:\jython\awtcons.py

    Maybe you can launch such a file just by clicking on it from a file manager?

  14. #59
    Registered User
    Join Date
    Jan 2007
    Posts
    2

    Re: Python for UIQ

    thanks man,

    2 things

    1. do you mean i have to create a .j9 file with the above command and run it?
    i'm at work now i'll get to do this once i'm home

    2. about the APIs? how do i get a list of them, if you see s60 python

    http://www.mobilenin.com/pys60/side/comano.php

    they have APIs for almost every thing in the phone.

  15. #60
    Registered User
    Join Date
    Jul 2005
    Posts
    33

    Re: Python for UIQ

    Quote Originally Posted by cassioli
    Now I miss only one thing: how to read/write a file in c++ Any clue/tip/reference? How many hundreds of c++ code lines are needed to read "hello world" from a file and write it back to another file?
    Here is how write&read "hello world" from a file and write it back to another file with Jython on UIQ ...

    >>> f=open("C:\\f.txt",'w')
    >>> f.write("hello world")
    >>> f.close()

    Now check in your C:\ (of UIQ),You will see file f.txt contained "hello world".
    Then,read "hello world" from a file and write it back to another file(+add something).

    >>> f=open("C:\\f.txt",'r')
    >>> tx=f.read()
    >>> f.close()
    >>> result=open("C:\\result.txt",'w')
    >>> result.write(tx+",something")
    >>> result.close()

    Now check in your C:\ (of UIQ),You will see file result.txt contained "hello world,something".
    And you can use the same code on any Python on any Platform.
    No need extra C++ code.

    I think that we can use Jython on UIQ (now) to do GUI-programing,read&write file,text processing(try "re" module,it's amazing),and it's a good tool for learning Python syntax(anytime,anywhere).

    Limitation of Jython is : It depend on PersonalJava.
    How hard to use Java get Symbian resource (Contact database,SMS,ect.)?
    You can do that by using extra C++ code and JNI(and so,Jython need JNI to do that too).
    Except some smartphone that support JavaPhone(but not my p910i,you can check your phone spec.for JavaPhone support).

    (In the future,if we can write JNI/C++ more enough,it may not be that hard,anymore...)
    Last edited by bpitk; 2007-01-24 at 06:36.

Similar Threads

  1. Please help installing Python libraries on S60
    By ericroijen in forum Symbian
    Replies: 11
    Last Post: 2009-07-18, 10:43
  2. Python for Series 60 released on Forum Nokia!
    By eriksmartt in forum Symbian
    Replies: 5
    Last Post: 2009-07-14, 17:00
  3. Python 2.2? 2.3?
    By mflux in forum Symbian
    Replies: 3
    Last Post: 2006-06-26, 22:36
  4. Python C++ Extension with Callback crashing
    By diggerdeep in forum Symbian
    Replies: 2
    Last Post: 2005-11-10, 16:33
  5. Replies: 0
    Last Post: 2004-07-18, 00:56

Posting Permissions

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