Re: [Python-Dev] www.python.org/doc and docs.python.org hotfixed

2008-10-15 Thread engelbert gruber
On Thu, Oct 2, 2008 at 11:49 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote:

> Long term, remapping even the deep links to the appropriate part of the
> new docs should hopefully be possible.
>
> For the search engine issue, is there any way we can tell robots to
> ignore the rewrite rules so they see the broken links? (although even
> that may not be ideal, since what we really want is to tell the robot
> the link is broken, and provide the new alternative)

wouldnt that be a situation to use hTTP 301/permanently moved headers

all the best
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Running Py2.6 with the -3 option

2008-07-16 Thread engelbert gruber
On Wed, Jul 16, 2008 at 7:02 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:

> On Tue, Jul 15, 2008 at 11:50 PM, engelbert gruber
> <[EMAIL PROTECTED]> wrote:
>> I see mostly ``dict.has_key() not supported in 3.x;`` and sometimes
>> ``DeprecationWarning: callable() not supported in 3.x;`` .
>
> Good catch, Engelbert.
>
> But why would has_key() need a warning when 2to3 will fix it just fine?

for example, if has_key is the only problem in my module, it is
possible to support py22 to py3 with one source which i think would be
quite handy.

and for this the warning is great.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Running Py2.6 with the -3 option

2008-07-15 Thread engelbert gruber
I see mostly ``dict.has_key() not supported in 3.x;`` and sometimes
``DeprecationWarning: callable() not supported in 3.x;`` .

and if someone with commit rights would take i would volunteer to
fix these two on case by case basis, even if it is not my case.

all the best
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.5 issues need resolving in a few days

2006-06-12 Thread engelbert . gruber

On Sat, 10 Jun 2006, Fredrik Lundh wrote:


if all undocumented modules had as much documentation and articles as
ET, the world would be a lot better documented ;-)

I've posted a text version of the xml.etree.ElementTree PythonDoc here:

http://www.python.org/sf/1504046

hopefully, one of the anything-to-latex volunteers will pick this up
shortly; otherwise, I'll deal with that early next week.


i am new to anything-to-latex but gave it a try

