Active Topics

 


Reply
Thread Tools
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#61
you two really are very helpful!
Trying each of them, but onto the next bit

I have a string full of lots of words (for example apt-cache pkgnames)

So my String looks like:
entry1
entry2
entry 3....
entry 200

etc..

Trying to add these to a QT listwidget, but guessing readlines and xreadlines are only for reading files. Is there a python code to read lines within a string? or is it a bit more complicated then that?

Tried with this:

Code:
 for line in j.readlines():
            self.listWidget.addItem(line)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#62
Code:
for line in j.split("\n"):
            self.listWidget.addItem(line)
Maybe?
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following 2 Users Say Thank You to fatalsaint For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#63
Originally Posted by fatalsaint View Post
Code:
for line in j.split("\n"):
            self.listWidget.addItem(line)
Maybe?
Yup worked perfectly

Just ordered a basic python book so i don't need to harrass you both so much

But really enjoying this!!
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#64
Just a quick update on my progress today

anyone want any particular info added?

latest screeny!!
Edit - i need to change maemo version to Firmware - bit confusing at the mo!
Attached Images
 
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -

Last edited by noobmonkey; 2010-02-20 at 16:07.
 

The Following 2 Users Say Thank You to noobmonkey For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#65
Hmmmm running out of ideas on what else to do....

Version 0.3
Battery Status
Accelerometer readout
GPS Position
Firmware version
Roots Free / Used
CPU Information
N900 Hardware board info
System Locale
Front Camera image test


List of enabled repositories
List of disabled repositories
List of installed applications + App info
Run commands, apt-get clean etc...
Phone/Cell information


Green = Working
Red = In Progress

Interested to hear if anyone has any specific other requirements? - will add them to the todo list.

Waiting on liblocation to get some decent pymaemo calls, device.cell_info would be great! (Although could be a long wait?!)

Anyway, would appreciate any feedback or ideas
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -

Last edited by noobmonkey; 2010-02-20 at 19:06.
 

The Following User Says Thank You to noobmonkey For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#66
Originally Posted by noobmonkey View Post
Waiting on liblocation to get some decent pymaemo calls, device.cell_info would be great! (Although could be a long wait?!)
You don't strictly need liblocation for cell information.

Look at the command "dbus-send --system --print-reply --type=method_call
--dest=com.nokia.phone.net /com/nokia/phone/net
Phone.Net.get_registration_status"

The following snippet, from
http://www.bleb.org/software/maemo/telephony-maemo.c, explains the
return values:
DBUS_TYPE_BYTE, &status,
DBUS_TYPE_UINT16, &lac,
DBUS_TYPE_UINT32, &cell_id,
DBUS_TYPE_UINT32, &operator_code,
DBUS_TYPE_UINT32, &country_code,
DBUS_TYPE_BYTE, &network_type,
DBUS_TYPE_BYTE, &supported_services,
DBUS_TYPE_INT32, &net_err,

I don't know dbus-python, but http://repository.maemo.org/extras-d...urce/n/netmon/ could probably help in that regard.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#67
ooo Qwerty you minx!

Will try it out later tonight!!
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#68
well, it definitley works.... can get the readout of signal and cell info! very impressed.

it does throw up an odd error in terminal though. continues to work, so bit confused...

Code:
ERROR:dbus.proxies:Introspect error on :1.17:/com/nokia/phone/net: dbus.exceptions.DBusException: rpc.Error: object /com/nokia/phone/net doesn't have interface org.freedesktop.DBus.Introspectable
ok well i can see the error is thown from a dbus call, but very confused as the call works....
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 

The Following User Says Thank You to noobmonkey For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#69
Well it definitley works... tried a few other calls, can get the imei number through the call:

dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei

But still getting the introspect errors.... (Each call throws up one error)... i'm assuming they get ignored, as if i was not looking at terminal, i would never know there was an error......
(Just wanting to make a nice clean app!)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
evad's Avatar
Posts: 354 | Thanked: 151 times | Joined on Mar 2008 @ London (UK) / Zielona Góra (PL)
#70
Originally Posted by qwerty12 View Post
I don't know dbus-python, but http://repository.maemo.org/extras-d...urce/n/netmon/ could probably help in that regard.
You are my man! This is (almost) exactly what I needed :) Thanks!
__________________
Dawid 'evad' Lorenz * http://dawid.lorenz.co
_______________________________________________
 

The Following 2 Users Say Thank You to evad For This Useful Post:
Reply

Tags
code, health check, n900, python


 
Forum Jump


All times are GMT. The time now is 16:34.