Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
dbus
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/dbus/_util.py
import re from exceptions import ValidationException def _validate_interface_or_name(value): elements = value.split('.') if len(elements) <= 1: raise ValidationException("%s must contain at least two elements seperated by a period ('.')"%(value)) validate = re.compile('[A-Za-z][\w_]*') for element in elements: if not validate.match(element): raise ValidationException("Element %s of %s has invalid characters"%(element ,value))