application version checking against database

Discussion in 'Python' started by imageguy, Sep 7, 2007.

  1. imageguy

    imageguy Guest

    We are trying to implement a system that checks the version of the
    application against a version number stored in the database. We don't
    want the app and the db don't become out of sync.

    We have tried setting a __version__ variable in the top most module,
    however, it seems that this is not accessible for the modules that are
    subsequently imported. There are a several locations in the app where
    we want to do the version check, but we would like to have one place
    to set the version number, namely the top level module.

    We have thought of creating a Version class and passing it around, but
    aren't really keen on that idea.

    Any suggestions/ideas would be helpful.


    NOTE: the app is developed in wxPython.

    g.
    imageguy, Sep 7, 2007
    #1
    1. Advertising

  2. En Fri, 07 Sep 2007 10:12:09 -0300, Hamilton, William
    <> escribi�:

    >> We are trying to implement a system that checks the version of the
    >> application against a version number stored in the database. We don't
    >> want the app and the db don't become out of sync.
    >>
    >> We have tried setting a __version__ variable in the top most module,
    >> however, it seems that this is not accessible for the modules that are
    >> subsequently imported. There are a several locations in the app where
    >> we want to do the version check, but we would like to have one place
    >> to set the version number, namely the top level module.

    >
    > You could add a Version module that contains the version number and any
    > functions related to the version checking, and import that into the
    > modules that do version checking.


    Also, there is a version module already available from the standard
    library:

    from distutils.version import StrictVersion
    __version__ = StrictVersion("1.3")
    __version__ = '$Revision: 1.19 $'[11:-2]

    The last line is for CVS.

    --
    Gabriel Genellina
    Gabriel Genellina, Sep 8, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. excelleinc.com
    Replies:
    1
    Views:
    1,410
    Hermit Dave
    Sep 10, 2004
  2. V Green
    Replies:
    0
    Views:
    842
    V Green
    Feb 5, 2008
  3. PA Bear [MS MVP]
    Replies:
    0
    Views:
    956
    PA Bear [MS MVP]
    Feb 5, 2008
  4. MowGreen [MVP]
    Replies:
    5
    Views:
    2,017
    PA Bear [MS MVP]
    Feb 9, 2008
  5. mdev
    Replies:
    0
    Views:
    1,627
Loading...

Share This Page