Esempio n. 1
0
    def sendSysinfo(self,  full):
        self.send(NUM_SYSINFO_REPLY_START)
        self.send(NUM_SYSINFO_REPLY_LINE, "program_version", VERSION)
        self.send(NUM_SYSINFO_REPLY_LINE, "battery", sysinfo.battery())
        self.send(NUM_SYSINFO_REPLY_LINE, "active_profile", sysinfo.active_profile())
        self.send(NUM_SYSINFO_REPLY_LINE, "free_ram", sysinfo.free_ram())
        self.send(NUM_SYSINFO_REPLY_LINE, "pys60_version", e32.pys60_version)

        if sysinfo.active_profile() == u"offline":
            # Return an error code if the phone is in offline mode
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", -1)
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", -1)
        else:
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", sysinfo.signal_dbm())
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", sysinfo.signal_bars())

        for drive,  free in sysinfo.free_drivespace().iteritems():
            self.send(NUM_SYSINFO_REPLY_LINE, "free_drivespace", str(drive) + str(free))

        if full:
            self.send(NUM_SYSINFO_REPLY_LINE, "display", str(sysinfo.display_pixels()[0]) + "x" + str(sysinfo.display_pixels()[1]))
            self.send(NUM_SYSINFO_REPLY_LINE, "imei", sysinfo.imei())
            self.send(NUM_SYSINFO_REPLY_LINE, "model", sysinfo.sw_version())
            self.send(NUM_SYSINFO_REPLY_LINE, "s60_version", e32.s60_version_info[0],  e32.s60_version_info[1] )
            self.send(NUM_SYSINFO_REPLY_LINE, "total_ram", sysinfo.total_ram())
            self.send(NUM_SYSINFO_REPLY_LINE, "total_rom", sysinfo.total_rom())

        self.send(NUM_SYSINFO_REPLY_END)
Esempio n. 2
0
    def show_ram_usage(self):
        x1 = 0
        y1 = 0
        x2 = x1 + 130
        y2 = y1 + 15
        x3 = x1 + 1
        y3 = y1 + 12
        conv = 1024.0

        txt = u"RAM: %.2f / %.2f MB" % ((free_ram() / conv / conv),
                                        (total_ram() / conv / conv))

        self.buffer.rectangle((x1, y1, x2, y2), fill=WHITE)
        self.buffer.text((x3, y3), txt, fill=BLACK)
Esempio n. 3
0
def Info():
    #print 'Device Time: ' + sysinfo.active_profile()
    print 'Active Profile: '.ljust(24) + sysinfo.active_profile()
    print 'Software Version: '.ljust(24) + str(sysinfo.sw_version())
    print 'OS Version: '.ljust(24) + str(sysinfo.os_version())
    print 'Battery: '.ljust(24) + str(sysinfo.battery()) + '%'
    print 'Display Resolution: '.ljust(24) + str(
        sysinfo.display_pixels()[0]) + 'x' + str(sysinfo.display_pixels()[1])
    print 'IMEI: '.ljust(24) + sysinfo.imei()
    #print 'RAM Drive Size: ' + str(sysinfo.max_ramdrive_size())
    print 'RAM Size(total/free): '.ljust(24) + str(sysinfo.total_ram()) + str(
        sysinfo.free_ram())
    print 'ROM Size: '.ljust(24) + str(sysinfo.total_rom())
    print 'Free Drive Space: '.ljust(24) + str(sysinfo.free_drivespace())
    print 'Signal Strength:'.ljust(24) + str(sysinfo.signal_bars())
Esempio n. 4
0
    def sendSysinfo(self, full):
        self.send(NUM_SYSINFO_REPLY_START)
        self.send(NUM_SYSINFO_REPLY_LINE, "program_version", VERSION)
        self.send(NUM_SYSINFO_REPLY_LINE, "battery", sysinfo.battery())
        self.send(NUM_SYSINFO_REPLY_LINE, "active_profile",
                  sysinfo.active_profile())
        self.send(NUM_SYSINFO_REPLY_LINE, "free_ram", sysinfo.free_ram())
        self.send(NUM_SYSINFO_REPLY_LINE, "pys60_version", e32.pys60_version)

        if sysinfo.active_profile() == "offline":
            # Return an error code if the phone is in offline mode
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm", -1)
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars", -1)
        else:
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_dbm",
                      sysinfo.signal_dbm())
            self.send(NUM_SYSINFO_REPLY_LINE, "signal_bars",
                      sysinfo.signal_bars())

        for drive, free in sysinfo.free_drivespace().items():
            self.send(NUM_SYSINFO_REPLY_LINE, "free_drivespace",
                      str(drive) + str(free))

        if full:
            self.send(
                NUM_SYSINFO_REPLY_LINE,
                "display",
                str(sysinfo.display_pixels()[0]) + "x" +
                str(sysinfo.display_pixels()[1]),
            )
            self.send(NUM_SYSINFO_REPLY_LINE, "imei", sysinfo.imei())
            self.send(NUM_SYSINFO_REPLY_LINE, "model", sysinfo.sw_version())
            self.send(
                NUM_SYSINFO_REPLY_LINE,
                "s60_version",
                e32.s60_version_info[0],
                e32.s60_version_info[1],
            )
            self.send(NUM_SYSINFO_REPLY_LINE, "total_ram", sysinfo.total_ram())
            self.send(NUM_SYSINFO_REPLY_LINE, "total_rom", sysinfo.total_rom())

        self.send(NUM_SYSINFO_REPLY_END)
