Skip to content

Commit

Permalink
Adding qt.version()
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter de Groot committed Feb 21, 2009
1 parent 62032cf commit ba551c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git-snapshot
15 changes: 15 additions & 0 deletions source/qt.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Global namespace

import os
from qtflow import get_flowcontrol
from instruments import get_instruments
import config as _config
Expand All @@ -24,3 +25,17 @@
from plot_engines.qtgnuplot import Plot2D, Plot3D

plots = Plot.get_named_list()

def version():
version_file = os.path.join(config['qtlabdir'], 'VERSION')
try:
f = file(version_file,'r')
str = f.readline()
str = str.rstrip('\n\r')
f.close()
except:
str = 'NO VERSION FILE'

return str


0 comments on commit ba551c4

Please sign in to comment.