Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(71)  |  Call(60)  |  Derive(0)  |  Import(11)
Define a template variable.

The variable names should follow pep8 guidelines about variable names.
pep8 variable are easier to set with a Skeleton constructor and you should
not assume the skeleton template formatter can use any name formatting.

src/s/k/skeleton-0.6/skeleton/__init__.py   skeleton(Download)
"""
 
from skeleton.core import (
    Skeleton, Var, Bool, FileNameKeyError, TemplateKeyError
    )

src/s/k/skeleton_stu-0.6.3/skeleton/__init__.py   skeleton_stu(Download)
"""
 
from skeleton.core import (
    Skeleton, Var, Bool, FileNameKeyError, TemplateKeyError
    )

src/s/k/skeleton-HEAD/skeleton/__init__.py   skeleton(Download)
"""
 
from skeleton.core import (
    Skeleton, Var, Bool, FileNameKeyError, TemplateKeyError
    )

src/p/y/PySeqsee-0.1.2/farg/third_party/skeleton/__init__.py   PySeqsee(Download)
"""
 
from skeleton.core import (
    Skeleton, Var, Bool, FileNameKeyError, TemplateKeyError
    )

src/s/k/skeleton-0.6/skeleton/tests/test_core.py   skeleton(Download)
 
from skeleton.tests.utils import TestCase, TempDir
from skeleton.core import Skeleton, Var, TemplateKeyError, FileNameKeyError, \
    Bool
 
class WithDefault(Skeleton):
    """Skeleton with variables with default"""
    variables = [Var('foo'), Var('bar', default=2), Var('baz')]
 
 
class WithRequirement(Skeleton):
    """Skeleton with other skeleton required"""
    variables = [Var('foo', default=1)]

src/s/k/skeleton_stu-0.6.3/skeleton/tests/test_core.py   skeleton_stu(Download)
 
from skeleton.tests.utils import TestCase, TempDir
from skeleton.core import Skeleton, Var, TemplateKeyError, FileNameKeyError, \
    Bool
 
class WithDefault(Skeleton):
    """Skeleton with variables with default"""
    variables = [Var('foo'), Var('bar', default=2), Var('baz')]
 
 
class WithRequirement(Skeleton):
    """Skeleton with other skeleton required"""
    variables = [Var('foo', default=1)]

src/p/y/PySeqsee-HEAD/farg/third_party/skeleton/__init__.py   PySeqsee(Download)
"""
 
from skeleton.core import (
    Skeleton, Var, Bool, FileNameKeyError, TemplateKeyError
    )

src/s/k/skeleton-HEAD/skeleton/tests/test_core.py   skeleton(Download)
 
from skeleton.tests.utils import TestCase, TempDir
from skeleton.core import Skeleton, Var, TemplateKeyError, FileNameKeyError, \
    Bool
 
class WithDefault(Skeleton):
    """Skeleton with variables with default"""
    variables = [Var('foo'), Var('bar', default=2), Var('baz')]
 
 
class WithRequirement(Skeleton):
    """Skeleton with other skeleton required"""
    variables = [Var('foo', default=1)]

src/s/k/skeleton-0.6/skeleton/tests/test_utils.py   skeleton(Download)
import unittest
 
from skeleton.core import Var
from skeleton.tests.utils import TestCase, TempDir
from skeleton.utils import insert_into_file, vars_to_optparser
 
        """
        parser = vars_to_optparser([Var('Foo'), Var('foo_bar')])
        self.assertEqual(parser.get_option('--foo').dest, 'Foo')
        self.assertEqual(parser.get_option('--foo-bar').dest, 'foo_bar')
 
    def test_default_metavar(self):
        """Tests option's metavar"""
        parser = vars_to_optparser([Var('Foo'), Var('bar_name')])

src/s/k/skeleton_stu-0.6.3/skeleton/tests/test_utils.py   skeleton_stu(Download)
import unittest
 
from skeleton.core import Var
from skeleton.tests.utils import TestCase, TempDir
from skeleton.utils import insert_into_file, vars_to_optparser
 
        """
        parser = vars_to_optparser([Var('Foo'), Var('foo_bar')])
        self.assertEqual(parser.get_option('--foo').dest, 'Foo')
        self.assertEqual(parser.get_option('--foo-bar').dest, 'foo_bar')
 
    def test_default_metavar(self):
        """Tests option's metavar"""
        parser = vars_to_optparser([Var('Foo'), Var('bar_name')])

  1 | 2  Next