MCPcopy Create free account
hub / github.com/gawel/pyquery / xpath_file_pseudo

Method xpath_file_pseudo

pyquery/cssselectpatch.py:177–188  ·  view source on GitHub ↗

Matches all input elements of type file:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('input:file') [ ] ..

(self, xpath)

Source from the content-addressed store, hash-verified

175 return xpath
176
177 def xpath_file_pseudo(self, xpath):
178 """Matches all input elements of type file::
179
180 >>> from pyquery import PyQuery
181 >>> d = PyQuery('<div><input type="file"/></div>')
182 >>> d('input:file')
183 [<input>]
184
185 ..
186 """
187 xpath.add_condition("@type = 'file' and name(.) = 'input'")
188 return xpath
189
190 def xpath_input_pseudo(self, xpath):
191 """Matches all input elements::

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected