Beispiel #1
0
def exit_handle():
    s=globalui.global_popup_menu([u'Fake Info \xbb',u'Hide',u'Visit Author\'s FB Page', u'Help \xbb', u'About', u'Exit'],u'Misc',10)
    if s==0:
        opt=globalui.global_popup_menu([u'Battery',u'Signal',u'Start Charging',u'Stop Charging'],u'Fake Info',10)
        if opt==0:
            try:
                bar=appuifw2.query(u"No. of bars(0-7)","number",7)
                indicators.set_battery(bar)
                if bar==0:
                    globalui.global_note(u'Battery empty.\nRecharge','recharge_battery')
                if bar==1:
                    globalui.global_note(u'Battery low','battery_low')
            except:
                return None
        elif opt==1:
            try:
                bar=appuifw2.query(u"No. of bars(0-7)","number",7)
                indicators.set_signal(bar)
            except:
                return None
        elif opt==2:
            globalui.global_note(u'Charging','charging')
            indicators.start_charging()
        elif opt==3:
            indicators.stop_charging()
            globalui.global_note(u'Unplug charger from power supply to save energy','text')
    elif s==1:
        try:
            appswitch.switch_to_bg(u'Speak')
        except:
            return None
    elif s==2:
        e32.start_exe('Z:\\sys\\bin\\BrowserNG.exe', (' "4 %s"' % 'http://facebook.com/vishalbiswas'))
    elif s==3:
        an = globalui.global_popup_menu([u'General', u'Shortcuts', u'Menu',u'Known Bugs',u'Fake Info'], u'Select Help Conent:')
        if an==0:
            msgquery.infopopup(u"Type any text in the textarea and press speak from options to make me say your phrase. You can use any languages which your phone supports. You can download more languages for Text To Speech from Nokia's Official Website.",u'General',msgquery.OKREmpty)
        if an==1:
            msgquery.infopopup(u'Middle Selection Key: Speak!\nDial Key: Combine Shortcurts\nRight Soft Key: Miscellaneous tools\nCamera Key: Settings\nVolume Up: Read Text from messages\nVolume Down: Save as txt\nCombination Shortcuts:-\nDial: Screenshot\nClear: Clear all\nUp: Page up\nDown: Page down\nLeft: Start of line\nRight: End of line\nVolume Up:Start of Document\nVolume Down: End of Document\nMiddle Selection: Send text as SMS\n1: Cut\n2: Undo\n3: Text Info\n4: Speak Word\n5: Speak selected\n6: TTS Settings\n7: Reset settings\n8: Find text\n9: Replace text\n0: Exit\n*: Download Languages\n#: Go to line\nCamera: Open file',u'Shortcuts',msgquery.OKREmpty)
        if an==2:
            msgquery.infopopup(u'Speak: Speak the text\nEdit: Text related functions like copy, paste, undo, etc\nText: Operations involving the text in the textarea\nGoto: Go to the specific section of the page or navigate through the text\nText Info: Information of the text\nSettings: All the apps\' preferences\nDownload Languages: Download text-to-speech languages from Nokia\'s Official Site',u'Menu',msgquery.OKREmpty)
        if an==3:
            msgquery.infopopup(u'1. Applications closes unexpectedly when selecting path of saving or reading files\n2. Changing highlight style resets the font style\n3. The set values in settings are not shown instantly in the settings listbox\n4. Some fonts\' anti-aliasing settings cannot be changed',u'Known Bugs',msgquery.OKREmpty)
        if an==4:
            msgquery.infopopup(u'All the changes made by this function are purely fake. They are used to just fool others. I have made it as real as possible.\nBattery: Change the number of bars shown in the battery pane\nSignal: Change the number of bars shown in the signal pane\nStart Charging: Simulates battery charging but in reality doesn\'t charges battery\nStop Charging: Stops the simulation of battery as if battery is full',u'Fake Info',msgquery.OKREmpty)
    elif s==4:
        txt=u'Version: '+__version__+'\nMain App: Ensymble\nModded by: vishalbiswas\nE-mail: [email protected]\nUID: '+appuifw2.app.uid().upper()+u'\nPath: '+appuifw2.app.full_name().upper()+u'\nS/W Version: '+sysinfo.sw_version()+u'\nPython Version: '+e32.pys60_version+'\nDetailed Python Version: '+sys.version
        caps='\nCapabilities Granted: '
        if e32.pys60_version_info[0]>=2:
            for i in e32.get_capabilities():
                if i==e32.get_capabilities()[0]:
                    caps+=i
                else:
                    caps+='+'+i
        else:
            caps+=envy.app_capabilities()
        msgquery.infopopup(txt+caps,u'Speak',msgquery.OKREmpty)
    elif s==5:
        quit_ask()
 def test_functionality(self):
     try:
         tuple_of_capas = e32.get_capabilities()
         db = calendar.open()
         print "No of entries is ", len(db)
         print "The time since the user is inactive: ", inactivity()
         if len(information) != 5:
             self.fail("Broken")
         if not len(get_capabilities()):
             self.fail("Broken")
         print "The log of calls are: ", calls()
     except:
         self.fail("Something is broken")
