Applications Google
Menu principal

Post a Comment On: Only Python

"docpicture: working ... and a query."

7 Comments -

1 – 7 of 7
Anonymous Anonymous said...

help() uses pydoc to generate its output. It's in the standard library.

1:15 AM

Blogger Unknown said...

Except for the "Help on ... in module ...:" part, pydoc.TextDoc.document is doing exactly what you're looking for. You'd need to replicate the logic of pydoc.plain if you want boldface removed, though:

re.sub('.\b', '', pydoc.TextDoc().document(obj))

8:05 AM

Blogger André Roberge said...

@Robert: Yes, I got that. I also found out that doing as I wrote in the update disables the normal help. So it's a simple matter of temporarily re-assign pydoc.pager and pydoc.TextDoc.bold, retrieving the value, and re-assigning it back.

Easy! I love Python! :-)

8:36 AM

Anonymous Anonymous said...

I come back with the aafigure suggestion; I rendered the README and putted it on my own website: http://www.oleastre.be/export/aafigure/README.html

That said, it's a really different approach than yours.

8:47 PM

Blogger André Roberge said...

oleastre: This is really neat!. It is not really that different from what I want to do. In fact, it could probably be adapted/included in the approach I have been using. One main difference is that your images are separate svg files whereas I include mine as inline definitions.

You can have a look at a page that was generated dynamically by my program:

http://andre.roberge.googlepages.com/turtle_test.xhtml

I need to change the syntax for the drawing a bit (there's no need to specify something like "-> turtle(10)"; the second turtle declaration is redundant).

I'll try to look at your code later this week - assuming I can find it in the docutils sandbox. If you want to have a peak at my code (such as it is at the moment), feel free to send me an email. andre dot roberge at gmail dot com

9:04 PM

Anonymous Anonymous said...

Please, do not misattribute the code, it's not mine, it's original creator is Chris Liechti.

I just used aafigure it in a project for some docs, I was impressed by this small tool and wanted to let you know about it.

Alas, it needs some love, and does not work out of the box with recent releases of docutils (do not support directives declaration as classes)

this aafigure project needs some love, but your approach seems also interesting.

I hope I will have some time soon to have a look at both...

11:46 AM

Blogger André Roberge said...

@oleastre: I sent an email to Chris Liechti thinking it was you.

I do plan to try and integrate a version of aafigure inside docpicture. Feel free to email me directly if you wish to pursue this conversation.

12:16 PM

Spammers: none shall pass.
You can use some HTML tags, such as <b>, <i>, <a>

Comments on this blog are restricted to team members.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot