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
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
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'
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
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
> 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
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:
>
>
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
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...
> >&
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
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
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...
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
>> 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>
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
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
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
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
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
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
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
21 matches
Mail list logo