def mem():
    r = sysinfo.total_ram()
    r1 = str(r)
    r2 = int(r1)
    r3 = (r2 / 1024000)
    ro = sysinfo.total_rom()
    ro1 = str(ro)
    ro2 = int(ro1)
    ro3 = (ro2 / 1024000)
    fr = sysinfo.free_ram()
    f = str(fr)
    fre = int(f)
    fo = (fre / 1024)
    dr = sysinfo.free_drivespace()
    osama.add(((itq('\n\t...................\nTotal ram is :\n') + str(r3)) +
               itq('  MB')))
    osama.add(((itq('\nThe Free ram is :\n') + str(fo)) + itq('  KB')))
    osama.add(((itq('\nTotal ROM size is :\n') + str(ro3)) + itq('  MB')))
    osama.add(
        ((itq('\n_______\n\nDRIVES Disk space in byte is :\n') + str(dr)) +
         itq('  Byte\n\t...................\n')))
Esempio n. 6
0
def app():
    appuifw.app.exit_key_handler = lock.signal
    active_profile = sysinfo.active_profile()
    battery = sysinfo.battery()
    d1, d2 = sysinfo.display_pixels()
    free_ram = sysinfo.free_ram() / float(1024 * 1024)
    total_ram = sysinfo.total_ram() / float(1024 * 1024)
    imei = sysinfo.imei()
    sw_version_list = sysinfo.sw_version().split(' ')
    data_list = [(ru("Active Profile:"), ru(active_profile)),
                 (ru("Battery Percentage:"), ru(battery)),
                 (ru("Free RAM:"),
                  ru(str(free_ram)[:6] + " MB/" + str(total_ram)[:6] + " MB")),
                 (ru("Display:"), ru(str(d1) + " x " + str(d2))),
                 (ru("IMEI:"), imei),
                 (u"Software Version:", sw_version_list[0]),
                 (u"Software Version Date:", sw_version_list[1]),
                 (u"Type", sw_version_list[2])]

    list = appuifw.Listbox(data_list, lambda: None)
    appuifw.app.body = list
    appuifw.app.menu = [(u"Refresh Info", app), (u"About", about)]
Esempio n. 7
0
 def test_total_ram(self):
     self._test_util("total_ram", sysinfo.total_ram())
Esempio n. 8
0
import sysinfo


str =  "Active Profile: "+ sysinfo.active_profile()
str += "\nBattery Info: "+ sysinfo.battery()    #battery information in symbian 
str += "\nDisplay Info: "+ sysinfo.display_pixels()
str += "\nFree Space: "   + sysinfo.free_drivespace()
str += "\nRAM(F/T): " + str(sysinfo.free_ram()/(1024.0*1024.0)) +"/"+ str(sysinfo.total_ram()/(1024.0*1024.0))
str += "\nIMEI: "+ sysinfo.imei()

Esempio n. 9
0
#sysinfo是与系统信息有关的模块


def cn(x):
    return x.decode("utf8")


appuifw.app.body = t = appuifw.Text()
t.focus = False
appuifw.app.screen = "full"

t.add(cn("情景模式:") + sysinfo.active_profile())  #查看当前情景模式
t.add(cn("\n电量:") + unicode(sysinfo.battery()))  #查看当前电量
t.add(cn("\n屏幕分辨率:") + unicode(sysinfo.display_pixels()))  #查看屏幕分辨率
t.add(cn("\n剩余空间:\n"))
i = 0
drive = [u"C:", u"D:", u"E:"]
while i < len(drive):  #循环语句
    t.add(drive[i] + unicode(sysinfo.free_drivespace()[drive[i]] / 1024) +
          u"kb\n")  #查看C,D,E盘剩余空间
    i += 1
