All Samples(105789) | Call(0) | Derive(0) | Import(105789)
OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, or ntpath
- os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
- os.curdir is a string representing the current directory ('.' or ':')
- os.pardir is a string representing the parent directory ('..' or '::')
- os.sep is the (or a most common) pathname separator ('/' or ':' or '\\')
- os.extsep is the extension separator ('.' or '/')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)
Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/site-packages/isapi/samples/test.py ironruby(Download)
# This extension is used mainly for testing purposes - it is not # designed to be a simple sample, but instead is a hotch-potch of things # that attempts to exercise the framework. from isapi import isapicon from isapi.simple import SimpleExtension import sys, os, stat
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/site-packages/isapi/samples/advanced.py ironruby(Download)
from isapi import isapicon
from isapi.simple import SimpleExtension
import sys, os, stat
if hasattr(sys, "isapidllhandle"):
import win32traceutil
src/s/a/sage-HEAD/trunk/local/lib/python2.4/site-packages/zope/testing/testrunner-ex-pp-lib/sample4/products/__init__.py sage(Download)
$Id: __init__.py 39695 2005-10-28 20:01:54Z jim $
"""
import os
__path__.append(
os.path.join(
src/p/y/pypy3-HEAD/pypy/interpreter/pyparser/test/unittest_samples.py pypy3(Download)
"""test module for CPython / PyPy nested tuples comparison""" import os, os.path as osp import sys from pypy.interpreter.pyparser.pythonutil import python_parse, pypy_parse from pprint import pprint from pypy.interpreter.pyparser import grammar
src/p/y/pypy-HEAD/pypy/interpreter/pyparser/test/unittest_samples.py pypy(Download)
"""test module for CPython / PyPy nested tuples comparison""" import os, os.path as osp import sys from pypy.interpreter.pyparser.pythonutil import python_parse, pypy_parse from pprint import pprint from pypy.interpreter.pyparser import grammar
src/s/a/sage-HEAD/local/lib/python2.4/site-packages/zope/testing/testrunner-ex-pp-lib/sample4/products/__init__.py sage(Download)
$Id: __init__.py 39695 2005-10-28 20:01:54Z jim $
"""
import os
__path__.append(
os.path.join(
src/m/a/matplotlib-HEAD/toolkits/basemap/geos-3.2.0/swig/python/tests/example.py matplotlib(Download)
import os import sys import distutils.util import math # Put local build directory on head of python path platformdir = '-'.join((distutils.util.get_platform(),
src/p/y/pypy3-HEAD/pypy/lib/test2/sample_aop_code.py pypy3(Download)
print 'truc', r, 'expected 7'
return r
"""
import os, sys
import os.path as osp
def _make_filename(name):
src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Demo/tix/samples/Tree.py spike(Download)
# dynamic hierachical data (the files in the Unix file system)
#
import Tix, os
def RunSample(w):
top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Demo/tix/samples/DirTree.py spike(Download)
# installation directory for an application. # import Tix, os, copy from Tkconstants import * TCL_ALL_EVENTS = 0
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next