Difference between revisions of "Os.py"

From PeformIQ Upgrade
Jump to navigation Jump to search
(New page: =Script= Some features of the <b>os</b> module: <pre> #!/usr/bin/env python import os print os.sysconf_names print " SC_ARG_MAX: %d" % os.sysconf('SC_ARG_MAX') print " SC_CHILD...)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Script=
=Script=


Some features of the <b>os</b> module:
Some features of the [http://www.python.org/doc/2.5.2/lib/module-os.html os] module:
 
Also see [http://www.python.org/doc/2.5.2/lib/modindex.html module index]
 


<pre>
<pre>
Line 24: Line 27:


[[Category:Python]]
[[Category:Python]]
[[Category:Examples]]

Latest revision as of 17:12, 19 July 2009

Script

Some features of the os module:

Also see module index


#!/usr/bin/env python

import os

print os.sysconf_names


print "     SC_ARG_MAX: %d" % os.sysconf('SC_ARG_MAX')
print "   SC_CHILD_MAX: %d" % os.sysconf('SC_CHILD_MAX')
print "     SC_CLK_TCK: %d" % os.sysconf('SC_CLK_TCK')
print " SC_NGROUPS_MAX: %d" % os.sysconf('SC_NGROUPS_MAX')
print "    SC_OPEN_MAX: %d" % os.sysconf('SC_OPEN_MAX')
print " SC_JOB_CONTROL: %d" % os.sysconf('SC_JOB_CONTROL')
print "   SC_SAVED_IDS: %d" % os.sysconf('SC_SAVED_IDS')

# print "  SC_STREAM_MAX: %d" % os.sysconf('SC_STREAM_MAX')
# print "  SC_TZNAME_MAX: %d" % os.sysconf('SC_TZNAME_MAX')