Cross platform system information
- Posted by Michael J. Sabal <m_sabal at yahoo.co?> Jul 05, 2007
- 571 views
I have an application that I'm working on that needs to be cross-platform, and needs to be able to detect which version of an OS it's running on (Windows 98, XP, or Vista, or Linux 2.4.x or 2.6.x). It also needs to be able to detect the logged in username if possible. I know I can write a fairly lengthy function using platform() and lots of if's to do this; but it might be nice if uname(), a fairly standard C function, were built in as a machine_func. Any ideas? Mike Sabal