Beispiel #3
0
 def test_get_capabilities(self):
     global tuple_of_capas
     tuple_of_capas = e32.get_capabilities()
     self.failIfEqual(len(tuple_of_capas), 0)
Beispiel #4
0
def init_options_menu():
    appuifw.app.menu = [
        (u"Ejecutar..", lambda: menu_action(query_and_exec)),
        (u"Consola interactiva", lambda: menu_action(exec_interactive)),
        (u"Consola Bluetooth", lambda: menu_action(exec_btconsole)),
        (u"Acerca de..", lambda: menu_action(show_copyright))
    ]

# In case of emu, the path to non-base modules needs to be added
if e32.in_emulator():
    sys.path.append('c:\\resource\\python25\\python25_repo.zip')

script_dirs = [(u'c:', 'c:\\data\\python'), (u'e:', 'e:\\python'),
               (u'e:', 'e:\\data\\python')]

for path in ('c:\\data\\python\\lib', 'e:\\python\\lib'):
    if os.path.exists(path):
        sys.path.append(path)

my_console = series60_console.Console()
set_defaults()
lock = e32.Ao_lock()
appuifw.app.exit_key_handler = lock.signal
print 'Python for S60 Version ' + e32.pys60_version
print 'Capabilities Present:', e32.get_capabilities()
print '\nSelect:'
print '"Options -> Run script" to run a script'
print '"Options -> About" to view copyright\n'
lock.wait()
appuifw.app.set_exit()
def init_options_menu():
    appuifw.app.menu = [
        (u"Run script", lambda: menu_action(query_and_exec)),
        (u"Interactive console", lambda: menu_action(exec_interactive)),
        (u"Bluetooth console", lambda: menu_action(exec_btconsole)),
        (u"About", lambda: menu_action(show_copyright))
    ]


# In case of emu, the path to non-base modules needs to be added
if e32.in_emulator():
    sys.path.append('c:\\resource\\python25\\python25_repo.zip')

script_dirs = [(u'c:', 'c:\\data\\python'), (u'e:', 'e:\\python'),
               (u'e:', 'e:\\data\\python')]
for path in ('c:\\data\\python\\lib', 'e:\\python\\lib'):
    if os.path.exists(path):
        sys.path.append(path)

my_console = series60_console.Console()
set_defaults()
lock = e32.Ao_lock()
appuifw.app.exit_key_handler = lock.signal
print 'Python for S60 Version ' + e32.pys60_version
print 'Capabilities Present:', e32.get_capabilities()
print '\nSelect:'
print '"Options -> Run script" to run a script'
print '"Options -> About" to view copyright\n'
lock.wait()
appuifw.app.set_exit()
Beispiel #6
0
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")
print(e32.get_capabilities())

sys.stdout.write("Check WriteUserData: %s\n" % e32.has_capabilities(['WriteUserData']))
 
sys.stdout.write("Check WriteUserData and ReadUserData: "+str(e32.has_capabilities(['WriteUserData','ReadUserData']))+"\n")
 
sys.stdout.write("Check if UI thread: %s\n" % e32.is_ui_thread())
 
sys.stdout.write("Check if in emulator: %s\n" % e32.in_emulator())

sys.stdout.write("Current time: %s\n" % time.strftime("%a, %d %b %Y, %H:%M:%S", time.localtime()))

sys.stdout.write("Curent dir: %s\n" % os.getcwd())