Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # Simple script to pull out version information from openoffice/libreoffice.
- # soffice -help | ./detect_version.py
- import sys
- import re
- VERSION_STRING = re.compile(r'([0-9a-zA-Z\.]*)[ ]*([0-9\.]*)[ ]*([0-9a-zA-Z]*)\(Build:([0-9]*)\)')
- data = sys.stdin.read()
- match = VERSION_STRING.search(data)
- if match:
- print match.groups()
- else:
- print 'No matches found.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement