Hi sage-devel,

I just patchbomb-ed a new spkg to trac (ticket #4857). From its
README.txt:

...
The intention of this spkg is to lower the hurdle for developers to
enter
the "Sage world".
If you are among the ones who "learn by reading other people's code",
and/or ever wanted to plug some C library into Sage, but don't know
yet
how to do that, you're right here.

...
Now create either a new work clone of the whole exampleclib directory
by
"exampleclib -clone work", or duplicate the template exampleclib by
"exampleclib -invitro my_own_clib" to create the nucleus of what your
own
C library spkg once will be.

...
Or start Sage by typing "sage", and then in Sage do:

sage: from exampleclib.all import *
sage: ExampleInteger?
Type:           type
Base Class:     <type 'type'>
String Form:    <type
'exampleclib.advanced_topics.exampleclass.prototype.ExampleInteger'>
Namespace:      Interactive
File:           /Users/georgweber/Public/sage/sage-3.2/local/lib/
python2.5/site-packages/exampleclib/advanced_topics/exampleclass/
prototype.so
Docstring:
    x.__init__(...) initializes x; see x.__class__.__doc__ for
signature

sage: ExampleInteger(1001) + ExampleInteger(97)
1098
sage: ExampleInteger(1001) // ExampleInteger(97)
10
sage: ExampleInteger(1) // ExampleInteger(0)
"Division by Zero" in the midst of the example C library code, caught
with Sage standard mechanism in division_sage()
42
sage:

Or start reading the code at $SAGE_ROOT/devel/exampleclib/src/
exampleclib/.
...



It's way from being perfect, so any comments are welcome!

@William:
Hopefully the copyright notice I used throughout is OK for you?!


Cheers,
gsw

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to