Skip to content

Commit 34ab3e8

Browse files
committed
many changes
1 parent abc98d4 commit 34ab3e8

File tree

26 files changed

+3211
-0
lines changed

26 files changed

+3211
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# Removing all tags from HTML and keeping only text
3+
4+
## Using `w3lib` which is installed with `scrapy`
5+
6+
import w3lib
7+
8+
html = '<a>A</a><div><span>B</span></div>'
9+
10+
text = w3lib.html.remove_tags(html)
11+
12+
print(text)
13+
14+
15+
## Using `BeautifulSoup`
16+
17+
Found in [NLTK Book: 3. Processing Raw Text - Dealing with HTML](http://www.nltk.org/book/ch03.html)
18+
19+
from bs4 import BeautifulSoup
20+
21+
html = '<a>A</a><div><span>B</span></div>'
22+
23+
text = BeautifulSoup(html, 'html.parser').get_text()
24+
25+
print(text)

easygui/timerbox/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
`timerbox` based on `EasyGui 0.96`.
3+
4+
It has new argument `time=seconds` and it closes messagebox after that time.
5+
6+
---
7+
8+
In `example.py`
9+
10+
11+
timerbox('Time to the end of the World', 'Countdown', time=5)
12+
13+
14+
![#1](images/screenshot-1.png?raw=true)
15+
16+
result = timerbox('Last change to save the World', 'Countdown', choices=['BUM!', 'Save the World'], time=5)
17+
18+
![#1](images/screenshot-2.png?raw=true)
19+
20+
timerbox('Time to BUM !!!', 'Countdown', choices=['OK'], time=5)
21+
22+
![#1](images/screenshot-3.png?raw=true)
23+
24+
timerbox('You saved the World !', 'Countdown', choices=['OK'], time=5)
25+
26+
![#1](images/screenshot-4.png?raw=true)

0 commit comments

Comments
 (0)