Getting Program Version within a script

Today I had the problem of displaying the version of the interpreter in a perl and a python script.

In Perl there is a Variable with the Version:

#!/usr/bin/perl

print "Perl version: ".$^V."\n";

Python also has this information:


#!/usr/bin/python

import sys
print "Python version: " + sys.version

Leave a Reply

Your email address will not be published. Required fields are marked *