Cannot call a s-lang method in an object
Marco Herrn
herrn at gmx.net
Mon Oct 21 16:10:23 EDT 2002
More information about the Python-list mailing list
Mon Oct 21 16:10:23 EDT 2002
- Previous message (by thread): Spell-check engine?
- Next message (by thread): Cannot call a s-lang method in an object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <EPTs9.5433$q81.3006 at fe05>, Steve Holden wrote: > > The exception that is being raised is almost certainly because you are > defining a method with no arguments. Since the interpreter will always > provide the instance as the first argument to a method call, it will be > complaining about a one-argument call to a no-argument function. You should > try first of all redefining your method as shown below. > > class Test: > def out(self): > SLsmg_write_string("test") > > > However, as you have discovered it's more difficult to test in a framework > that doesn't allow you to see the standard error output. Perhaps you need to > consider running all this inside a try/except that will give you better > access to the error messages. Ohh, thanks. Of course this was the problem. I often forget the self parameter. Normally I know it when I see the error message :-) It works now. Thanks. Marco -- Marco Herrn herrn at gmx.net (GnuPG/PGP-signed and crypted mail preferred) Key ID: 0x94620736
- Previous message (by thread): Spell-check engine?
- Next message (by thread): Cannot call a s-lang method in an object
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list