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>2011-11-24 23:36:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-24 23:36:12 +0400
commit6e28ac2d7b241d9ee859650d58a89e2b7d441ea7 (patch)
tree5a1aaeb5131a5ca240bd88e93b9fba0bdcaa1f30 /release/scripts/modules/bpy
parentddfc518caea168ae1882e717ef28a35f91705a14 (diff)
pep8 edits and avoid naming conflicts with python builtins
Diffstat (limited to 'release/scripts/modules/bpy')
-rw-r--r--release/scripts/modules/bpy/utils.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index 6eb16bd7e7a..cf3e92bdcbf 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -263,7 +263,7 @@ def user_script_path():
return None
-def script_paths(subdir=None, user_pref=True, all=False):
+def script_paths(subdir=None, user_pref=True, check_all=False):
"""
Returns a list of valid script paths.
@@ -271,9 +271,9 @@ def script_paths(subdir=None, user_pref=True, all=False):
:type subdir: string
:arg user_pref: Include the user preference script path.
:type user_pref: bool
- :arg all: Include local, user and system paths rather just the paths
+ :arg check_all: Include local, user and system paths rather just the paths
blender uses.
- :type all: bool
+ :type check_all: bool
:return: script paths.
:rtype: list
"""
@@ -286,7 +286,7 @@ def script_paths(subdir=None, user_pref=True, all=False):
else:
user_script_path = None
- if all:
+ if check_all:
# all possible paths
base_paths = tuple(_os.path.join(resource_path(res), "scripts")
for res in ('LOCAL', 'USER', 'SYSTEM'))
@@ -343,7 +343,7 @@ def preset_paths(subdir):
:rtype: list
"""
dirs = []
- for path in script_paths("presets", all=True):
+ for path in script_paths("presets", check_all=True):
directory = _os.path.join(path, subdir)
if not directory.startswith(path):
raise Exception("invalid subdir given %r" % subdir)
@@ -432,9 +432,9 @@ def keyconfig_set(filepath):
keyconfigs_old = keyconfigs[:]
try:
- file = open(filepath)
- exec(compile(file.read(), filepath, 'exec'), {"__file__": filepath})
- file.close()
+ keyfile = open(filepath)
+ exec(compile(keyfile.read(), filepath, 'exec'), {"__file__": filepath})
+ keyfile.close()
except:
import traceback
traceback.print_exc()