Page 142 of 142 FirstFirst ... 42 92 132137138139140141142
Results 2,821 to 2,829 of 2829
Like Tree737Likes
  1. #2821  
    quite easy actually

    Python for webos (again found by chance)

    there are 2 python premade packages. The 2nd is 2.6.5
    Nafetz likes this.
  2. #2822  
    Quote Originally Posted by mazzinia View Post
    quite easy actually
    Not for me, it seems.
    I couldn't find any source that is describing how to make a "Hello World" python script run on a webOS device.
    I don't know where to move the content of python27-webos to. And how to run a "Hello World" script after that...
    Rnp likes this.
  3. #2823  
    pygame_touchpad ? GPS Navigace

    this can help , to get an idea how it works. Basically you either extract those into the system directly, or wherever you want + running a launcher similar to the example.
    Once the paths are set ( for python ), a program is launched by

    python + program.py
    Rnp and Nafetz like this.
  4. #2824  
    And...

    https://web.archive.org/web/20150406...io/2011/webos/

    this is especially important, if someone wants a newer version of python etc
    Rnp and Nafetz like this.
  5. #2825  
    Still too hard for me
    There are a lot of steps in your suggested sites that I don't understand at all. But I found one sentence I did understand:
    In order to use Python on webOS, make sure to have your device switched to developer mode, then extract both the Python tarball and the pygame tarball onto /media/internal (the USB Mass Storage device) or somewhere else (make sure to extract pygame into Python's site-packages folder).
    That's what I did. I created a folder .python in /media/internal and put the python tarball in it. The I opened /media/internal/.python/lib/python2.7/site-packages and put the pygame tarball in it. But what is next?
    In both of your suggested sites the demo program suddenly is running...
    What do I have to do, to check if anything is running? Using wTerm?
    I tried to run in wTerm
    Code:
    sh stars.py
    in /media/internal/.python/lib/python2.7/site-packages/pygames/examples/ which resulted into several errors like
    stars.py: line 9: import not found
    Ok, saw your suggestion
    Quote Originally Posted by mazzinia View Post
    python + program.py
    returns
    can't open python
    Maybe I'm in the wrong folder?
    Last edited by Nafetz; 10/26/2016 at 03:55 PM.
  6. #2826  
    The key lies here
    pygame_touchpad ? GPS Navigace
    in the section called "the startup script". Basically webos (unix/linux) looks for commands and libraries in specific places that are set when the phone boots... this means that if you unpack the python archive in "those" places, it works without tweaks.
    But to keep the filesystem more clean, it's suggested to unpack the archive in a "private" location ( as you did ). This means that webos doesn't know where to look for the commands and libraries that python has, until you tell him where to look for them. That startup script is an example showing how to tell webos to look for those things , in order to execute then a program.

    it's simpler, for your tests, if you use http://www.modrana.org/misc/pygame_bundle.zip this package, since it has all premade ( you can rename pygame_test as you like )
    Nafetz likes this.
  7. #2827  
    Got it now, thank you very much!
    I'm getting a
    pygame.error: No available video device
    at the moment. This is maybe because I'm using a Pre 3 instead of a Touchpad.

    But I don't know if it makes sense to continue at the moment. It might be much better to get some basic understandings of python first. At the moment I'm not able to run any example python script without getting errors I don't understand...
    Rnp likes this.
  8. #2828  
    That "no available video device" is caused by the command window used .
    If you use xterm , all works
    if you use wterm... not sure if it's due to some configurations needed, or because python uses X
    Rnp and Nafetz like this.
  9. #2829  
    Sounds good, but I can't confirm it. For me it's impossible to read any message on the screen of XTerm with my Pre 3. There insn't a way to increase the font-size?

Tags for this Thread

Posting Permissions