Re: ANN: Docpicture 0.2

2008-11-02 Thread nopsidy
André wrote: Docpicture 0.2 has been released. You can download it from http://code.google.com/p/docpicture/ Docpicture's goal is to enable embedding pictures inside Python docstrings using some custom domain specific language (dsl). docpicture includes a plugin architecture enabling use

ANN: Docpicture 0.2

2008-10-31 Thread André
Docpicture 0.2 has been released. You can download it from http://code.google.com/p/docpicture/ Docpicture's goal is to enable embedding pictures inside Python docstrings using some custom domain specific language (dsl). docpicture includes a plugin architecture enabling users to extend

Re: docpicture

2008-10-17 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Pete Forman wrote: > Maybe someone would like to play with the data URL scheme (RFC 2397) > to meet the OP's desire to embed the image. AFAIK a downside is that > MS are only starting to support that in IE8. Firefox, Konqueror and Safari already support it. So it'

Re: docpicture

2008-10-15 Thread Pete Forman
Scott David Daniels <[EMAIL PROTECTED]> writes: > or you could even use: > ''' > 1234567890ABCDEF... > ''' > A comment _not_ a docstring (only found by scanning the source). > which is easy enough to hunt for. -1 for XML based syntax, we should instead look to reST. It al

Re: docpicture

2008-10-14 Thread bearophileHUGS
André: > A more complete example is now available at > http://code.activestate.com/recipes/576538/ Nice. >The idea for this recipe was mentioned on the Python mailing list as something >desirable and apparently done by someone< That someone has a nickname you can use, I am known in the cookboo

Re: docpicture

2008-10-14 Thread Aaron "Castironpi" Brady
> as possible, just 1 if possible. > For the encoding/decoding you can use str.encode("base64") and > str.decode("base64"), you don't need to import modules. > > Bye, > bearophile +.5 docpicture. For encoding, it might read in from a file, try multiple

Re: docpicture

2008-10-14 Thread André
On Oct 14, 1:56 pm, [EMAIL PROTECTED] wrote: > André: > > > Ok, the following is my first attempt at implementing this idea. > > I suggest you to change the program you use to encode your images, > because it's 1000 bytes, while with my program the same 256 colors > image needs just 278 bytes: > >

Re: docpicture

2008-10-14 Thread bearophileHUGS
André: > Ok, the following is my first attempt at implementing this idea. I suggest you to change the program you use to encode your images, because it's 1000 bytes, while with my program the same 256 colors image needs just 278 bytes: iVBORw0KGgoNSUhEUgAAABYeCAMfOR5kBGdBTUEAAL GP

Re: docpicture

2008-10-14 Thread André
t;> few lines of hex: > > >> Help on function spam: > > >> spam(...) > >>     spam spam spam spam spam spam > >>     spam spam spam spam with a fried egg on top > > >>     === begin docpicture === > >>     1234567890ABCDEF... > >&

Re: docpicture

2008-10-14 Thread bearophileHUGS
Steven D'Aprano: > Unless bearophile is willing to share his code, There's no code: all I do is written in my post, and so far I have done it "manually" :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: docpicture

2008-10-14 Thread Steven D'Aprano
pam spam spam spam spam >> spam spam spam spam with a fried egg on top >> >> === begin docpicture === >> 1234567890ABCDEF... >> === end docpicture === >> Or similar. I'm sure people will cope, especially since it should be >> relatively

Re: docpicture

2008-10-14 Thread Scott David Daniels
Steven D'Aprano wrote: And if not, it's no big deal. Your help string has a clearly labeled few lines of hex: Help on function spam: spam(...) spam spam spam spam spam spam spam spam spam spam with a fried egg on top === begin docpicture === 1234567890ABCDEF...

Re: docpicture

2008-10-13 Thread Steven D'Aprano
and ignore it. And if not, it's no big deal. Your help string has a clearly labeled few lines of hex: Help on function spam: spam(...) spam spam spam spam spam spam spam spam spam spam with a fried egg on top === begin docpicture === 1234567890ABCDEF 1234567890ABCDEF

Re: docpicture

2008-10-13 Thread skip
>> Nothing. It's just a doc string containing a bunch of hex codes. Doc >> strings are ignored by the interpreter (AIUI). Benjamin> I mean what happens when you type help() into the interactive Benjamin> console on the command line? You will see the docstrings, and Benjamin>

Re: docpicture

2008-10-13 Thread Joe Strout
On Oct 13, 2008, at 2:43 PM, Benjamin Kaplan wrote: I mean what happens when you type help() into the interactive console on the command line? You will see the docstrings, and there will be a whole bunch of random hex characters there. Good point. It might be better put in a specially-tag

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 2:48 PM, Joe Strout <[EMAIL PROTECTED]> wrote: > On Oct 13, 2008, at 12:09 PM, Benjamin Kaplan wrote: > > Heck, if you go to the point of including a docpicture module, might as >> well >> just support the feature in IDLE... Other IDEs

Re: docpicture

2008-10-13 Thread skip
Benjamin> So, the IDEs will support it. what happens when you run the Benjamin> interpreter from the command line? Probably get ignored. What else would you propose? It's not executable code anyway, just a special comment or portion of a docstring. S -- http://mail.python.org/mailman/l

Re: docpicture

2008-10-13 Thread Benjamin Kaplan
On Mon, Oct 13, 2008 at 1:43 PM, <[EMAIL PROTECTED]> wrote: > >Steven> I can't imagine Python having direct syntactic support for it, >Steven> but I don't see any reason why the standard library couldn't >Steven> some day grow a

Re: docpicture

2008-10-13 Thread skip
Steven> I can't imagine Python having direct syntactic support for it, Steven> but I don't see any reason why the standard library couldn't Steven> some day grow a "docpicture" module, complete with a tiny (?) Steven> Tkinter app to display

Re: docpicture

2008-10-13 Thread Steven D'Aprano
o store diagrams in my code. > I don't need to do > that often enough, so I think it doesn't deserve to become supported by > Python itself. I can't imagine Python having direct syntactic support for it, but I don't see any reason why the standard library couldn&#x

docpicture

2008-10-13 Thread bearophileHUGS
In Python code that processes some geometrical data I want to explain what each variable like w1, w2, h2, h3, etc, means in the geometrical objects. In such situation I don't use longer and more clear variable names because in geometry I'm used to use short vertex/line/length names, finding them mo