version

sans.guiframe.version

class sans.guiframe.version.VersionChecker

Bases: object

Class of objects used to obtain the current version of an application from the deployment server. A sub process is started to read the URL associated with the version number. The version number is written on file locally before the reading process ends, then read when the version number is requested.

The reading of the URL is put in a separate process so that it doesn’t affect the performance of the application and can be managed and stopped at any time.

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01801550>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()

Start the sub-process used to read the version URL

__module__ = 'sans.guiframe.version'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

_process = None
_t_0 = None
get_version()

Returns the last version number that was read from the server.

is_complete()

Method used to poll the reading process. The process will be killed if the wait time is longer than a predefined maximum. This method should always be called before get_version() to ensure accuracy of the version number that is returned.

class sans.guiframe.version.VersionThread

Bases: threading.Thread

Thread used to start the process of reading the current version of an application from the deployment server.

The VersionChecker is user in a Thread to allow the main application to continue dealing with UI requests from the user. The main application provides a call-back method for when the version number is obtained.

_Thread__bootstrap()
_Thread__bootstrap_inner()
_Thread__delete()

Remove current thread from the dict of currently running threads.

_Thread__exc_info()

exc_info() -> (type, value, traceback)

Return information about the most recent exception caught by an except clause in the current stack frame or in an older stack frame.

_Thread__initialized = False
_Thread__stop()
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01801110>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.guiframe.version'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()
__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

_note()
_set_daemon()
getName()
isAlive()
isDaemon()
join()
run()

Execute the process of reading the current application version number.

setDaemon()
setName()
start()
sans.guiframe.version._get_version_from_server()

Method executed in the independent process used to read the current version number from the server.

Parameters:url – URL to read the version number from
sans.guiframe.version.write_version()

Store the version number This could be put into a DB if the application has one.

Table Of Contents

Previous topic

utils

Next topic

Local Perspective: plotting

This Page