# Created by Leo from: C:\Development\Python22\Lib\site-packages\vb2py\vb2py.leo
try:
import vb2py.extensions as extensions
except ImportError:
import extensions
class TranslateAttributes(extensions.SystemPluginREPlugin):
"""Plugin to convert attribute names from VB to Pythoncard
There are attribute like 'Text' and 'Visible' which are in lower
case in Pythoncard and others are simply different. We do the conversion
here.
Note that this means we will convert these names even if they don't belong
to controls - this is unfortunate but still safe as we do the conversion
consistently.
"""
name = "Translate VB attributes to Pythoncard ones"
post_process_patterns = (
(r"\.Text\b", ".text"),
(r"\.Caption\b", ".text"),
(r"\.Visible\b", ".visible"),
(r"\.BackColor\b", ".backgroundColor"),
(r"\.ToolTipText\b", ".ToolTipText"),
(r"\.AddItem\b", ".append"),
)
|