- small updates to scripts and bpython docs, also fixed two warnings;

- added function Blender.sys.exists(path) to check if a given file exists;
- forgot to mention: in my previous commit the blender.html file was also updated slightly.
This commit is contained in:
2004-06-10 15:14:49 +00:00
parent a6d077bae2
commit a23c6a71da
8 changed files with 209 additions and 172 deletions

View File

@@ -6,7 +6,7 @@ The Blender.sys submodule.
sys
===
B{New}: L{time}
B{New}: L{exists}
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',
@@ -28,6 +28,8 @@ Example::
print 'dirname:', Blender.sys.dirname(filename)
print 'splitext:', Blender.sys.splitext(filename)
# what would basename(splitext(filename)[0]) print?
@type sep: char
@var sep: the platform-specific dir separator for this Blender: '/'
everywhere, except on Win systems, that use '\\'.
@@ -66,6 +68,13 @@ def splitext (path):
@return: (root, ext)
"""
def exists(path):
"""
Tell if the given pathname (file or dir) exists.
@rtype: bool
@return: 1 if 'path' exists, 0 otherwise.
"""
def time ():
"""
Get the current time in seconds since a fixed value. Successive calls to