Editing PyMaemo/HildonDesktop
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision |
Your text |
Line 162: |
Line 162: |
| [sbox]> mv /tmp/hello_world_status_menu.desktop /usr/share/applications/hildon-status-menu/ | | [sbox]> mv /tmp/hello_world_status_menu.desktop /usr/share/applications/hildon-status-menu/ |
| </pre> | | </pre> |
- |
| |
- | This method may not work reliably for hildon-home widgets because the old code may not be fully unloaded. A solution is to reload hildon-home using [http://maemo.org/downloads/product/Maemo5/actman/ Desktop Activity Manager]. Once you store the current desktop (e.g. with "activty new test; activity store test") you can re-load it using "activity load -f test". This will reload hildon-home and all its widgets.
| |
- |
| |
- | Another way of debugging python widgets is to add this code at the beginning of the script:
| |
- | <source lang="python">
| |
- | import sys
| |
- | f=open('/tmp/mylog.log', 'at', buffering=1)
| |
- | sys.stdout=f
| |
- | sys.stderr=f
| |
- | </source>
| |
- |
| |
- | This will redirect stdout and stderr to <code>/tmp/mylog.log</code>. This means that all exceptions and all other output will be logged there. As a plus, the code can be given to testers and they will be able to report-back with the contents of the logfile.
| |
- |
| |
- | However, '''do not''' use this by default in production systems. Use it '''only''' for debugging since the file will consume space in <code>/tmp</code> and will only grow in size.
| |
| | | |
| [[Category:Python]] | | [[Category:Python]] |
Learn more about Contributing to the wiki.