File: version.py

package info (click to toggle)
imagevis3d 2.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,872 kB
  • sloc: cpp: 53,586; sh: 788; ansic: 292; xml: 258; python: 35; makefile: 16
file content (10 lines) | stat: -rw-r--r-- 326 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
# A replacement for "grep IV3D_MAJOR StdDefines.h | awk "{print $3}"
# because windows' shell is worthless.
import subprocess
import sys

p1 = subprocess.Popen(["grep", "%s" % sys.argv[1], "ImageVis3D/StdDefines.h"],
                      stdout=subprocess.PIPE)
output = p1.communicate()[0]
ver = output.split()
print ver[2]