changeset 70:7ec0ca0134ff

stub getting wrapper options: [foo:@:bar=fleem:baz]
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 09 Jun 2011 17:57:12 -0700
parents b9d9a94bfa19
children 2261cf505daf
files pyloader/factory.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pyloader/factory.py	Thu Jun 09 09:36:08 2011 -0700
+++ b/pyloader/factory.py	Thu Jun 09 17:57:12 2011 -0700
@@ -134,6 +134,13 @@
 
                     # TODO: wrapper arguments:
                     # [extended-fibonacci:@:four=4,five=5:fibonacci]
+                    if ':' in _path:
+                        _wrapper_options, __path = path.split(':', 1)
+                        if ',' in _wrapper_options or '=' in _wrapper_options:
+                            # ,= : tokens to ensure these are wrapper options
+                            # as these shouldn't be found in a real path (dotted path or file path)
+
+                            _wrapper_options = None # TODO
 
                     # TODO: will be correct for
                     # [foo:bar:%(here)s/objects.py:MyClass]