Skip to Search
Skip to Navigation
Skip to Content
Community
|
Code
|
Docs
|
Downloads
▼
Perl
Python
Tcl
Komodo IDE
|
more
▼
Lists
Support
PPM Index
PyPM Index
Welcome, guest
|
Sign In
|
My Account
|
Store
|
Cart
ActiveState Code
»
Recipes
Languages
Tags
Authors
Sets
Most viewed recipes by Steven D'Aprano
Tags:
Recipe 1 to 20 of 22
« Prev
1
2
Next »
63
k
views
2
score
Get single keypress
Python
/
getch
,
key
/
by
Steven D'Aprano
(12 years ago)
58
k
views
2
score
Guard against an exception in the wrong place
Python
/
context
,
exception
,
guard
,
manager
/
by
Steven D'Aprano
(6 years ago, revision 2)
50
k
views
2
score
Integer square root function
Python
/
integer
,
isqrt
,
math
,
mathematics
,
maths
,
root
,
square
/
by
Steven D'Aprano
(12 years ago)
23
k
views
2
score
Safely and atomically write to a file
Python
/
atomic
,
file
,
save
/
by
Steven D'Aprano
(8 years ago, revision 3)
20
k
views
2
score
Approximately Equal
Python
/
comparisons
,
distance
,
math
,
maths
,
numeric
,
string
/
by
Steven D'Aprano
(14 years ago)
16
k
views
1
score
Search sequences for sub-sequence
Python
/
find
,
searching
,
sequence
,
string
,
sublist
,
substring
/
by
Steven D'Aprano
(12 years ago)
16
k
views
3
score
Method chaining or cascading
Python
/
cascade
,
cascading
,
chaining
,
method
/
by
Steven D'Aprano
(7 years ago)
15
k
views
1
score
Generate equally-spaced floats
Python
/
float
,
range
,
spread
/
by
Steven D'Aprano
(12 years ago)
14
k
views
3
score
Benchmark code with the with statement
Python
/
benchmark
,
speed
,
time
,
timer
/
by
Steven D'Aprano
(12 years ago)
14
k
views
2
score
Floating point range
Python
/
float
,
math
,
maths
,
range
/
by
Steven D'Aprano
(14 years ago)
12
k
views
2
score
Calculate the MRO of a class
Python
/
c3
,
classes
,
method
,
mro
,
order
,
resolution
/
by
Steven D'Aprano
(12 years ago)
12
k
views
1
score
Collection Pipeline in Python
Python
/
bash
,
filter
,
map
,
pipe
,
pipline
/
by
Steven D'Aprano
(8 years ago)
10
k
views
1
score
Yet Another NamedTuple
Python
/
shortcuts
/
by
Steven D'Aprano
(9 years ago)
9
k
views
2
score
dualmethod descriptor
Python
/
decorator
,
descriptor
,
method
/
by
Steven D'Aprano
(14 years ago, revision 3)
8
k
views
2
score
Call out to an external editor
Python
/
editing
,
editor
,
external
,
text
/
by
Steven D'Aprano
(9 years ago, revision 2)
6
k
views
4
score
Enhancing dir() with globs
Python
/
dir
,
filter
,
glob
,
globbing
/
by
Steven D'Aprano
(12 years ago)
6
k
views
1
score
Using ChainMap for embedded namespaces
Python
/
chainmap
,
metaclass
,
namespace
/
by
Steven D'Aprano
(11 years ago)
6
k
views
0
score
Locate and import Python's standard regression tests
Python
/
import
,
path
,
regression
,
testing
/
by
Steven D'Aprano
(13 years ago)
6
k
views
1
score
Validate ACNs (Australian Company Numbers)
Python
/
acn
,
validation
/
by
Steven D'Aprano
(12 years ago)
5
k
views
1
score
Validate ABNs (Australian Business Numbers)
Python
/
abn
,
validation
/
by
Steven D'Aprano
(12 years ago)
Recipe 1 to 20 of 22
« Prev
1
2
Next »
View
popular
,
latest
,
top-rated
or
most viewed
Feed of the most viewed recipes by Steven D'Aprano
Top-rated recipes
Enhancing dir() with globs
(Python)
Method chaining or cascading
(Python)
Benchmark code with the with state…
(Python)
Guard against an exception in the …
(Python)
Safely and atomically write to a f…
(Python)
Call out to an external editor
(Python)
Get single keypress
(Python)
Integer square root function
(Python)
Calculate the MRO of a class
(Python)
map_longest and map_strict
(Python)
x
Undo