home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Inkscape / Inkscape-0.48.2-1-win32.exe / share / extensions / text_flipcase.py < prev    next >
Text File  |  2011-07-08  |  347b  |  20 lines

  1. import chardataeffect, inkex, string
  2.  
  3. class C(chardataeffect.CharDataEffect):
  4.  
  5.   def process_chardata(self,text, line, par):
  6.     r = ""
  7.     for i in range(len(text)):
  8.       c = text[i]
  9.       if c.islower():
  10.         r = r + c.upper()
  11.       elif c.isupper():
  12.         r = r + c.lower()
  13.       else:
  14.         r = r + c
  15.  
  16.     return r
  17.  
  18. c = C()
  19. c.affect()
  20.