How to detect my browser version and operating system using JavaScript?

Detecting browser’s details: var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ”+parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion,10); var nameOffset,verOffset,ix; // In Opera, the true version is after “Opera” or after “Version” if ((verOffset=nAgt.indexOf(“Opera”))!=-1) { browserName = “Opera”; fullVersion = nAgt.substring(verOffset+6); if ((verOffset=nAgt.indexOf(“Version”))!=-1) fullVersion = nAgt.substring(verOffset+8); } // In MSIE, … Read more

How do I check what version of Python is running my script?

This information is available in the sys.version string in the sys module: >>> import sys Human readable: >>> print(sys.version) # parentheses necessary in python 3. 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] For further processing, use sys.version_info or sys.hexversion: >>> sys.version_info (2, 5, 2, ‘final’, 0) # or >>> sys.hexversion 34014192 To … Read more

Determine installed PowerShell version

Use $PSVersionTable.PSVersion to determine the engine version. If the variable does not exist, it is safe to assume the engine is version 1.0. Note that $Host.Version and (Get-Host).Version are not reliable – they reflect the version of the host only, not the engine. PowerGUI, PowerShellPLUS, etc. are all hosting applications, and they will set the … Read more