Systèmes d'exploitation

Un article de Haypo.

(Différences entre les versions)
Version du 12 janvier 2010 à 14:12 (modifier)
Haypo (Discuter | Contributions)

← Différence précédente
Version actuelle (12 janvier 2010 à 14:21) (modifier) (défaire)
Haypo (Discuter | Contributions)

 
(Une révision intermédiaire masquée)
Ligne 9 : Ligne 9 :
* [http://docs.python.org/library/platform.html#platform.system platform.system()] : 'Windows', 'Linux', 'FreeBSD' * [http://docs.python.org/library/platform.html#platform.system platform.system()] : 'Windows', 'Linux', 'FreeBSD'
* [http://docs.python.org/library/sys.html#sys.platform sys.platform] : 'win32', 'cygwin', 'darwin', 'os2', 'os2emx', 'riscos', 'atheos' * [http://docs.python.org/library/sys.html#sys.platform sys.platform] : 'win32', 'cygwin', 'darwin', 'os2', 'os2emx', 'riscos', 'atheos'
 +* [http://docs.python.org/library/os.html#os.name os.name] : 'posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos'
 +* [http://docs.python.org/library/os.html#os.uname os.uname()]
 +** Il vaut mieux utiliser la version portable : [http://docs.python.org/library/platform.html#platform.uname platform.uname()]
 +** [http://en.wikipedia.org/wiki/Uname Article Wikipédia]
* Windows : * Windows :
** [http://docs.python.org/library/sys.html#sys.getwindowsversion sys.getwindowsversion()] ** [http://docs.python.org/library/sys.html#sys.getwindowsversion sys.getwindowsversion()]
** [http://docs.python.org/library/sys.html#sys.winver sys.winver] ** [http://docs.python.org/library/sys.html#sys.winver sys.winver]

Version actuelle

Retour à la page précédente Retour aux articles de programmation

[modifier] Identifier un système d'exploitation

uname() : appel système (sous Linux en tout cas).

En Python :