It looks like uitest.py and helloworld.py are being interpreted as bash scripts. You shoud put '#!/var/lib/install/usr/bin/python2.4' or the location of your python binary as the first line in the file so that the shell knows how to appropriately interpret the python script. Alternatively ' run-standalone.sh python2.4 uitest.py' might work (I don't have anything infront of me to test that though)

-August

On 5/9/06, Christine Liu < [EMAIL PROTECTED]> wrote:
hi all -

i'm following teemu's tutorial on python on the 770, part 1:
http://www.teemuharju.net/2006/01/26/coding-for-nokia-770-using-python-part-1/

so i'm running into issues with either run-standalone.sh + importing gtk and hildon packages. i installed pymaemo in normal matter and i am ssh'ing into my 770 through x11 on mac os x.

i saved the sample code as uitest.py in /home/users.

i typed
Nokia770-13:/home/user# run-standalone.sh ./uitest.py
./uitest.py: 1: import: not found
./uitest.py: 2: import: not found
./uitest.py: 4: class: not found
./uitest.py: 6: Syntax error: "(" unexpected

i made a helloworld.py (print "hello world") and did
Nokia770-13:/home/user# run-standalone.sh ./helloworld.py
./helloworld.py: 1: print: not found

strange - just following teemu's lead. so i'm not sure exactly how to use this run-standalone script.

but if i run python directly, this works:
Nokia770-13:/home/user# python2.4 helloworld.py
hello world

anyway - *here's the main question* and most confusing. i go to python interactive environment...
Nokia770-13:/home/user# python2.4          
Python 2.4.2 (#2, Jan 16 2006, 15:07:04)
[GCC 3.3.4 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/ruda/pymaemo2/pool/main/p/python-gtk2/python-gtk2-2.6.1/debian/tmp/usr/lib/python2.4/site-packages/gtk- 2.0/gtk/__init__.py", line 37, in ?
RuntimeError: could not open display
>>> import hildon
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: could not import gtk._gtk

how do i best remedy this? shouldnt these modules be included in pymaemo? i'm not familiar with how to deal with these kinds of errors. thanks much for your help.

christine

_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers



_______________________________________________
maemo-developers mailing list
[email protected]
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to