On Tue, May 5, 2009 at 12:56 AM, Ton Biegstraaten
<ton.biegstraa...@gmail.com> wrote:
>
> Hi,
> I like to have some advice on how to develop my own code and have a
> proper documentation for it.
> In python all is clear, you write a .py file and supply the docstring
> with proper reST text and code for epydoc, doctest and/or Sphinx. With
> nzmath you can do a lot of math things (and it works also on my phone :-)

Why is the above senence about nzmath here?  It seems like a
subliminal message.

> Sage uses .sage files and worksheets, and the way to document is
> described in the development manual.

You can also just write Python code (with a .py extension) and put

   import sage.all

at the top of your file, then use Sage functions via "sage.all".
Then everything
is just like you describe with Python above.

> With sage -t I can test my code, but can I also use epydoc and/or Sphinx
> for myself, without wanting to build the sage documentation, from within
> sage?

Yes, if you write Python code (in .py files) and use "import sage.all".

> What about the worksheetcode? It looks as if the worksheet is good for
> prototyping, researching (very very handy), but not for development of
> code and unit and doctesting it. You need copy and paste to make .sage
> files, which can then be documented and tested properly, and reloaded in
> the worksheet when necessary.

True.

> So, what is a good procedure for working with sage?

1. Prototype and test code in the notebook.

2. For bigger programs, write the actual code in a .py file once you
know what you're doing.

3. For shorter programs that are much closer to what you might write
in the notebook, just write a .sage file and attach it.

William

>
> At the moment I have 3.4 on a UBUNTU 8.10 system, locally compiled and
> generated docs, I prefer the A4 documentation in stead of the letter size.
>
> regards,
> Ton Biegstraaten
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

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

Reply via email to