The os.get function identifies the currently targeted operating system.
id = os.get()
Parameters
None.
Return Value
An operating system identifier, one of bsd, linux, macosx, solaris, or windows.
Example
if os.get() == "windows" then -- do something Windows-specific end



Would it be possible to add a mechanism to get which version of windows?
e.g. return windows-xp, windows-vista, windows-7, or have another function os.getversion() which could do it.
[Ed: moved to feature requests]