Extending built-in language (Win 95)

Mark Pope M_Pope at shef.rage.co.uk
Mon Apr 10 17:19:42 CEST 2000

> From: Martin von Loewis [mailto:loewis at informatik.hu-berlin.de]
> Mark Pope <M_Pope at shef.rage.co.uk> writes:
> > I would like to extend the objects available in python, 
> however It is not
> > appropriate to build normal extension dll's.
> Why is it not appropriate? It works perfectly well to add new types in
> an extension module. Many extensions do.

Ah, didn't realise that modules built into the LIB. (I'm new to python)

> The new type becomes only available by means of creation of
> values. Look at the file type. Do you write
> f = file('foo.txt','w')
> ? No, you use open() instead, which just returns an instance of a file
> object. In the xxmodule, xx_new is used to make new instances, which
> can be called from Python as xx.new().

I've added xxmodule to the lib and recompiled. Entering:
a = xx.new()

just gives a name error on xx.

Have I missed something?

(thanks for helping)


More information about the Python-list mailing list