Telefon Bilgileri için Yaptığım Bir Modül CTooL v1.3 de Kullanılıyor (Daha Doğrusu Kullanılacak
kodları csys.py olarak kaydedin sonra \libs klasörüne atın.
# Yazın ve Kullanım Biliglerini Görün.
PHP- Kodu:
# Module Name : CSYS (Included Module Api)
# Author: Mehmet Hanoğlu
# Copyright : wWw.PyThoN-S60.CoM
# License : GNU License
# Date : 13.10.09 Tuesday
__all__ = ["-= READ : All functions can use as text! (Instead of Text) =-","csys.Bilgi('Profil') + en,tr,ru,vi | Ex : csys.Bilgi('Profiltr')","csys.Bilgi('CPUSpeed')","csys.Ram('Toplam')","csys.Ram('Kullanilan')","csys.Tel('Imei')","csys.Tel('Model')","csys.Tel('GSM')","csys.Tel('Tip')","csys.Bilgi('EkranBoyutu')","csys.Bilgi('PyVersion')","csys.Bilgi('S60Version')"]
def Api():
return __all__
import sysinfo as sy,miso,e32
def u(x):return x.decode("u8","replace")
total_r = sy.total_ram()
free_r = sy.free_ram()
using_r = total_r-free_r
profile = sy.active_profile()
dsizes = sy.free_drivespace()
version = sy.sw_version()
imei = sy.imei()
screen = str(sy.display_pixels())
cpuhead = miso.get_hal_attr(11)
drivers = e32.drive_list()
pyvers = e32.pys60_version
syvinfo = e32.s60_version_info
s_list = version.split(' ')
s_vers = version.split(' ')[1]
s_date = version.split(' ')[2]
s_firm = version.split(' ')[3]
mapping_firmware_model = {'RM-51': '3230', 'RM-38': '3250','NHM-10': '3600','NHM-10X': '3620','NHL-8': '3650','RM-133': 'N73-1 (SoftBank 705NK)','NHL-8X': '3660','RM-25': '6260','RM-29': '6260b','NHL-10': '6600','NHL-12': '6620','NHL-12X': '6620','RM-1': '6630','RH-67': '6670','RH-68': '6670b','RM-36': '6680','RM-57': '6681','RM-58': '6682','RH-51': '7610','RH-52': '7610b','NHL-2NA': '7650','RM-49': 'E60-1','RM-89': 'E61-1','RM-10': 'E70-1','RM-24': 'E70-?','NEM-4': 'N-Gage','RH-29': 'N-Gage QD (asia/europe)','RH-47': 'N-Gage QD (americas)','RM-84': 'N70-1','RM-99': 'N70-5','RM-67': 'N71-1','RM-112': 'N71-5','RM-91': 'N80-3','RM-92': 'N80-1','RM-42': 'N90-1','RM-43': 'N91-1','RM-158': 'N91-5' }
mapping_prefix_description = {'N':'Mobile Phone','R':'Computing Device','T':'Terminal'}
mapping_suffix_description = {'B': 'GSM 900/1900','C': 'DAMPS 800','D': 'CDMA/AMPS 800','E': 'GSM 900/1800','F': 'NMT-450','K': 'GSM 1800','L': 'GSM 900/1800/1900 or GSM 850/1800/1900','M': 'EGSM 900/1800 (may include WCDMA)','N': 'IEEE 802.11b','P': 'CDMA 800','W': 'AMPS/TDMA 800/1900','X': 'ETACS/TACS'}
profile_name_tr = {'general':u('Genel'),'silen':u('Sessiz'),'meeting':u('Toplantı'),'outdoor':u('Dış Mekan'),'pager':u('Çağrı'),'offline':u('Hatsız'),'drive':u('Sürüş Modu')}
profile_name_en = {'general':u('General'),'silen':u('Silent'),'meeting':u('Meeting'),'outdoor':u('Outdoor'),'pager':u('Pager'),'offline':u('Offline'),'drive':u('Drive')}
# Not Translated
profile_name_ru = {'general':u('Genel'),'silen':u('Sessiz'),'meeting':u('Toplantı'),'outdoor':u('Dış Mekan'),'pager':u('Çağrı'),'offline':u('Hatsız'),'drive':u('Sürüş Modu')}
profile_name_vi = {'general':u('Genel'),'silen':u('Sessiz'),'meeting':u('Toplantı'),'outdoor':u('Dış Mekan'),'pager':u('Çağrı'),'offline':u('Hatsız'),'drive':u('Sürüş Modu')}
# Not Translated
sdk_name = {(1, 2):'SDK S60 1st Edition',(2, 0):'SDK S60 2nd',(2, 6):'SDK S60 2nd Edition Feature Pack 2',(2, 8):'SDK S60 2nd Edition Feature Pack 3',(3, 0):'SDK S60 3rd Edition'}
firmcode = s_firm.split('-')
firmware_prefix = firmcode[0][0]
firmware_suffix = firmcode[0][-1]
firmware_date = s_date
phone_name = mapping_firmware_model[s_firm]
prefix_name = mapping_prefix_description[firmware_prefix]
suffix_name = mapping_suffix_description[firmware_suffix]
def inx(type,value):
if type == 'byte' :return '%.1f'%(float(value))+u(' '+type)
elif type == 'kb' :return '%.1f'%(float(value)/1024)+u(' '+type)
elif type == 'mb' :return '%.1f'%(float(value)/1048576)+u(' '+type)
elif type == 'hz' :return '%.1f'%(float(value))+u(' '+type)
elif type == 'mhz' :return '%.1f'%(float(value)/1000)+u(' '+type)
else:pass
def Ram(type):
global free_r,total_r,using_r
if type == 'Bos' :return inx('mb',free_r)
elif type == 'Toplam' :return inx('mb',total_r)
elif type == 'Kullanilan' :return inx('mb',using_r)
else:pass
def Bilgi(type):
global cpuhead,screen,profile,syvinfo,pyvers
if type == 'Profil' :return profile_name_en[profile]
elif type == 'Profiltr' :return profile_name_tr[profile]
elif type == 'Profilen' :return profile_name_en[profile]
elif type == 'Profilru' :return profile_name_ru[profile]
elif type == 'Profilvi' :return profile_name_vi[profile]
elif type == 'PyVersion' :return pyvers
elif type == 'S60Version' :return sdk_name[syvinfo]
elif type == 'CPUSpeed' :return inx('mhz',cpuhead)
elif type == 'EkranBoyutu' :
cord = screen[1:9]
cordinat = cord.split(',')
return cordinat[0] + ' x ' + cordinat[1]
else:pass
def Tel(type):
global phone_name,firmware_date,prefix_name,suffix_name,imei
if type == 'Model' :return phone_name
elif type == 'Imei' :return imei
elif type == 'GSM' :return suffix_name
elif type == 'Tip' :return prefix_name
elif type == 'Tarih' :return firmware_date
else:pass