trouble testing for existance of variable

googlePoster scott2237 at yahoo.com
Wed Mar 13 23:40:39 EST 2002


I tried

try:
   ct = vim.exists("colors_name")        # doesn't work when not defined
except vim.error:
   curr_color = "none"

if ct > 0:
   curr_color = vim.eval('colors_name')

and got

AttributeError: 'module' object has no attribute 'exists'

apparently 'exists' is supported in vim, but not python's
portal to it





More information about the Python-list mailing list