Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Padovani Germano <wpgermano@gmail.com>2004-06-10 19:14:49 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2004-06-10 19:14:49 +0400
commita23c6a71da4feea2e036928d260630cb26854ab1 (patch)
tree21d3f9037043436de8b8d00d2d3ec561d69f4c7c /source/blender/python/api2_2x/doc/Sys.py
parenta6d077bae243eef5f8826b2c7b27bd297428d7d4 (diff)
- 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.
Diffstat (limited to 'source/blender/python/api2_2x/doc/Sys.py')
-rw-r--r--source/blender/python/api2_2x/doc/Sys.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/doc/Sys.py b/source/blender/python/api2_2x/doc/Sys.py
index d488c8a1f65..515bc6e3fee 100644
--- a/source/blender/python/api2_2x/doc/Sys.py
+++ b/source/blender/python/api2_2x/doc/Sys.py
@@ -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