- Added KlopUtils by Carlos Lopez and Batch Object Name Edit by Campbell Barton (thanks both!)

BPython:
- Fixed things I recently broke in Blender.sys, added Blender.sys.join(dir, file)
- doc and other minor updates
This commit is contained in:
2004-06-24 15:03:08 +00:00
parent e306beec04
commit d5b4fb5736
7 changed files with 1239 additions and 25 deletions

View File

@@ -6,7 +6,7 @@ The Blender.sys submodule.
sys
===
B{New}: L{exists}, L{makename}.
B{New}: L{exists}, L{makename}, L{join}.
This module provides a minimal set of helper functions and data. Its purpose
is to avoid the need for the standard Python module 'os', in special 'os.path',
@@ -59,6 +59,20 @@ def dirname (path):
@return: the dir name
"""
def join (dir, file):
"""
Join the given dir and file paths, using the proper separator for each
platform.
@type dir: string
@type file: string
@param dir: the dir name, like returned from L{dirname}.
@param file: the bare filename, like returned from L{basename}.
@rtype: string
@return: the resulting filename.
@warn: this simple function isn't intended to be a complete replacement for
the standard os.path.join() one, which handles more general cases.
"""
def splitext (path):
"""
Split 'path' into (root, ext), where 'ext' is a file extension.