Package Bio :: Package dbdefs :: Module _support
[hide private]
[frames] | no frames]

Source Code for Module Bio.dbdefs._support

 1  # Copyright 2002 by Jeffrey Chang.  All rights reserved. 
 2  # This code is part of the Biopython distribution and governed by its 
 3  # license.  Please see the LICENSE file that should have been included 
 4  # as part of this package. 
 5   
 6  import Martel as _M   # make sure not imported into client's namespaces 
 7  import string as _string 
 8   
 9  blank_expr = _M.AssertNot(_M.Re(".")) 
10  html_expr = _M.Rep(_M.Any(_string.whitespace)) + _M.NoCase(_M.Str("<html>")) 
11   
12 -def has_expr(expr):
13 return _M.Rep(_M.AssertNot(expr) + _M.Alt(_M.Re("."), _M.AnyEol())) + expr
14
15 -def has_str(str):
16 return has_expr(_M.Str(str))
17