I am trying to create an own plugin to search/replace certain ascii chars in a textfile. So far, I have got a sample coding (see below) , but entering this (Menu Plugin - Make Plugin) I am receiving following error message after confirming the box:
Incorrect Item: ['from cudatext import *'].
Even if I have a look at a imported plugin (which is working and copy&paste some other lines as e.g. 'import cudatext as app' I will receive this as an error message as well.
I assume that something is missing ... ? Nevertheless: can anyone tell me what I have to do to get this plugin working ?
Thank you in advance for any help.
btw I am totally new to Cupatext ... and did not found any howto or something else.
Code I have:
Code: Select all
from cudatext import *
class Command:
def run(self):
s=ed.get_text_all()
for i in range(32):
if not i in [10,13,9]:
s=s.replace(chr(i), '')
ed.set_text_all(s)