![]() |
2012-06-06
, 13:22
|
Posts: 90 |
Thanked: 35 times |
Joined on Jan 2012
|
#61
|
![]() |
2012-06-07
, 02:15
|
Posts: 90 |
Thanked: 35 times |
Joined on Jan 2012
|
#62
|
![]() |
2012-06-07
, 12:18
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#63
|
Can anyone point me towards some python documentation that might help (or share any existing script)?
import dbus bus = dbus.SystemBus() bluez = bus.get_object('org.bluez', '/') adapter_path = bluez.ListAdapters( dbus_interface='org.bluez.Manager')[0] adapter = bus.get_object('org.bluez', adapter_path) powered = adapter.GetProperties( dbus_interface='org.bluez.Adapter')['Powered'] if powered: print 'Bluetooth on' else: print 'Bluetooth off'
The Following User Says Thank You to thp For This Useful Post: | ||
![]() |
2012-06-07
, 15:38
|
Posts: 55 |
Thanked: 28 times |
Joined on Jan 2010
|
#64
|
Unfortunately my experience with python scripting is only fractionally over nil.
It would be very handy to have an indication whether BT is on or off to help avoid unnecessary battery drain.
Can anyone point me towards some python documentation that might help (or share any existing script)? Google is pointing me to stuff relating more to app development rather than simple scripting..
![]() |
2012-06-07
, 18:14
|
Posts: 1 |
Thanked: 0 times |
Joined on Mar 2012
@ California
|
#65
|
![]() |
2012-06-07
, 18:22
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#66
|
![]() |
2012-06-07
, 18:33
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#67
|
Maybe for date mmddyy mm/dd/yy mm-dd-yy dd-mm-yy
so that the user can specify the format however they want just by using m's d's and y's
Im having a problem tho, I love this app, and I only wish it displayed correctly. I waited for the update, but it didnt fix my problem. Alligned left, it displays starting at the : colon below the clock, and cuts off whatever come off the screen. It moves around following the clock, with the tail cut off. I've already updated the software to 1.0.1.
![]() |
2012-06-07
, 20:34
|
Posts: 90 |
Thanked: 35 times |
Joined on Jan 2012
|
#68
|
Also another solution is, you can install this app 'profileMatic' & set up rules when to turn on or off bluetooth. This will stop bothering about bluetooth status.
Link
http://talk.maemo.org/showthread.php?t=79642
![]() |
2012-06-07
, 21:02
|
Posts: 205 |
Thanked: 159 times |
Joined on Oct 2009
|
#69
|
![]() |
2012-06-07
, 21:32
|
Posts: 90 |
Thanked: 35 times |
Joined on Jan 2012
|
#70
|
That should help:
Code:import dbus bus = dbus.SystemBus() bluez = bus.get_object('org.bluez', '/') adapter_path = bluez.ListAdapters( dbus_interface='org.bluez.Manager')[0] adapter = bus.get_object('org.bluez', adapter_path) powered = adapter.GetProperties( dbus_interface='org.bluez.Adapter')['Powered'] if powered: print 'Bluetooth on' else: print 'Bluetooth off'