Reply
Thread Tools
Posts: 122 | Thanked: 73 times | Joined on Jan 2010 @ Turku, Finland
#1
I've got the software development environment setup with scratchbox and all, but I wonder, how can I run Python (.py) files inside the n900 emulator(?)?

I've tried using PyGTKEditor and clicked the run button, but all I see is a notification saying "launching [file name]", which then disappears and nothing happens after that.

Have also tried to click the .py file in the file manager, but it asks what program to use and none of the suggestions seem right.

I'm not having X Terminal (or any other terminal for that matter) in the SDK environment and can't start the .py file from that.

I believe I might be missing some package to run Python files...? Anyway, help would be greatly appreciated!
 
Posts: 87 | Thanked: 26 times | Joined on Oct 2009
#2
write in terminal "python your_file.py"

and you can get xterminal in sdk too, I have it.

open terminal in linux,
1. run "/scratchbox/login"
2. now inside scratchbox run "fakeroot apt-get install osso-xterm"
3. now run "logout" and then run your sdk again and you should have xterm

Last edited by nux; 2010-01-10 at 19:17.
 

The Following User Says Thank You to nux For This Useful Post:
EIPI's Avatar
Posts: 794 | Thanked: 784 times | Joined on Sep 2007 @ /Canada/Ontario/GTA
#3
I am embarking on a widget development, but I am not well versed in the SDK, and C or Python. I therefore humbly ask for some assistance in getting beyond a "hello world" app using pymaemo.

I have installed the Maemo 5 SDK, and have run the hello world app from the pymaemo quick start guide. That worked.

I then downloaded the python code for "touchsearch", and entered the following within scratchbox:

Code:
python2.5 touchsearch.py
This gave back the following error:

Code:
Traceback (most recent call last):
  File "touchsearch.py", line 21, in <module>
    import hildondesktop
ImportError: No module named hildondesktop
Any suggestions on what I could do to get the touchsearch app running within the SDK? Many thanks.
__________________
Mobile Tablets Blog
Follow me on
Twitter

 
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#4
install with apt-get install touchsearch

Then start desktop environment as instructed in SDK install document

Add widget to desktop as you would do with device. Desktop widgets are plugins to hildon-home and they cannot be run "standalone"
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#5
You could also get the source of one of my simple widgets, such as sleeper or recaller. The first line in their sourcecode describes how to launch them manually. Sleepr is only a hundred lines or so.
TouchSearch might be a too large bite to begin with :-) Brent has added so many cool things (that I now greatly profit from when trying to extend my widgets :-)
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following User Says Thank You to twaelti For This Useful Post:
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#6
I don't have the sdk here now but I think
apt-get install python-hildondesktop python-hildon
should help.

And you can run it standalone just fine since it has the main at the bottom.
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.
 

The Following User Says Thank You to mece For This Useful Post:
EIPI's Avatar
Posts: 794 | Thanked: 784 times | Joined on Sep 2007 @ /Canada/Ontario/GTA
#7
Thank you for the responses.

@mece - I was missing those two packages. Thanks.

@twaelti - Yes, touchsearch is a little more complicated than I need (for now). I will also look at those two widgets you developed. Thank you

I ran touchsearch.py standalone, and was able to 'add widget' from the desktop of the SDK. However, it did not actually show up on the desktop. I think the icon is missing, since I was still able to access the preferences of touchsearch via the 'spanner'.
__________________
Mobile Tablets Blog
Follow me on
Twitter


Last edited by EIPI; 2010-01-27 at 12:48.
 
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#8
Originally Posted by EIPI View Post
Thank you for the responses.

@mece - I was missing those two packages. Thanks.

@twaelti - Yes, touchsearch is a little more complicated than I need (for now). I will also look at those two widgets you developed. Thank you

I ran touchsearch.py standalone, and was able to 'add widget' from the desktop of the SDK. However, it did not actually show up on the desktop. I think the icon is missing, since I was still able to access the preferences of touchsearch via the 'spanner'.
When you install it properly from a deb file, it will copy the image files to their correct locations. since you simply ran the code, no image files were copied. Hence, no images.
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.
 

The Following User Says Thank You to mece For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:11.