t.add(cn("剩余运存:") + unicode(sysinfo.free_ram() / 1024) + u"kb")  #查看剩余运存
t.add(cn("\nIMEI:") + unicode(sysinfo.imei()))  #查看手机串号
t.add(cn("\n系统版本:") + unicode(sysinfo.os_version()))  #查看系统版本信息
t.add(cn("\n响铃方式:") + unicode(sysinfo.ring_type()))  #查看响铃方式
t.add(cn("\n手机版本:") + unicode(sysinfo.sw_version()))  #查看手机版本
t.add(cn("\n缓存总大小:") + unicode(sysinfo.total_ram() / 1024) + u"kb")  #查看剩余缓存
t.add(cn("\nZ盘总大小:") + unicode(sysinfo.total_rom() / 1024) + u"kb")  #查看Z盘总大小

e32.Ao_lock().wait()
Esempio n. 10
0
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from miso import *

print str(num_alloc_heap_cells())
print str(num_free_heap_cells())
print str(alloc_heap_cells_size())
print str(heap_biggest_avail())
print str(heap_total_avail())

from sysinfo import total_ram, free_ram

print "sysinfo:"
print str(total_ram())
print str(free_ram())
Esempio n. 11
0
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from miso import *

print str(num_alloc_heap_cells())
print str(num_free_heap_cells())
print str(alloc_heap_cells_size())
print str(heap_biggest_avail())
print str(heap_total_avail())

from sysinfo import total_ram, free_ram

print "sysinfo:"
print str(total_ram())
print str(free_ram())
Esempio n. 12
0
# limitations under the License.

import sysinfo

print "OS: "
print sysinfo.os_version()
print "SW: "
print sysinfo.sw_version()
print "IMEI: "
print sysinfo.imei()
print "Bat: "
print sysinfo.battery()
print "Net: "
print sysinfo.signal()
print "Ram: "
print sysinfo.total_ram()
print "Rom: "
print sysinfo.total_rom()
print "MaxRamDrive: "
print sysinfo.max_ramdrive_size()
print "Twips: "
print sysinfo.display_twips()
print "Pixels: "
print sysinfo.display_pixels()
print "RamFree: "
print sysinfo.free_ram()
print "DriveSpace: "
print sysinfo.free_drivespace()
print "RingType: "
print sysinfo.ring_type()
Esempio n. 13
0
 def devInfo(self):
     all=[(u'IMEI', sysinfo.imei()), (u'Total RAM', str(sysinfo.total_ram()/1024)+'KByte(s)'), (u'Free RAM', str(sysinfo.free_ram()/1024)+'KByte(s)'), (u'Battery', str(sysinfo.battery()*100/7)+u'%')]
     info='\n'.join(['%s: %s' %(k, v) for k, v in all])
     e32.ao_yield()
     return infopopup(info, u'Phone Info', OKREmpty)
Esempio n. 14
0
 
sys.stdout.write("Network signal strength in dBm: %s\n" % sysinfo.signal_dbm())
 
sys.stdout.write("SW version: %s\n" % sysinfo.sw_version())
 
sys.stdout.write("Display size:\n")
print(sysinfo.display_pixels())
 
sys.stdout.write("Current profile: %s\n" % sysinfo.active_profile())
 
sys.stdout.write("Ringing type: %s\n" % sysinfo.ring_type())
 
sys.stdout.write("OS version:\n")
print(sysinfo.os_version())

sys.stdout.write("Free/total RAM (MB): %.2f / %.2f\n" % (sysinfo.free_ram()/1024/1024,sysinfo.total_ram()/1024/1024))
 
sys.stdout.write("Total ROM (MB): %.2f \n" % (sysinfo.total_rom()/1024/1024))
 
sys.stdout.write("Free disk space C/E (MB): %.2f / %.2f\n" % (sysinfo.free_drivespace()['C:']/1024/1024,sysinfo.free_drivespace()['E:']/1024/1024))

sys.stdout.write("Python version: %s (%s, %s)\n" % (e32.pys60_version,e32.pys60_version_info[0],e32.pys60_version_info[1]))
 
sys.stdout.write("Symbian version: (%s, %s)\n" % (e32.s60_version_info[0],e32.s60_version_info[1]))
 
sys.stdout.write("Available drives: \n")
print(e32.drive_list())
 
sys.stdout.write("Inactivity time: %s\n" % e32.inactivity())
 
sys.stdout.write("Platf. sec. capabilities: \n")