elementtree.txt is the modified text version

   1. add a classifier to function and class documentation
   2. remove the Arguments:/Returns: definition lists, first because the
  tool does not handle it in a useful way, second i couldnt find this
  style in lib/*.tex and therefore dont know how it should be handled.

elementtree.text is the version generated from this version (rst2docpy)

cheers:Module: elementtree

:Summary: The xml.etree.ElementTree Module

:Module Type: standard

:Author: Fredrik Lundh <[EMAIL PROTECTED]>

:Version Added: 2.5

:Synopsis: This module provides implementations of the Element and ElementTree

   types, plus support classes.



   A C version of this API is available as xml.etree.cElementTree.



Overview





The Element type is a flexible container object, designed to store

hierarchical data structures in memory. The type can be described as a

cross between a list and a dictionary.



Each element has a number of properties associated with it:



* a tag. This is a string identifying what kind of data

  this element represents (the element type, in other words).

* a number of attributes, stored in a Python dictionary.

* a text string.

* an optional tail string.

* a number of child elements, stored in a Python sequence



To create an element instance, use the Element or SubElement factory

functions.



The ElementTree class can be used to wrap an element

structure, and convert it from and to XML.



Functions

-



Comment(text=None) : funcdesc

  Comment element factory.  This factory function creates a special

  element that will be serialized as an XML comment.



  The comment string can be either an 8-bit ASCII string or a Unicode

  string.



  text: A string containing the comment string.



  Returns: An element instance, representing a comment.



dump(elem) : funcdesc

  Writes an element tree or element structure to sys.stdout.  This

  function should be used for debugging only.



  The exact output format is implementation dependent.  In this

  version, it's written as an ordinary XML file.



  elem: An element tree or an individual element.



Element(tag, attrib={}, **extra) : funcdesc

  Element factory.  This function returns an object implementing the

  standard Element interface.  The exact class or type of that object

  is implementation dependent, but it will always be compatible with

  the _ElementInterface class in this module.



  The element name, attribute names, and attribute values can be

  either 8-bit ASCII strings or Unicode strings.



  tag: The element name.



  attrib: An optional dictionary, containing element attributes.



  extra: Additional attributes, given as keyword arguments.



  Returns: An element instance.



fromstring(text) : funcdesc

  Parses an XML document from a string constant.  Same as XML.



  source: A string containing XML data.



  Returns: An Element instance.



iselement(element) : funcdesc

  Checks if an object appears to be a valid element object.



  element: element instance.



  Returns: A true value if this is an element object.



iterparse(source, events=None) : funcdesc

  Parses an XML document into an element tree incrementally, and reports

  what's going on to the user.



  source: A filename or file object containing XML data.



  events: A list of events to report back.  If omitted, only "end"

  events are reported.



  Returns: A (event, elem) iterator.



parse(source, parser=None) : funcdesc

  Parses an XML document into an element tree.



  source: A filename or file object containing XML data.



  parser: An optional parser instance.  If not given, the

  standard XMLTreeBuilder parser is used.



  Returns: An ElementTree instance



ProcessingInstruction(target, text=None) : funcdesc

  PI element factory.  This factory function creates a special element

  that will be serialized as an XML processing instruction.



  target: A string containing the PI target.



  text: A string containing the PI contents, if any.



  Returns: An element instance, representing a PI.



SubElement(parent, tag, attrib={}, **extra) : funcdesc

  Subelement factory.  This function creates an element instance, and

  appends it to an existing element.



  The element name, attribute names, and attribute values can be

  either 8-bit ASCII strings or Unicode strings.



  parent: The parent element.



  tag: The subelement name.



  attrib: An optional dictionary, containing element attr

Re: [Python-Dev] 2.5 issues need resolving in a few days

2006-06-12 Thread engelbert . gruber

On Sat, 10 Jun 2006, Fredrik Lundh wrote:


if all undocumented modules had as much documentation and articles as
ET, the world would be a lot better documented ;-)

I've posted a text version of the xml.etree.ElementTree PythonDoc here:

http://www.python.org/sf/1504046

hopefully, one of the anything-to-latex volunteers will pick this up
shortly; otherwise, I'll deal with that early next week.


i am new to anything-to-latex but gave it a try

elementtree.txt is the modified text version

  1. add a classifier to function and class documentation
  2. remove the Arguments:/Returns: definition lists, first because the
 tool does not handle it in a useful way, second i couldnt find this
 style in lib/*.tex and therefore dont know how it should be handled.

elementtree.text is the version generated from this version (rst2docpy)

cheers:Module: elementtree

:Summary: The xml.etree.ElementTree Module

:Module Type: standard

:Author: Fredrik Lundh <[EMAIL PROTECTED]>

:Version Added: 2.5

:Synopsis: This module provides implementations of the Element and ElementTree

   types, plus support classes.



   A C version of this API is available as xml.etree.cElementTree.



Overview





The Element type is a flexible container object, designed to store

hierarchical data structures in memory. The type can be described as a

cross between a list and a dictionary.



Each element has a number of properties associated with it:



* a tag. This is a string identifying what kind of data

  this element represents (the element type, in other words).

* a number of attributes, stored in a Python dictionary.

* a text string.

* an optional tail string.

* a number of child elements, stored in a Python sequence



To create an element instance, use the Element or SubElement factory

functions.



The ElementTree class can be used to wrap an element

structure, and convert it from and to XML.



Functions

-



Comment(text=None) : funcdesc

  Comment element factory.  This factory function creates a special

  element that will be serialized as an XML comment.



  The comment string can be either an 8-bit ASCII string or a Unicode

  string.



  text: A string containing the comment string.



  Returns: An element instance, representing a comment.



dump(elem) : funcdesc

  Writes an element tree or element structure to sys.stdout.  This

  function should be used for debugging only.



  The exact output format is implementation dependent.  In this

  version, it's written as an ordinary XML file.



  elem: An element tree or an individual element.



Element(tag, attrib={}, **extra) : funcdesc

  Element factory.  This function returns an object implementing the

  standard Element interface.  The exact class or type of that object

  is implementation dependent, but it will always be compatible with

  the _ElementInterface class in this module.



  The element name, attribute names, and attribute values can be

  either 8-bit ASCII strings or Unicode strings.



  tag: The element name.



  attrib: An optional dictionary, containing element attributes.



  extra: Additional attributes, given as keyword arguments.



  Returns: An element instance.



fromstring(text) : funcdesc

  Parses an XML document from a string constant.  Same as XML.



  source: A string containing XML data.



  Returns: An Element instance.



iselement(element) : funcdesc

  Checks if an object appears to be a valid element object.



  element: element instance.



  Returns: A true value if this is an element object.



iterparse(source, events=None) : funcdesc

  Parses an XML document into an element tree incrementally, and reports

  what's going on to the user.



  source: A filename or file object containing XML data.



  events: A list of events to report back.  If omitted, only "end"

  events are reported.



  Returns: A (event, elem) iterator.



parse(source, parser=None) : funcdesc

  Parses an XML document into an element tree.



  source: A filename or file object containing XML data.



  parser: An optional parser instance.  If not given, the

  standard XMLTreeBuilder parser is used.



  Returns: An ElementTree instance



ProcessingInstruction(target, text=None) : funcdesc

  PI element factory.  This factory function creates a special element

  that will be serialized as an XML processing instruction.



  target: A string containing the PI target.



  text: A string containing the PI contents, if any.



  Returns: An element instance, representing a PI.



SubElement(parent, tag, attrib={}, **extra) : funcdesc

  Subelement factory.  This function creates an element instance, and

  appends it to an existing element.



  The element name, attribute names, and attribute values can be

  either 8-bit ASCII strings or Unicode strings.



  parent: The parent element.



  tag: The subelement name.



  attrib: An optional dictionary, containing element attribut

Re: [Python-Dev] Symbol page for Language Reference Manual Index

2006-06-08 Thread engelbert . gruber
On Thu, 8 Jun 2006, A.M. Kuchling wrote:

> On Thu, Jun 08, 2006 at 12:18:23AM -0400, Terry Reedy wrote:
>> I am willing to do perhaps half the work needed to produce such in time for
>> the 2.5 release.  In particular, I am willing to write a plain text file
>> listing symbols (in ascii sort order) and section numbers, in an agreed-on
>> format, if the idea is approved and someone else agrees to convert section
>> numbers to page links and do the necessary latex/html formatting (with a
>> Python script?).

> There's a pool of volunteers for LaTeX formatting, so someone will
> certainly handle that step.

would rst2docpy be of any help
(see http://docutils.sourceforge.net/sandbox/docpy-writer/)

although the text below doesnt sound like it could do it.

>> [I just realized that some links need to be within-page rather than to the
>> top of the page and that I can cut and paste additional info if I find the
>> appropriate regular index entry, such as
>> http://docs.python.org/ref/parenthesized.html#l2h-342 for 5.2.3.  But I
>> will work this sort of thing out with whoever formats.]
>
> It's probably easiest to make a list of symbols and the corresponding
> section names and optionally a snippet of the paragraph that should be
> the target of the link. Section numbers like 5.2.3 and link anchors
> like #l2h-342 are generated by LaTeX2HTML and not visible when you're
> editing the source text.

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] rest2latex - pydoc writer - tables

2006-05-08 Thread engelbert . gruber
On Fri, 28 Apr 2006, Thomas Heller wrote:

> I must work on the docs themselves, so I currently have only two things:
>
> - the table in the ctypes tutorial has a totally different look than the other
>   tables in the docs.  Compare
>   http://docs.python.org/dev/lib/ctypes-simple-data-types.html
>   with
>   http://docs.python.org/dev/lib/module-struct.html

could you try docutils.sf.net sandbox pydoc-writer checkout
(svn or the snapshot or tomorrow
  http://docutils.sourceforge.net/sandbox/pydoc-writer/mkpydoc.py)

> - feature request: it would be very nice if it were possible to generate links
>   into the index for functions and types from the rest sources.

into the index means what ? into the module index ?

cheers

-- 
  --- Engelbert Gruber ---+
   SSG Fintl,Gruber,Lassnig  /
   A6170 Zirl   Innweg 5b   /
   Tel. ++43-5238-93535 ---+
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rest2latex - was: Re: Raising objections

2006-04-28 Thread engelbert . gruber
i commited mkpydoc to docutils/sandbox/pydoc-writer with some small 
modifications

   - Patch for python 2.3.
   - Filenames from command line.
   - Guard definition of ``locallinewidth`` against redefinition.
   - latex needs definition of ``locallinewidth``.

1. there isnt a copyright in mkpydoc.py, could everybody involved agree on
PD so it can go into docutils.
2. edloper/docpy is another possibility
3. as is http://www.rexx.com/~dkuhlman/rstpythonlatex_intro.html
4. AND

* An unpatched latex2html is unable to handle ``longtable`` options.
   Maybe remove the ``[c]`` and put the longtable into a center
   environment, but python doc uses ``tablei`` and `` longtablei``.
* (th) the table in the ctypes tutorial has a totally different look than
   the other tables in the docs.  Compare
   `ctypes `_
   with `std pydoc `__ .

   see previous *
* (th) feature request: it would be very nice if it were possible to
   generate links into the index for functions and types from the rest sources.
* Document ``markup.py`` and ``missing.py``.
* Title, author, ... are hardcoded.

and i am on workshop next week, so please be patient and i dont know if 
this will ever work.

-- 
  contributions welcome --- d.goodger
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] rest2latex - was: Re: Raising objections

2006-04-28 Thread engelbert . gruber

On Fri, 28 Apr 2006, Thomas Heller wrote:


Gerhard Häring wrote:

Thomas Heller wrote:

[...] I'm now happy with the tool that converts the ctypes tutorial
from reST to LaTeX,
I will later (today or tomorrow) commit that into Python SVN.


Did you commit that already? Alternatively, can you send it to me, please?

-- Gerhard


I meant the ctypes tutorial in latex format, not the tool itself.

Anyway, the tool is mkydoc.py, in combination with missing.py:

http://svn.python.org/view/external/ctypes-0.9.9.6/docs/manual/

I'm not sure it is ready for public consumption ;-).


from what i saw it is not, because paths are hardcoded, but aside from 
this it should be usable and i am willing to take it up and into docutils, 
but this requires feedback


cheers
--___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] SoC proposal: "fix some old, old bugs in sourceforge"

2006-04-25 Thread engelbert . gruber
On Tue, 25 Apr 2006, A.M. Kuchling wrote:

> On Mon, Apr 24, 2006 at 09:45:41PM -0700, Neal Norwitz wrote:
>> hard bugs to fix.  I guess there are also a lot that we can't
>> reproduce and the submitter is MIA.  Those might be easier.  Ping them
>> if not reproducible, if no response in a month, we close.
>
> The last time there was a thread suggesting closing old bugs, wasn't
> the consensus to leave them open for information purposes?

maybe a note or special state "off" (open-for-fun) would be helpful for 
unwary newbies, looking for there little feat.

cheers
-- 
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com