Back to index

moin  1.9.0~rc2
Namespaces | Functions | Variables
MoinMoin.support.pygments.styles Namespace Reference

Namespaces

namespace  autumn
namespace  borland
namespace  bw
namespace  colorful
namespace  default
namespace  emacs
namespace  friendly
namespace  fruity
namespace  manni
namespace  murphy
namespace  native
namespace  pastie
namespace  perldoc
namespace  tango
namespace  trac
namespace  vim
namespace  vs

Functions

def get_style_by_name
def get_all_styles

Variables

dictionary STYLE_MAP

Function Documentation

Return an generator for all styles by name,
both builtin and plugin.

Definition at line 61 of file __init__.py.

00061 
00062 def get_all_styles():
00063     """Return an generator for all styles by name,
00064     both builtin and plugin."""
00065     for name in STYLE_MAP:
00066         yield name
00067     for name, _ in find_plugin_styles():
00068         yield name

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 37 of file __init__.py.

00037 
00038 def get_style_by_name(name):
00039     if name in STYLE_MAP:
00040         mod, cls = STYLE_MAP[name].split('::')
00041         builtin = "yes"
00042     else:
00043         for found_name, style in find_plugin_styles():
00044             if name == found_name:
00045                 return style
00046         # perhaps it got dropped into our styles package
00047         builtin = ""
00048         mod = name
00049         cls = name.title() + "Style"
00050 
00051     try:
00052         mod = __import__('pygments.styles.' + mod, None, None, [cls])
00053     except ImportError:
00054         raise ClassNotFound("Could not find style module %r" % mod +
00055                          (builtin and ", though it should be builtin") + ".")
00056     try:
00057         return getattr(mod, cls)
00058     except AttributeError:
00059         raise ClassNotFound("Could not find style class %r in style module." % cls)
00060 

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Initial value:
00001 {
00002     'default':  'default::DefaultStyle',
00003     'emacs':    'emacs::EmacsStyle',
00004     'friendly': 'friendly::FriendlyStyle',
00005     'colorful': 'colorful::ColorfulStyle',
00006     'autumn':   'autumn::AutumnStyle',
00007     'murphy':   'murphy::MurphyStyle',
00008     'manni':    'manni::ManniStyle',
00009     'perldoc':  'perldoc::PerldocStyle',
00010     'pastie':   'pastie::PastieStyle',
00011     'borland':  'borland::BorlandStyle',
00012     'trac':     'trac::TracStyle',
00013     'native':   'native::NativeStyle',
00014     'fruity':   'fruity::FruityStyle',
00015     'bw':       'bw::BlackWhiteStyle',
00016     'vs':       'vs::VisualStudioStyle',
00017     'tango':    'tango::TangoStyle',
00018 }

Definition at line 17 of file __init__.py.