Olivier Lauzanne  committed 3bce8f5


  • Participants
  • Parent commits b45eaa0

Comments (0)

Files changed (2)

File pyquery/README.txt

 It can be used for many purposes, one idea that I might try in the future is to
 use it for templating with pure http templates that you modify using pyquery.
+I can also be used for web scrapping or for theming applications with
+The project is being actively developped on `Bitbucket`_ and I have the policy
+of giving push access to anyone who wants it and then to review what he does.
+So if you want to contribute just email me.
+The Sphinx documentation is available on ``_.
+.. _deliverance:
+.. _bitbucket:
 .. contents::
     'you know Python rocks'
 You can use some of the pseudo classes that are available in jQuery but that
-are not standard in css such as :first :last :even :odd :eq :lt :gt::
+are not standard in css such as :first :last :even :odd :eq :lt :gt :checked
+:selected :file::
     >>> d('p:first')
     >>> d('a[title="W3C Activities"]').attr('href')
+Using different parsers
+By default pyquery uses the lxml xml parser and then if it doesn't work goes on
+to try the html parser. It can sometimes be problematic when parsing xhtml pages
+because the parser will not raise an error but give an unusable tree.
+You can also choose which parser to use explicitly::
+   >>> pq('<p>toto</p>', parser='html')
+   [<html>]
+   >>> pq('<p>toto</p>', parser='xml')
+   [<p>]
 Other documentations
-For more documentation about the API use the jquery website
+First there is the Sphinx documentation `here`_.
+Then for more documentation about the API you can use the jquery website
+The reference I'm now using for the API is ... the `color cheat sheet`_.
+Then you can always look at the `code`_.
-The reference I'm now using for the API is ... the color cheat sheet
+.. _code:
+.. _here:
+.. _color cheat sheet:
-- SELECTORS: it works fine but missing all the :xxx (:first, :last, ...) can be
-  done by patching lxml.cssselect
+- SELECTORS: still missing some jQuery pseudo classes (:radio, :password, ...)
 - CSS: done
 - HTML: done
-- MANIPULATING: did all but the "wrap" methods
-- TRAVERSING: did a few
+- MANIPULATING: missing the wrapAll and wrapInner methods
+- TRAVERSING: about half done
 - EVENTS: nothing to do with server side might be used later for automatic ajax
 - CORE UI EFFECTS: did hide and show the rest doesn't really makes sense on
   server side

File pyquery/

         elements = []
         self._base_url = None
         parser = kwargs.get('parser')
+        if 'parser' in kwargs:
+            del kwargs['parser']
         if 'parent' in kwargs:
             self._parent = kwargs.pop('parent')