View Single Post
Posts: 49 | Thanked: 8 times | Joined on Oct 2013
#1037
I have another problem.
I like icons on the standby screen. I have the bluetooth status icon and and the power save icon showing. The python scripts are working in that they show the icons, but on different lines. I would like them to be on the same line. Here is the Billboard script I use:

{script: python /home/user/Billboard/Bluetoothi.py}{script: python /home/user/Billboard/PSMi.py}

Here is the python script for the bluetooti.ph:

# Print bluetooth status icon off/disconnected/connected
# Show the correct icon for connected or disconnected states.
# No icon is shown when BT is off.
# When BT is off the word 'off' is shown.
#
# Author: Slarti
# Source: http://talk.maemo.org/showpost.php?p...&postcount=444

import dbus

bus = dbus.SystemBus()

bluez = bus.get_object('org.bluez', '/')
adapter_path = bluez.ListAdapters(dbus_interface='org.bluez.Manag er')[0]
adapter = bus.get_object('org.bluez', adapter_path)
powered = adapter.GetProperties(dbus_interface='org.bluez.Ad apter')['Powered']
btstatus = bus.get_object('com.nokia.policy.pcfd', '/com/nokia/policy/bluetooth_override')
connected = btstatus.Get(dbus_interface='org.maemo.contextkit. Property')[0]

if powered:
if 'default' in connected:
print '<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth-active.png>>',
else:
print '<</usr/share/themes/blanco/meegotouch/icons/icon-s-status-bluetooth.png>>',
else:
print '<</home/user/Billboard/icon-s-status-bluetooth-off.png>>',

I looked on the internet, and found that a comma at the end of the print line should prevent a line feed. I have found it not working and I still get a line feed or carriage return.
How do I place these icons from these 2 python scripts on the same line?
Thanks