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/u/n/unixpiger-HEAD/trunk/monitor/api/python/Demo/parser/example.py unixpiger(Download)
discussion of the operation of this code. """ import os import parser import symbol import token
src/u/n/unixpiger-HEAD/monitor/api/python/Demo/tix/samples/Tree.py unixpiger(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/u/n/unixpiger-HEAD/monitor/api/python/Demo/tix/samples/DirTree.py unixpiger(Download)
# installation directory for an application. # import Tix, os, copy from Tkconstants import * TCL_ALL_EVENTS = 0
src/u/n/unixpiger-HEAD/monitor/api/python/Demo/tix/samples/DirList.py unixpiger(Download)
# installation directory for an application. # import Tix, os, copy from Tkconstants import * TCL_ALL_EVENTS = 0
src/m/a/matplotlib-HEAD/py4science/examples/sphinx_template/sphinxext/plot_directive.py matplotlib(Download)
source will be included inline, as well as a link to the source. """ import sys, os, glob, shutil from docutils.parsers.rst import directives try:
src/m/a/matplotlib-HEAD/py4science/examples/sphinx_template/sphinxext/mathmpl.py matplotlib(Download)
import os
try:
from hashlib import md5
except ImportError:
from md5 import md5
from docutils import nodes
src/m/a/matplotlib-HEAD/py4science/examples/sphinx_template/sphinxext/inheritance_diagram.py matplotlib(Download)
""" import inspect import os import re import subprocess try:
src/m/a/matplotlib-HEAD/py4science/examples/pyrex/nnbf/setup.py matplotlib(Download)
from distutils.core import setup import os from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext
src/m/a/matplotlib-HEAD/py4science/examples/numpy_wrap/swig/testSeries.py matplotlib(Download)
#! /usr/bin/env python # System imports from distutils.util import get_platform import os import sys import unittest
src/m/a/matplotlib-HEAD/matplotlib/examples/animation/old_animation/movie_demo.py matplotlib(Download)
import matplotlib.pyplot as plt # For plotting graphs. import numpy as np import subprocess # For issuing commands to the OS. import os import sys # For determining the Python version. #
Previous 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 Next