Reply
Thread Tools
frethop's Avatar
Posts: 283 | Thanked: 60 times | Joined on Nov 2005 @ It's dark in here. I hear laughing.
#1
I'm writing a desktop applet in Python.

Debugging this thing is incredibly hard. I can't do it in Scratchbox,
because the hildon desktop bindings are not compiled for it. Editing
is then done on the device. I thought this would be OK and that the
cycle of unselecting/code change/selecting the applet would run the new
code changes. But...the system seems to cache the code so that the
unselect/select always invokes the same code. And who knows where
even the simple print or logging statements go...

Does anyone have any suggestions for easier debugging of Python desktop
applets. This is my first project in Python (I know...hard project for
the first time :-) so I'm open to anything.

THanks.
 
Posts: 35 | Thanked: 5 times | Joined on Sep 2007
#2
You mean the home-plugins? Try pyphantom IDE. It can be found on garage.maemo.org

I used it for my UI part. It works quite well for normal pygtk development.

Although in the end I ditched the gtk UI almost completely and did the whole UI with cairo graphics library. Also I edited the UI with vi editor on the device, lol.

Separate the UI from other parts of the application. That should help at least in the beginning because you only have to worry about the UI code. It's not that hard. See the thread about shaped widgets here on developers forum. Read some code there and you'll get the idea. Good luck.
 

The Following 2 Users Say Thank You to icer For This Useful Post:
frethop's Avatar
Posts: 283 | Thanked: 60 times | Joined on Nov 2005 @ It's dark in here. I hear laughing.
#3
Yes. I'm writing a home applet.

Thanks for the tip. Unfortunately, pyphantom does not work for me. On all systems I tried -- several Linux boxes and even the Windows installation -- the pyphantom-preview just hangs. It's running, but I get no messages, no preview window, nothing!

On another test I did with a small applet, I got a window with the applet. Even in that test, there was no status bar or icon bar on the side.

So, pyphantom looks buggy. I'm stuck with vi on the N810.

icer: Did you do anything special to produce debugging output? Logging? Redirecting standard output? I need something!
 
frethop's Avatar
Posts: 283 | Thanked: 60 times | Joined on Nov 2005 @ It's dark in here. I hear laughing.
#4
Eureka! The actual solution (for me) was to upgrade to the 0.5 version of the VMWare image on garage.maemo.org. You can add the Python/Hildon desktop bindings (I did not know they were out for i386) and now everything works in Scratchbox. Debugging and output printing comes to the xterm window.

Life is good.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:10.