Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
python [2019/01/06 10:04]
root [Python Visualization]
python [2019/01/11 00:17] (current)
root [Logging Config via ini File]
Line 110: Line 110:
 </​code>​ </​code>​
  
 +
 +== Logging with - Loguru == 
 +
 +== Xpath with Parcel == 
 +
 +- Xpath is supported with libxml2 which is fast but has binary dependencies that can be a problem on windows ​
 +- A functional alternative is Parsel ​
 +
 +
 +
 +<code python> ​
 +from parsel import Selector
 +
 +sel = Selector(text=u"""<​html>​
 +        <​body>​
 +            <​h1>​Hello,​ Parsel!</​h1>​
 +            <ul>
 +                <​li><​a href="​http://​example.com">​Link 1</​a></​li>​
 +                <​li><​a href="​http://​scrapy.org">​Link 2</​a></​li>​
 +            </ul
 +        </​body>​
 +        </​html>"""​)
 +for item in sel.xpath('​.//​a/​@href'​):​
 +    print (item.get())
 +</​code> ​   ​
 +
 +will print 
 +
 +<​code> ​
 +http://​example.com
 +http://​scrapy.org
 +</​code>​
 == Static Typing - MyPy ==  == Static Typing - MyPy == 
 http://​blog.zulip.org/​2016/​10/​13/​static-types-in-python-oh-mypy/​ http://​blog.zulip.org/​2016/​10/​13/​static-types-in-python-oh-mypy/​
 
python.txt · Last modified: 2019/01/11 00:17 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd