Did you realise, that the menu option Styles->Weird stuff->rot13 does not
work? It simply produces an error message about wrong number of
parameters. I've created a patch (attached to this mail) which corrects
this. Which leads to another minor problem.
This rot13 plugin is buggy. It does not work with UTF-8 strings. All I get
is an error message if there are non ASCII characters involved. The
function calls descend to a wx-library, which is an shared-object,
compiled natively. It seems this wx-library calls pythons encoding
functions. It would help to pass the option errors="ignore" to those
encoding functions to prevent the error and ignore non ASCII characters.
But how can I do it *without* changing the wx-Code?
Bye
Adalbert
--
Bad cafeteria food landed all the sysadmins in the hospital.
In order to modify text in non-trivial ways, you *have* to know the
encoding.
Other than that, it shouldn't be very difficult to provide an
alternative implementation of ROT13
Fuzzyman
http://www.voidspace.org.uk
> Bye
> Adalbert
>
> ------------------------------------------------------------------------
>
> --- firedrop2/textmanipulator.py.orig 2006-10-15 17:03:43.000000000 +0200
> +++ firedrop2/textmanipulator.py 2006-10-15 17:08:10.000000000 +0200
> @@ -242,7 +242,7 @@
> return "\n%s\n| %s |\n%s" % (frameline,"code block here",frameline,)
>
>
> - def rot13(self, text):
> + def rot13(self, text, markup):
> return text.encode("rot13")
>
>
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 14/10/2006
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.4/476 - Release Date: 14/10/2006
> > This rot13 plugin is buggy. It does not work with UTF-8 strings. All
> > I get is an error message if there are non ASCII characters involved.
> > The function calls descend to a wx-library, which is an
> > shared-object, compiled natively. It seems this wx-library calls
> > pythons encoding functions. It would help to pass the option
> > errors="ignore" to those encoding functions to prevent the error and
> > ignore non ASCII characters. But how can I do it *without* changing
> > the wx-Code?
> Well.... a better option might be to remove ROT13. It's not exactly
> useful.
*lol* That truly might be the better option. I do not claim ROT13 encoding
to be useful. I hoped there is a way to solve this problem. In this vein
I also might have learned more about Python. ;-)
Bye,
Adalbert
--
Without ice cream life and fame are meaningless.