×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Problem with update app

    I Developed an option for testing an update, if there is a new update, its will be navigated user to download the update.
    But I do not know but to download the file check from the server version and then checks to see whether there is a newer version to the app(This problem occurs because of error).

    here is my code:

    Code:
    #copyright (c) python-s60.com
    import urllib  #import the custom module
    import appuifw
    from appuifw import *
    import e32
    import os
    import urllib  #import the custom module
    
    
    
    pathtoapp=os.path.dirname(appuifw.app.full_name())
    
    appver=1.00
    
    timer = e32.Ao_timer()
    app_lock = e32.Ao_lock()
    
    def down_update():
    url = "http://www.codim.co.il/vnixe/check.set"  #mention the url
    tempfile = "c:\\system\\data\\vnixe\\update\\check.set"   #where to retrieve
    urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    def write_settings():
        global appver   
    
    
        CONFIG_DIR='c:\\system\\data\\vnixe\\update\\check.set'
        CONFIG_FILE=os.path.join(CONFIG_DIR,'check.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'ver.set')      
        config={}
        config['appver']= appver
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()
    
    
    def down_settings():
        global appver   
    
    
        CONFIG_DIR='C:\\S60\\devices\\S60_3rd_FP2_SDK_v1.1\\epoc32\\winscw\\c\\system\\data\\vnixe\\update'
        CONFIG_FILE=os.path.join(CONFIG_DIR,'check.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'check.set')      
        config={}
        config['appver']= appver
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()
    
    def read_settings():
        global appver   
        CONFIG_FILE='C:\\S60\\devices\\S60_3rd_FP2_SDK_v1.1\\epoc32\\winscw\\c\\system\\data\\vnixe\\update\\ver.set'
        try:
            f=open(CONFIG_FILE,'rt')
            try:
                content = f.read()
                config=eval(content)
                f.close()
                appver=config.get('thisuer','')
            except:
                appuifw.note(u"Cannot read version file", "error")
        except:
            appuifw.note(u"Creating version file", "info")
    def exit_key_handler():
        write_settings()
        down_settings()
        appuifw.app.set_exit()
        
        
    def quit():
        write_settings()
        down_settings()
        appuifw.app.set_exit()
    
    N = [u"About", u"manager", u"exit"]
    
    Y = [u"About", u"exit"]
    
    def menu():
        global appver
        if appver == 1.00:
            index = appuifw.popup_menu(N)
            if index == 0:
                about()
            elif index == 1:
                manager()
            elif index == 2:
                quit()
            else:
                pass
        elif appver == 1:
            index = appuifw.popup_menu(Y)
            if index == 0:
                about()
            elif index == 1:
                quit()
            else:
                pass
        else:
            pass
            
    def about():
        appuifw.note(u"Update manager", "info")
        menu()
    
    def s_update():
        global appver
        if appver == 1.00:
            appuifw.note(u"You should to update your app", "info")
        
    def c_update():
        global appver
        if appver == 0:
            appuifw.note(u"Check for updates", "info")
                appver = 1.00 # success
                appuifw.note(u"You have'nt need to update your app","info")
            else:
                appuifw.note(u"Have new version to this app","info")
        else:
            appuifw.note(u"You already updated!","info")
    
        menu()
        
    
    
    appuifw.app.title = u"Vnixe OS - Updates manager"
    
    appuifw.app.exit_key_handler = exit_key_handler
    appuifw.app.screen='normal'
    
    read_settings()
    s_update()
    menu()
    menu()
    Last edited by Scolpy; 2008-11-11 at 17:10.

  2. #2
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Hi yonatan,

    Again: try one thing at a time

    First, try this example for updating the script, which is very simple and should work easily.

    If you did that successfully, try implementing the code for registering the application and writing the settings to a file.

    Only after this, you make a simple for checking the version and automatically updating if there is a newer version.

    PS: You may also want to check this thread.



    BR,

    Rafael.

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    Hi yonatan,

    Again: try one thing at a time

    First, try this example for updating the script, which is very simple and should work easily.

    If you did that successfully, try implementing the code for registering the application and writing the settings to a file.

    Only after this, you make a simple for checking the version and automatically updating if there is a newer version.

    PS: You may also want to check this thread.



    BR,

    Rafael.
    Before I put the wrong code.
    Now look at the code (to get more information about the error).

    By the way, this article explaining how you can update script PY.
    But if you already have united all the scripts a SIS file?

  4. #4
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Quote Originally Posted by XxXYonIXxX View Post
    Before I put the wrong code.
    Now look at the code (to get more information about the error).

    By the way, this article explaining how you can update script PY.
    But if you already have united all the scripts a SIS file?
    Well, if you want to do that with a SIS file you could use the same script changing the extension to .sis

    Then, you would install the software as you would do usually when downloading any SIS file from the phone (the browser will give the option to install the software immediatly).

    I recommend you to use always the same UID for all versions, so when you install the update, the phone will automaticaly replace the newer version by the old one.

    And finally, you could use Ensymble's runinstall option to run the application right after installing.

    See the considerations from Ensymble's ReadMe file:

    --runinstall
    -R

    Run the application after installation. After copying all files to the
    phone, the application is automatically started.

    Note: Phones will ignore this flag in SIS files using self-signed
    certificates (see option "--cert" above).

    Hope it helps,

    Rafael.

  5. #5
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    I managed to create this code:

    Code:
    
    import urllib
    import appuifw
    from appuifw import *
    import e32
    import os
    
    
    pathtoapp=os.path.dirname(appuifw.app.full_name())
    
    version=1.0
    updatefile= down_update()
    
    timer = e32.Ao_timer()
    app_lock = e32.Ao_lock()
    
    
    def check_update():
    url = "http://www.vnixe.net/update/s60_player/lastver.set"  #mention the url
    tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"   #where to retrieve
    urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
    appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
    #Parameters for accessing the script file on device 
    #as well as the path of code on the server
    script = "example.py"
    server = "http://www.vnixe.net/update/s60_player/"
    
    update = urllib.urlopen(server + script).read()
    #Path  of the Python Script file to update 
    d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
    d.write(update)
    d.close()
    #The script has been updated successfully
    appuifw.note(u"The Script has been successfully updated","info")
    
    
    def read_version():
        global version   
        CONFIG_FILE='C:\\system\\data\\vnixe\\update\\lastver.set'
        try:
            f=open(CONFIG_FILE,'rt')
            try:
                content = f.read()
                config=eval(content)
                f.close()
                version=config.get('lastver','')
            except:
                appuifw.note(u"Cannot read Last version file", "error")
        except:
            appuifw.note(u"Creating Last version file", "info")
    def exit_key_handler():
        write_settings()
        appuifw.app.set_exit()
     
       
    def write_version():
        global updatefile
        if updatefile == 1.0:
    
        CONFIG_DIR='C:\\system\\data\\vnixe\\update'
        CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')      
        config={}
        config['lastver']= version
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()
    
        
    def quit():
        write_settings()
        appuifw.app.set_exit()
    
    
    appuifw.app.exit_key_handler = exit_key_handler
    appuifw.app.screen='normal'
    
    read_version()


    But I can not understand why he does not work (he shows me an error on line 12 19, and I do not understand why it appears at all

  6. #6
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Hi yonatas,

    You have some indentation problems there ...

    Code:
    def check_update():
    url = "http://www.vnixe.net/update/s60_player/lastver.set"  #mention the url
    tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"   #where to retrieve
    urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
    appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
    #Parameters for accessing the script file on device 
    #as well as the path of code on the server
    script = "example.py"
    server = "http://www.vnixe.net/update/s60_player/"
    
    update = urllib.urlopen(server + script).read()
    #Path  of the Python Script file to update 
    d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
    d.write(update)
    d.close()
    #The script has been updated successfully
    appuifw.note(u"The Script has been successfully updated","info")
    This is very wrong

    You're puting things outside the functions and if clauses!

    Corrected code would be:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
            appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
            #Parameters for accessing the script file on device 
            #as well as the path of code on the server
            script = "example.py"
            server = "http://www.vnixe.net/update/s60_player/"
    
            update = urllib.urlopen(server + script).read()
            #Path  of the Python Script file to update 
            d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
            d.write(update)
            d.close()
            #The script has been updated successfully
            appuifw.note(u"The Script has been successfully updated","info")
    Don't forget: you have to use spaces for getting your variables/commands inside the functions. If you don't use them your variables will become global and the commands will execute automaticaly when your application starts!


    Hope it helps,

    Rafael.

  7. #7
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    Hi yonatas,

    You have some indentation problems there ...

    Code:
    def check_update():
    url = "http://www.vnixe.net/update/s60_player/lastver.set"  #mention the url
    tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"   #where to retrieve
    urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
    appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
    #Parameters for accessing the script file on device 
    #as well as the path of code on the server
    script = "example.py"
    server = "http://www.vnixe.net/update/s60_player/"
    
    update = urllib.urlopen(server + script).read()
    #Path  of the Python Script file to update 
    d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
    d.write(update)
    d.close()
    #The script has been updated successfully
    appuifw.note(u"The Script has been successfully updated","info")
    This is very wrong

    You're puting things outside the functions and if clauses!

    Corrected code would be:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
            appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
            #Parameters for accessing the script file on device 
            #as well as the path of code on the server
            script = "example.py"
            server = "http://www.vnixe.net/update/s60_player/"
    
            update = urllib.urlopen(server + script).read()
            #Path  of the Python Script file to update 
            d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
            d.write(update)
            d.close()
            #The script has been updated successfully
            appuifw.note(u"The Script has been successfully updated","info")
    Don't forget: you have to use spaces for getting your variables/commands inside the functions. If you don't use them your variables will become global and the commands will execute automaticaly when your application starts!


    Hope it helps,

    Rafael.
    Thanks for the fix.


    But what can be done to order operations DEF?
    In the event, the matter that I want him to perform the following actions:
    1) download the latest version from the server.
    2) Iamat Is there a new version.
    3) if there is a new version, it downloads and installs it from the server, and then write file version (on device), the new version.
    4) If you do not, he will release a new message "you have the latest version of the application".

    By the way, in global variable "updatefile" I want to be called data from a version (lastver.py), how can i do it

    anyway, this is my code:


    Code:
    import urllib
    import appuifw
    from appuifw import *
    import e32
    import os
    
    
    pathtoapp=os.path.dirname(appuifw.app.full_name())
    
    version=1.0
    updatefile= down_update()
    
    timer = e32.Ao_timer()
    app_lock = e32.Ao_lock()
    
    
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
    
    
    
    def down_update():
        global version
        if version == 1.0:
    
            appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
            #Parameters for accessing the script file on device 
            #as well as the path of code on the server
            script = "example.py"
            server = "http://www.vnixe.net/update/s60_player/"
    
            update = urllib.urlopen(server + script).read()
            #Path  of the Python Script file to update 
            d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
            d.write(update)
            d.close()
            #The script has been updated successfully
            appuifw.note(u"The Script has been successfully updated","info")
    
    
    def read_version():
        global version   
        CONFIG_FILE='C:\\system\\data\\vnixe\\update\\lastver.set'
        try:
            f=open(CONFIG_FILE,'rt')
            try:
                content = f.read()
                config=eval(content)
                f.close()
                version=config.get('lastver','')
            except:
                appuifw.note(u"Cannot read Last version file", "error")
        except:
            appuifw.note(u"Creating Last version file", "info")
       
    def write_version():
        global updatefile
        if updatefile == 1.0:
        CONFIG_DIR='C:\\system\\data\\vnixe\\update'
        CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')      
        config={}
        config['lastver']= version
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()
    
    
    appuifw.app.screen='normal'
    
    read_version()
    Last edited by Scolpy; 2008-11-12 at 19:37.

  8. #8
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Hi yonatan,

    Well, you created the functions, now just call them!

    Try using a menu:

    Code:
    import appuifw
    
    appuifw.app.menu = [(u"Check for update", check_update),
                        (u"Exit", quit)]
    And add on check_update function also call down_update after all the code inside that function:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()

    Hope it helps,

    Rafael.

  9. #9
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    Hi yonatan,

    Well, you created the functions, now just call them!

    Try using a menu:

    Code:
    import appuifw
    
    appuifw.app.menu = [(u"Check for update", check_update),
                        (u"Exit", quit)]
    And add on check_update function also call down_update after all the code inside that function:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()

    Hope it helps,

    Rafael.
    Thank you very much for your help, you are very good man.

    To the subject - I'm not interested in adding menu, because this file is a separate himself from the menu (see post: http://discussion.forum.nokia.com/fo...28&postcount=7)

  10. #10
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Quote Originally Posted by XxXYonIXxX View Post
    Thank you very much for your help, you are very good man.

    To the subject - I'm not interested in adding menu, because this file is a separate himself from the menu (see post: http://discussion.forum.nokia.com/fo...28&postcount=7)
    You are welcome

    I'll always try to help as much as I can

    I understand why you don't want the menu, now

    In this case you could just call the function when the script starts:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()
    
    check_update() # This is outside the function, so it will be called when script starts
    Best wishes for your new application!



    BR,

    Rafael.

  11. #11
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    You are welcome

    I'll always try to help as much as I can

    I understand why you don't want the menu, now

    In this case you could just call the function when the script starts:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()
    
    check_update() # This is outside the function, so it will be called when script starts
    Best wishes for your new application!



    BR,

    Rafael.
    Thank you!

    I added the line, but now appears to me an error on line 61.
    This is the part where the error (marked red line specific):
    Code:
    def write_version():
        global updatefile
        if updatefile == 1.0:
        CONFIG_DIR='C:\\system\\data\\vnixe\\update'
        CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')      
        config={}
        config['lastver']= version
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()
    Incidentally, I checked that the path that exists.

  12. #12
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Hi yonatan,

    Again indentation error!

    See that I have skipped 4 spaces on the if clause.

    I also added a '' on '1.0', I think it's better to work with a string in this case

    Code:
    def write_version():
        global updatefile
        if updatefile == '1.0':
            CONFIG_DIR='C:\\system\\data\\vnixe\\update'
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')      
        config={}
        config['lastver']= version
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()


    BR,

    Rafael.
    Last edited by Rafael T.; 2008-11-12 at 20:48.

  13. #13
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    Hi yonatan,

    Again indentation error!

    See that I have skipped 4 spaces on the if clause.

    I also added a '' on '1.0', it should be a string

    Code:
    def write_version():
        global updatefile
        if updatefile == '1.0':
            CONFIG_DIR='C:\\system\\data\\vnixe\\update'
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')
        if not os.path.isdir(CONFIG_DIR):
            os.makedirs(CONFIG_DIR)
            CONFIG_FILE=os.path.join(CONFIG_DIR,'lastver.set')      
        config={}
        config['lastver']= version
        f=open(CONFIG_FILE,'wt')
        f.write(repr(config))
        f.close()

    BR,

    Rafael.
    Look, now appears to me an error that variable:
    "down_update"
    No Defined.
    It seems to me that because of that Ordinance IF following code (which makes "down_update" to be null).

    The incorrect line:
    Code:
    updatefile= down_update()

  14. #14
    Super Contributor
    Join Date
    Feb 2008
    Location
    Belo Horizonte, Brazil
    Posts
    744

    Re: Problem with update app

    Quote Originally Posted by XxXYonIXxX View Post
    Look, now appears to me an error that variable:
    "down_update"
    No Defined.
    It seems to me that because of that Ordinance IF following code (which makes "down_update" to be null).

    The incorrect line:
    Code:
    updatefile= down_update()
    Hi yonatan,

    The line is incorrect because for a variable to be equal a function, this function must return something.

    Example:

    Code:
    def test_function():
        my_list = [1, 2, 3, 4]
    
        return my_list
    
    # Now we can use it:
    test = test_function()

    Hope it helps,

    Rafael.

  15. #15
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    69

    Re: Problem with update app

    Quote Originally Posted by Rafael T. View Post
    Hi yonatan,

    The line is incorrect because for a variable to be equal a function, this function must return something.

    Example:

    Code:
    def test_function():
        my_list = [1, 2, 3, 4]
    
        return my_list
    
    # Now we can use it:
    test = test_function()

    Hope it helps,

    Rafael.
    I changed the code this code:
    Code:
    import urllib
    import appuifw
    from appuifw import *
    import e32
    import os
    
    
    pathtoapp=os.path.dirname(appuifw.app.full_name())
    
    version=1.0
    
    timer = e32.Ao_timer()
    app_lock = e32.Ao_lock()
    
    
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()
    
    check_update() # This is outside the function, so it will be called when script starts
    
    def down_update():
        global version
        if version == 1.0:
            appuifw.note(u"You have the latest version of app", "info")
    
        elif version != 1.0:
            #Parameters for accessing the script file on device 
            #as well as the path of code on the server
            script = "example.py"
            server = "http://www.vnixe.net/update/s60_player/"
    
            update = urllib.urlopen(server + script).read()
            #Path  of the Python Script file to update 
            d = file(u"C:\\system\\data\\vnixe\\update\\" + script, "w")
            d.write(update)
            d.close()
            #The script has been updated successfully
            appuifw.note(u"The Script has been successfully updated","info")
    
    
    def read_version():
        global version   
        CONFIG_FILE='C:\\system\\data\\vnixe\\update\\lastver.set'
        try:
            f=open(CONFIG_FILE,'rt')
            try:
                content = f.read()
                config=eval(content)
                f.close()
                version=config.get('lastver','')
            except:
                appuifw.note(u"Cannot read Last version file", "error")
        except:
            appuifw.note(u"Creating Last version file", "info")
     
    
    appuifw.app.screen='normal'
    
    read_version()
    But I still have an error ("down_update()" variable not set).
    Tried to reduce the variable "down_update()" Code:

    Code:
    def check_update():
        url = "http://www.vnixe.net/update/s60_player/lastver.set"
        #mention the url
        tempfile = "C:\\system\\data\\vnixe\\update\\lastver.set"
        #where to retrieve
        urllib.urlretrieve(url, tempfile)   #retrieve the url
        down_update()
    
    check_update() # This is outside the function, so it will be called when script starts
    But this factor to make only the downloaded file into an (lasnver.set) and continues the whole process.

    By the way,
    I understand what you wrote in the message earlier that in order that changes will be equal function, the function should return something.
    But I do not know what needs to the extent function not showing anything

Similar Threads

  1. Software Update Problem
    By d0ud0u in forum General Development Questions
    Replies: 4
    Last Post: 2008-02-25, 08:10
  2. Wierd problem: App. shutdown during processing only on device
    By kittinut_k in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2008-02-15, 18:11
  3. Replies: 0
    Last Post: 2007-07-14, 13:35
  4. symbian signed testing problem.
    By anglina in forum Symbian
    Replies: 0
    Last Post: 2007-02-01, 10:15
  5. Problem with porting an App
    By subik in forum Symbian
    Replies: 5
    Last Post: 2006-12-13, 16:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×