version

sans.guiframe.version

class sans.guiframe.version.VersionChecker(version_url)

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.

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(url, call_back=None, baggage=None)

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.

getName()
isAlive()
isDaemon()
join(timeout=None)
run()
Execute the process of reading the current application version number.
setDaemon(daemonic)
setName(name)
start()
sans.guiframe.version.write_version(version, filename='.current_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