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())
#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()
def test_os_version(self): self._test_util("os_version", sysinfo.os_version())
# 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. import pynewfile import sysinfo # The UID to use depends on S60 version. There are at least two # different Camera UIDs. osv = sysinfo.os_version() if osv == (2,0,1528): # N95 uid = 0x101ffa86 if osv == (2,0,1177): # E71 uid = 0x101ffa86 elif osv == (2,0,1071): # E61 or E61i uid = 0x101f857a # but E61 has no camera else: raise "do not know what UID to use on this phone" print repr(pynewfile.take_photo(uid))
import sysinfo print repr(sysinfo.os_version())
# 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. import pynewfile import sysinfo # The UID to use depends on S60 version. There are at least two # different Camera UIDs. osv = sysinfo.os_version() if osv == (2, 0, 1528): # N95 uid = 0x101ffa86 if osv == (2, 0, 1177): # E71 uid = 0x101ffa86 elif osv == (2, 0, 1071): # E61 or E61i uid = 0x101f857a # but E61 has no camera else: raise "do not know what UID to use on this phone" print repr(pynewfile.take_photo(uid))
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # 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: "
sys.stdout.write("Signal strength: %s\n" % sysinfo.signal_bars()) 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())