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:
authorCampbell Barton <ideasman42@gmail.com>2006-06-29 10:04:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-06-29 10:04:21 +0400
commitdc458265e3562ea68bc6ca3cf8ddb71efe1576ef (patch)
treeca93f62796071fe3279c77ec17ef85b03e34528e /source/blender/python
parent54694b0e642dd0de6cdc2ec2c258a2975bde93d4 (diff)
There are a few BPy functions that are documented to return a list but actually return tuples.
Blender.sys.splitext() raises an error if the path is longer then 80 chars. seems a bit short, noted this anyhow end added an example. (hope its okay to do small doc corrections as I notice them.)
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/api2_2x/doc/Sys.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/doc/Sys.py b/source/blender/python/api2_2x/doc/Sys.py
index 8d9ecf0eb46..f1efeeb2344 100644
--- a/source/blender/python/api2_2x/doc/Sys.py
+++ b/source/blender/python/api2_2x/doc/Sys.py
@@ -75,11 +75,20 @@ def join (dir, file):
def splitext (path):
"""
- Split 'path' into (root, ext), where 'ext' is a file extension.
+ Split 'path' into (root, ext), where 'ext' is a file extension including the full stop.
+
+ Example::
+
+ import Blender
+ file, ext= Blender.sys.splitext('/tmp/foobar.blend')
+ print file, ext
+ # ('/tmp/foobar', '.blend')
+
@type path: string
@param path: a path name
- @rtype: list with two strings
+ @rtype: tuple of two strings
@return: (root, ext)
+ @note: This function will raise an error if the path is longer then 80 characters.
"""
def makename (path = "Blender.Get('filename')", ext = "", strip = 0):