Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Obscure only actual windows for i3lock
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab
import os
import xcb
from xcb.xproto import *
from PIL import Image
XCB_MAP_STATE_VIEWABLE = 2
def screenshot():
os.system('import -window root /tmp/.i3lock.png')
def xcb_fetch_windows():
""" Returns an array of rects of currently visible windows. """
x = xcb.connect()
root = x.get_setup().roots[0].root
rects = []
# iterate through top-level windows
for child in x.core.QueryTree(root).reply().children:
# make sure we only consider windows that are actually visible
attributes = x.core.GetWindowAttributes(child).reply()
if attributes.map_state != XCB_MAP_STATE_VIEWABLE:
continue
rects += [x.core.GetGeometry(child).reply()]
return rects
def obscure_image(image):
""" Obscures the given image. """
size = image.size
pixel_size = 9
image = image.resize((size[0] / pixel_size, size[1] / pixel_size), Image.NEAREST)
image = image.resize((size[0], size[1]), Image.NEAREST)
return image
def obscure(rects):
""" Takes an array of rects to obscure from the screenshot. """
image = Image.open('/tmp/.i3lock.png')
for rect in rects:
area = (
rect.x, rect.y,
rect.x + rect.width,
rect.y + rect.height
)
cropped = image.crop(area)
cropped = obscure_image(cropped)
image.paste(cropped, area)
image.save('/tmp/.i3lock.png')
def lock_screen():
os.system('i3lock -u -i /tmp/.i3lock.png')
if __name__ == '__main__':
# 1: Take a screenshot.
screenshot()
# 2: Get the visible windows.
rects = xcb_fetch_windows()
# 3: Process the screenshot.
obscure(rects)
# 4: Lock the screen
lock_screen()
@Anachron
Copy link

Anachron commented Mar 17, 2016

This is a pretty awesome idea!

@piousminion
Copy link

piousminion commented Aug 29, 2016

Unfortunately this is all I get. :/
Traceback (most recent call last): File ".scripts/lock2.sh", line 69, in <module> rects = xcb_fetch_windows() File ".scripts/lock2.sh", line 24, in xcb_fetch_windows for child in x.core.QueryTree(root).reply().children: xcb.xproto.BadWindow: <xcb.xproto.WindowError object at 0x7f10510f1a70>
Here's the stack trace.
execve(".scripts/lock2.sh", [".scripts/lock2.sh"], [/* 25 vars */]) = 0 brk(NULL) = 0x256d000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=186462, ...}) = 0 mmap(NULL, 186462, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f63cfcd2000 close(3) = 0 open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\3\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=1951744, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f63cfcd0000 mmap(NULL, 3791152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f63cf740000 mprotect(0x7f63cf8d5000, 2093056, PROT_NONE) = 0 mmap(0x7f63cfad4000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x194000) = 0x7f63cfad4000 mmap(0x7f63cfada000, 14640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f63cfada000 close(3) = 0 arch_prctl(ARCH_SET_FS, 0x7f63cfcd1480) = 0 mprotect(0x7f63cfad4000, 16384, PROT_READ) = 0 mprotect(0x606000, 4096, PROT_READ) = 0 mprotect(0x7f63cfd00000, 4096, PROT_READ) = 0 munmap(0x7f63cfcd2000, 186462) = 0 brk(NULL) = 0x256d000 brk(0x258e000) = 0x258e000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=1966480, ...}) = 0 mmap(NULL, 1966480, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f63cf55f000 close(3) = 0 execve("/usr/local/sbin/python2.7", ["python2.7", ".scripts/lock2.sh"], [/* 25 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/local/bin/python2.7", ["python2.7", ".scripts/lock2.sh"], [/* 25 vars */]) = -1 ENOENT (No such file or directory) execve("/usr/bin/python2.7", ["python2.7", ".scripts/lock2.sh"], [/* 25 vars */]) = 0 brk(NULL) = 0x5562166b2000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=186462, ...}) = 0 mmap(NULL, 186462, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7f30da5000 close(3) = 0 open("/usr/lib/libpython2.7.so.1.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\r\4\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0555, st_size=2086848, ...}) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30da3000 mmap(NULL, 4099392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f307c8000 mprotect(0x7f7f30951000, 2093056, PROT_NONE) = 0 mmap(0x7f7f30b50000, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x188000) = 0x7f7f30b50000 mmap(0x7f7f30b90000, 134464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7f30b90000 close(3) = 0 open("/usr/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=143432, ...}) = 0
mmap(NULL, 2212880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f305ab000
mprotect(0x7f7f305c3000, 2093056, PROT_NONE) = 0
mmap(0x7f7f307c2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f7f307c2000
mmap(0x7f7f307c4000, 13328, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7f307c4000
close(3) = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\3\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1951744, ...}) = 0
mmap(NULL, 3791152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f3020d000
mprotect(0x7f7f303a2000, 2093056, PROT_NONE) = 0
mmap(0x7f7f305a1000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x194000) = 0x7f7f305a1000
mmap(0x7f7f305a7000, 14640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7f305a7000
close(3) = 0
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14608, ...}) = 0
mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f30009000
mprotect(0x7f7f3000b000, 2097152, PROT_NONE) = 0
mmap(0x7f7f3020b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f7f3020b000
close(3) = 0
open("/usr/lib/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=10656, ...}) = 0
mmap(NULL, 2105608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f2fe06000
mprotect(0x7f7f2fe08000, 2093056, PROT_NONE) = 0
mmap(0x7f7f30007000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f7f30007000
close(3) = 0
open("/usr/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pV\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1063288, ...}) = 0
mmap(NULL, 3158240, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7f2fb02000
mprotect(0x7f7f2fc05000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2fe04000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x102000) = 0x7f7f2fe04000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30da1000
arch_prctl(ARCH_SET_FS, 0x7f7f30da2380) = 0
mprotect(0x7f7f305a1000, 16384, PROT_READ) = 0
mprotect(0x7f7f2fe04000, 4096, PROT_READ) = 0
mprotect(0x7f7f30007000, 4096, PROT_READ) = 0
mprotect(0x7f7f3020b000, 4096, PROT_READ) = 0
mprotect(0x7f7f307c2000, 4096, PROT_READ) = 0
mprotect(0x7f7f30b50000, 8192, PROT_READ) = 0
mprotect(0x55621568c000, 4096, PROT_READ) = 0
mprotect(0x7f7f30dd3000, 4096, PROT_READ) = 0
munmap(0x7f7f30da5000, 186462) = 0
set_tid_address(0x7f7f30da2650) = 22151
set_robust_list(0x7f7f30da2660, 24) = 0
rt_sigaction(SIGRTMIN, {0x7f7f305b0b70, [], SA_RESTORER|SA_SIGINFO, 0x7f7f305bc080}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f7f305b0c00, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f7f305bc080}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192_1024, rlim_max=RLIM64_INFINITY}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
brk(NULL) = 0x5562166b2000
brk(0x5562166d3000) = 0x5562166d3000
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30d61000
brk(0x5562166fb000) = 0x5562166fb000
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=7251, ...}) = 0
fstat(2, {st_mode=S_IFREG|0644, st_size=7307, ...}) = 0
stat("/usr/local/sbin/python2.7", 0x7ffc9c943db0) = -1 ENOENT (No such file or directory)
stat("/usr/local/bin/python2.7", 0x7ffc9c943db0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/python2.7", {st_mode=S_IFREG|0755, st_size=6312, ...}) = 0
readlink("/usr/bin/python2.7", 0x7ffc9c945e60, 4096) = -1 EINVAL (Invalid argument)
stat("/usr/bin/Modules/Setup", 0x7ffc9c943cf0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/lib/python2.7/os.py", 0x7ffc9c943ce0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/lib/python2.7/os.pyc", 0x7ffc9c943ce0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/os.py", {st_mode=S_IFREG|0644, st_size=25910, ...}) = 0
stat("/usr/bin/pybuilddir.txt", 0x7ffc9c943cf0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/lib/python2.7/lib-dynload", 0x7ffc9c943cf0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30d21000
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7f7f305bc080}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, {SIG_IGN, [], SA_RESTORER, 0x7f7f305bc080}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_IGN, [], 0}, 8) = 0
rt_sigaction(SIGKILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_IGN, [], SA_RESTORER, 0x7f7f305bc080}, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCONT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTOP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTSTP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTTIN, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTTOU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_IGN, [], SA_RESTORER, 0x7f7f305bc080}, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x7f7f308e8040, [], SA_RESTORER, 0x7f7f305bc080}, {SIG_DFL, [], 0}, 8) = 0
stat("/usr/lib/python27.zip", 0x7ffc9c9427d0) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=131072, ...}) = 0
stat("/usr/lib/python27.zip", 0x7ffc9c945830) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/lib/python2.7/", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/lib/python2.7/site", 0x7ffc9c945a00) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sitemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19591, ...}) = 0
open("/usr/lib/python2.7/site.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=19154, ...}) = 0
read(4, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0sp\1\0\0d\0"..., 4096) = 4096
fstat(4, {st_mode=S_IFREG|0644, st_size=19154, ...}) = 0
read(4, "\0\0\0t\5\0\0\0isdirR\10\0\0\0R\24\0\0\0t\t\0\0\0Type"..., 12288) = 12288
read(4, "i\377\377\377\377Ns3\0\0\0'import sitecustomize"..., 4096) = 2770
read(4, "", 4096) = 0
close(4) = 0
stat("/usr/lib/python2.7/os", 0x7ffc9c9454e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/os.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/osmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/os.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=25910, ...}) = 0
open("/usr/lib/python2.7/os.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=25593, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\16\0\0\0@\0\0\0s\372\6\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=25593, ...}) = 0
read(5, " N(\t\0\0\0R\t\0\0\0t\5\0\0\0splitt\6\0\0\0exis"..., 20480) = 20480
read(5, "s\3\0\0\0os2s\2\0\0\0nt(X\0\0\0t\7\0\0\0__doc__"..., 4096) = 1017
read(5, "", 4096) = 0
close(5) = 0
brk(0x55621671c000) = 0x55621671c000
sysinfo({uptime=497, loads=[39616, 39744, 21696], totalram=16821559296, freeram=14073569280, sharedram=30121984, bufferram=55054336, totalswap=34359734272, freeswap=34359734272, procs=438, totalhigh=0, freehigh=0, mem_unit=1}) = 0
stat("/usr/lib/python2.7/posixpath", 0x7ffc9c944fc0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/posixpath.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/posixpathmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/posixpath.py", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=13925, ...}) = 0
open("/usr/lib/python2.7/posixpath.pyc", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=11374, ...}) = 0
read(6, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0&\0\0\0@\0\0\0s\373\1\0\0d\0"..., 4096) = 4096
fstat(6, {st_mode=S_IFREG|0644, st_size=11374, ...}) = 0
read(6, "\0\0\0Test whether a path exists. "..., 4096) = 4096
read(6, "\4\0\0\0NoneRD\0\0\0t\6\0\0\0searcht\4\0\0\0spa"..., 4096) = 3182
read(6, "", 4096) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30ce1000
munmap(0x7f7f30ce1000, 262144) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30ce1000
close(6) = 0
stat("/usr/lib/python2.7/stat", 0x7ffc9c944aa0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/stat.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/statmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/stat.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=1842, ...}) = 0
open("/usr/lib/python2.7/stat.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=2731, ...}) = 0
read(7, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\1\0\0\0@\0\0\0s{\1\0\0d\0"..., 4096) = 2731
fstat(7, {st_mode=S_IFREG|0644, st_size=2731, ...}) = 0
read(7, "", 4096) = 0
close(7) = 0
close(6) = 0
stat("/usr/lib/python2.7/genericpath", 0x7ffc9c944aa0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/genericpath.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/genericpathmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/genericpath.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=3201, ...}) = 0
open("/usr/lib/python2.7/genericpath.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=3495, ...}) = 0
read(7, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\10\0\0\0@\0\0\0s\305\0\0\0d\0"..., 4096) = 3495
fstat(7, {st_mode=S_IFREG|0644, st_size=3495, ...}) = 0
read(7, "", 4096) = 0
close(7) = 0
close(6) = 0
stat("/usr/lib/python2.7/warnings", 0x7ffc9c944aa0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/warnings.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/warningsmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/warnings.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=14748, ...}) = 0
open("/usr/lib/python2.7/warnings.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=13578, ...}) = 0
read(7, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\10\0\0\0@\0\0\0sY\2\0\0d\0"..., 4096) = 4096
fstat(7, {st_mode=S_IFREG|0644, st_size=13578, ...}) = 0
read(7, "f warnings filters (at the front"..., 8192) = 8192
read(7, "r/lib/python2.7/warnings.pyR\2\0\0\0"..., 4096) = 1290
read(7, "", 4096) = 0
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30cb0000
close(7) = 0
stat("/usr/lib/python2.7/linecache", 0x7ffc9c944580) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/linecache.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/linecachemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/linecache.py", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=4027, ...}) = 0
open("/usr/lib/python2.7/linecache.pyc", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=3260, ...}) = 0
read(8, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0sp\0\0\0d\0"..., 4096) = 3260
fstat(8, {st_mode=S_IFREG|0644, st_size=3260, ...}) = 0
read(8, "", 4096) = 0
close(8) = 0
close(7) = 0
stat("/usr/lib/python2.7/types", 0x7ffc9c944580) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/types.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/typesmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/types.py", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=2094, ...}) = 0
open("/usr/lib/python2.7/types.pyc", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=2711, ...}) = 0
read(8, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\5\0\0\0@\0\0\0sH\2\0\0d\0"..., 4096) = 2711
fstat(8, {st_mode=S_IFREG|0644, st_size=2711, ...}) = 0
read(8, "", 4096) = 0
close(8) = 0
close(7) = 0
close(6) = 0
close(5) = 0
stat("/usr/lib/python2.7/UserDict", 0x7ffc9c944fc0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/UserDict.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/UserDictmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/UserDict.py", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=7060, ...}) = 0
open("/usr/lib/python2.7/UserDict.pyc", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=9621, ...}) = 0
read(6, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0sb\0\0\0d\0"..., 4096) = 4096
fstat(6, {st_mode=S_IFREG|0644, st_size=9621, ...}) = 0
read(6, "got %dR\1\0\0\0i\377\377\377\377s0\0\0\0Passing 'di"..., 4096) = 4096
read(6, "\0\0\261\0\0\0s\f\0\0\0\0\1\3\1\34\1\r\1\r\1\7\1c\2\0\0\0\5\0\0\0"..., 4096) = 1429
read(6, "", 4096) = 0
close(6) = 0
stat("/usr/lib/python2.7/_abcoll", 0x7ffc9c944aa0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_abcoll.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_abcollmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_abcoll.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=18619, ...}) = 0
open("/usr/lib/python2.7/_abcoll.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=25474, ...}) = 0
read(7, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\20\0\0\0@\0\0\0s\224\2\0\0d\0"..., 4096) = 4096
fstat(7, {st_mode=S_IFREG|0644, st_size=25474, ...}) = 0
read(7, "\1\0Z\7\0RS(\2\0\0\0c\2\0\0\0\2\0\0\0\1\0\0\0C\0\0\0s\4\0"..., 20480) = 20480
read(7, "alue.\n Raise ValueErro"..., 4096) = 898
read(7, "", 4096) = 0
close(7) = 0
stat("/usr/lib/python2.7/abc", 0x7ffc9c944580) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/abc.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/abcmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/abc.py", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=7145, ...}) = 0
open("/usr/lib/python2.7/abc.pyc", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=6121, ...}) = 0
read(8, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s}\0\0\0d\0"..., 4096) = 4096
fstat(8, {st_mode=S_IFREG|0644, st_size=6121, ...}) = 0
read(8, "egisteri\0\0\0s\20\0\0\0\0\2\30\1\17\1\17\1\4\3\17\2\17\1\20\1"..., 4096) = 2025
read(8, "", 4096) = 0
close(8) = 0
stat("/usr/lib/python2.7/_weakrefset", 0x7ffc9c944060) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_weakrefset.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_weakrefsetmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/weakrefset.py", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=5911, ...}) = 0
open("/usr/lib/python2.7/weakrefset.pyc", O_RDONLY) = 9
fstat(9, {st_mode=S_IFREG|0644, st_size=9582, ...}) = 0
read(9, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0sI\0\0\0d\0"..., 4096) = 4096
fstat(9, {st_mode=S_IFREG|0644, st_size=9582, ...}) = 0
read(9, "efset.pyR\27\0\0\0q\0\0\0s\6\0\0\0\0\1\t\1\r\1c\2\0\0"..., 4096) = 4096
read(9, "\26\0\210\0\0j\1\0\203\0\0\1n\0\0\210\0\0|\1\0k\10\0r2\0\210\0\0j\2"..., 4096) = 1390
read(9, "", 4096) = 0
close(9) = 0
close(8) = 0
close(7) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30c70000
close(6) = 0
close(5) = 0
stat("/usr/lib/python2.7/copy_reg", 0x7ffc9c944fc0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/copy_reg.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/copy_regmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/copy_reg.py", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=6800, ...}) = 0
open("/usr/lib/python2.7/copy_reg.pyc", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=5091, ...}) = 0
read(6, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\5\0\0\0@\0\0\0s\326\0\0\0d\0"..., 4096) = 4096
fstat(6, {st_mode=S_IFREG|0644, st_size=5091, ...}) = 0
read(6, "\0\0\0t\3\0\0\0intt\n\0\0\0ValueErrort\23\0\0\0
"..., 4096) = 995
read(6, "", 4096) = 0
close(6) = 0
close(5) = 0
close(4) = 0
stat("/usr/lib/python2.7/traceback", 0x7ffc9c9454e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/traceback.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/tracebackmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/traceback.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=11285, ...}) = 0
open("/usr/lib/python2.7/traceback.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=11639, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\16\0\0\0@\0\0\0sB\1\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=11639, ...}) = 0
read(5, "!\0\0\0i\0\0\0\0i\1\0\0\0N(\20\0\0\0R\24\0\0\0R"\0\0\0R\25"..., 4096) = 4096
read(5, "\0\203\0\0\3\0}\2\0}\3\0}\4\0t\4\0|\2\0|\3\0|\4\0|\0\0|"..., 4096) = 3447
read(5, "", 4096) = 0
close(5) = 0
close(4) = 0
geteuid() = 1000
getuid() = 1000
getegid() = 1000
getgid() = 1000
stat("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/lib/python2.7/sysconfig", 0x7ffc9c944fe0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sysconfig.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sysconfigmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sysconfig.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=22540, ...}) = 0
open("/usr/lib/python2.7/sysconfig.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=17524, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\7\0\0\0@\0\0\0s\21\5\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=17524, ...}) = 0
brk(0x55621673d000) = 0x55621673d000
read(5, "rmpathR(\0\0\0(\5\0\0\0t\6\0\0\0schemet\4\0\0\0"..., 12288) = 12288
read(5, "ll information sysconfig detains"..., 4096) = 1140
read(5, "", 4096) = 0
brk(0x556216739000) = 0x556216739000
close(5) = 0
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/bin", {st_mode=S_IFDIR|0755, st_size=106496, ...}) = 0
lstat("/usr/bin/python2.7", {st_mode=S_IFREG|0755, st_size=6312, ...}) = 0
stat("/usr/bin/Modules/Setup.dist", 0x7ffc9c945bb0) = -1 ENOENT (No such file or directory)
stat("/usr/bin/Modules/Setup.local", 0x7ffc9c945bb0) = -1 ENOENT (No such file or directory)
close(4) = 0
stat("/usr/lib/python2.7/re", 0x7ffc9c944ca0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/re.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/remodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/re.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=13423, ...}) = 0
open("/usr/lib/python2.7/re.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=13371, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\27\0\0\0@\0\0\0sQ\2\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=13371, ...}) = 0
read(5, "ports the following functions:\n "..., 8192) = 8192
read(5, "\0|\10\0\203\1\0\1n\0\0|\7\0}\5\0q-\0W|\2\0|\1\0|\5\0\37f"..., 4096) = 1083
read(5, "", 4096) = 0
close(5) = 0
stat("/usr/lib/python2.7/sre_compile", 0x7ffc9c944780) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_compile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_compilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_compile.py", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=19817, ...}) = 0
open("/usr/lib/python2.7/sre_compile.pyc", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=12529, ...}) = 0
read(6, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\16\0\0\0@\0\0\0s\317\1\0\0d\0"..., 4096) = 4096
fstat(6, {st_mode=S_IFREG|0644, st_size=12529, ...}) = 0
read(6, "compilet\7\0\0\0SUCCESSt\7\0\0\0_simple"..., 8192) = 8192
read(6, "intRd\0\0\0Rf\0\0\0R'\0\0\0R\226\0\0\0t\7\0\0\0unic"..., 4096) = 241
read(6, "", 4096) = 0
close(6) = 0
stat("/usr/lib/python2.7/sre_parse", 0x7ffc9c944260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_parse.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_parsemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_parse.py", O_RDONLY) = 6
fstat(6, {st_mode=S_IFREG|0644, st_size=28911, ...}) = 0
open("/usr/lib/python2.7/sre_parse.pyc", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=19945, ...}) = 0
read(7, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\4\0\0\0@\0\0\0s\312\2\0\0d\0"..., 4096) = 4096
fstat(7, {st_mode=S_IFREG|0644, st_size=19945, ...}) = 0
read(7, "\0\0\3\0\0\0\3\0\0\0C\0\0\0s\21\0\0\0|\2\0|\0\0j\0\0|\1\0<"..., 12288) = 12288
read(7, "\2\0
\4\0t\5\0|\3\0|\2\0d\1\0\203\3\0}\4\0|\3\0j\6\0\203\0\0"..., 4096) = 3561
read(7, "", 4096) = 0
close(7) = 0
stat("/usr/lib/python2.7/sre_constants", 0x7ffc9c943d40) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_constants.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_constantsmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sre_constants.py", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=7197, ...}) = 0
open("/usr/lib/python2.7/sre_constants.pyc", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=6185, ...}) = 0
read(8, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0 \0\0\0@\0\0\0s
\5\0\0d\0"..., 4096) = 4096
fstat(8, {st_mode=S_IFREG|0644, st_size=6185, ...}) = 0
read(8, "FIX %d\ns\34\0\0\0#define SRE_INFO_LIT"..., 4096) = 2089
read(8, "", 4096) = 0
close(8) = 0
close(7) = 0
close(6) = 0
close(5) = 0
stat("/usr/lib/python2.7/_locale", 0x7ffc9c944780) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_locale.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_localemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_locale.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_locale.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-linux2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/plat-linux2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/plat-linux2/_locale", 0x7ffc9c944780) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/_locale.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/_localemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/_locale.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/_locale.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/lib-tk", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/lib-tk/_locale", 0x7ffc9c944780) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/_locale.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/_localemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/_locale.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/_locale.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-old", 0x7ffc9c941550) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7", {st_mode=S_IFDIR|0755, st_size=20480, ...}) = 0
stat("/usr/lib/python2.7/lib-old", 0x7ffc9c9445b0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/lib-dynload", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/lib-dynload/_locale", 0x7ffc9c944780) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/_locale.so", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0755, st_size=20272, ...}) = 0
futex(0x7f7f3020c0a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/python2.7/lib-dynload/_locale.so", O_RDONLY|O_CLOEXEC) = 6
read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\33\0\0\0\0\0\0"..., 832) = 832
fstat(6, {st_mode=S_IFREG|0755, st_size=20272, ...}) = 0
mmap(NULL, 2115376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x7f7f2f8fd000
mprotect(0x7f7f2f901000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2fb00000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x3000) = 0x7f7f2fb00000
close(6) = 0
mprotect(0x7f7f2fb00000, 4096, PROT_READ) = 0
close(5) = 0
close(4) = 0
stat("/usr/lib/python2.7/_sysconfigdata", 0x7ffc9c944b60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/_sysconfigdata.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sysconfigdatamodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sysconfigdata.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=15816, ...}) = 0
open("/usr/lib/python2.7/sysconfigdata.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=19115, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s\370\16\0\0i""..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=19115, ...}) = 0
read(5, "Python/Python-ast.ct\5\0\0\0AST_Ct\6\0"..., 12288) = 12288
read(5, "\0\0SIZEOF_PID_Tt\20\0\0\0SIZEOF_PTHREA"..., 4096) = 2731
read(5, "", 4096) = 0
brk(0x55621675a000) = 0x55621675a000
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30c30000
brk(0x556216759000) = 0x556216759000
close(5) = 0
close(4) = 0
stat("/home/clay/.local/lib/python2.7/site-packages", 0x7ffc9c946490) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/python2.7/site-packages", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents(4, /* 140 entries /, 32768) = 5256
getdents(4, /
0 entries */, 32768) = 0
close(4) = 0
open("/usr/lib/python2.7/site-packages/pygtk.pth", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=8, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=8, ...}) = 0
read(4, "gtk-2.0\n", 8192) = 8
read(4, "", 4096) = 0
stat("/usr/lib/python2.7/site-packages/gtk-2.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(4, "", 8192) = 0
close(4) = 0
open("/usr/lib/python2.7/site-packages/wx.pth", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=12, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=12, ...}) = 0
read(4, "wx-3.0-gtk2\n", 8192) = 12
read(4, "", 4096) = 0
stat("/usr/lib/python2.7/site-packages/wx-3.0-gtk2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(4, "", 8192) = 0
close(4) = 0
stat("/usr/lib/site-python", 0x7ffc9c946490) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-linux2/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/gtk-2.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/gtk-2.0", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/gtk-2.0/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/wx-3.0-gtk2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/wx-3.0-gtk2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/sitecustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/sitecustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/sitecustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/sitecustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/sitecustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-linux2/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/gtk-2.0/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/gtk-2.0/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/usercustomize", 0x7ffc9c945260) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/usercustomize.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/usercustomizemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/usercustomize.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/wx-3.0-gtk2/usercustomize.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1966480, ...}) = 0
mmap(NULL, 1966480, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7f2f71c000
close(3) = 0
stat("/usr/lib/python2.7/encodings", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat("/usr/lib/python2.7/encodings/init.py", {st_mode=S_IFREG|0644, st_size=5698, ...}) = 0
stat("/usr/lib/python2.7/encodings/init", 0x7ffc9c945b00) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/init.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/init__module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/__init
.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=5698, ...}) = 0
open("/usr/lib/python2.7/encodings/init.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=4370, ...}) = 0
read(4, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s\216\0\0\0d\0"..., 4096) = 4096
fstat(4, {st_mode=S_IFREG|0644, st_size=4370, ...}) = 0
read(4, "\1$\1$\0016\0016\1\3\1\3\1\26\1"\0015\1\22\3\n\4\3\1\20\1\r\1\4\2\r"..., 4096) = 274
read(4, "", 4096) = 0
close(4) = 0
stat("/usr/lib/python2.7/encodings", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat("/usr/lib/python2.7/encodings", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
stat("/usr/lib/python2.7/encodings/codecs", 0x7ffc9c9455e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/codecs.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/codecsmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/codecs.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/codecs.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/codecs", 0x7ffc9c9455e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/codecs.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/codecsmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/codecs.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=36095, ...}) = 0
open("/usr/lib/python2.7/codecs.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=36654, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0+\0\0\0@\0\0\0sp\3\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=36654, ...}) = 0
read(5, "ndling.\n\n The method "..., 28672) = 28672
read(5, "oding cannot be found\n or"..., 4096) = 3886
read(5, "", 4096) = 0
close(5) = 0
close(4) = 0
stat("/usr/lib/python2.7/encodings/encodings", 0x7ffc9c9455e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/encodings.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/encodingsmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/encodings.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/encodings.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/encodings/aliases", 0x7ffc9c9455d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/aliases.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/aliasesmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/aliases.py", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=14848, ...}) = 0
open("/usr/lib/python2.7/encodings/aliases.pyc", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=8768, ...}) = 0
read(5, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0su\10\0\0d\0"..., 4096) = 4096
fstat(5, {st_mode=S_IFREG|0644, st_size=8768, ...}) = 0
read(5, "ibm860t\6\0\0\0ibm860t\5\0\0\0cp861t\3\0\0\0"..., 4096) = 4096
read(5, "\7\3\7\1\7\1\7\1\7\1\7\1\7\1\7\1\7\3\7\1\7\1\7\3\7\1\7\3\7\1\7\3"..., 4096) = 576
read(5, "", 4096) = 0
close(5) = 0
close(4) = 0
stat("/usr/lib/python2.7/encodings/builtin", 0x7ffc9c9455e0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/builtin.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/builtin__module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/__builtin
.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/builtin.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
close(3) = 0
stat("/usr/lib/python2.7/encodings/utf_8", 0x7ffc9c945870) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/utf_8.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/utf_8module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/encodings/utf_8.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1005, ...}) = 0
open("/usr/lib/python2.7/encodings/utf_8.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1950, ...}) = 0
read(4, "\3\363\r\nE7rWc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s\230\0\0\0d\0"..., 4096) = 1950
fstat(4, {st_mode=S_IFREG|0644, st_size=1950, ...}) = 0
read(4, "", 4096) = 0
close(4) = 0
close(3) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, 0x7ffc9c946d70) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(2, TCGETS, 0x7ffc9c946d70) = -1 ENOTTY (Inappropriate ioctl for device)
readlink(".scripts/lock2.sh", 0x7ffc9c943f90, 4096) = -1 EINVAL (Invalid argument)
getcwd("/home/clay", 4096) = 11
lstat("/home/clay/.scripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/clay/.scripts/lock2.sh", {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
stat(".scripts/lock2.sh", {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
open(".scripts/lock2.sh", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "#!/usr/bin/env python2.7\n# -
- c"..., 1666) = 1666
read(3, "creen\n lock_screen()\n", 4096) = 22
close(3) = 0
stat(".scripts/lock2.sh", {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
open(".scripts/lock2.sh", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
ioctl(3, TCGETS, 0x7ffc9c946f20) = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR) = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1688, ...}) = 0
read(3, "#!/usr/bin/env python2.7\n# -
- c"..., 4096) = 1688
lseek(3, 0, SEEK_SET) = 0
brk(0x55621677a000) = 0x55621677a000
read(3, "#!/usr/bin/env python2.7\n# -*- c"..., 4096) = 1688
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30bf0000
read(3, "", 4096) = 0
close(3) = 0
stat("/home/clay/.scripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/clay/.scripts", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/clay/.scripts/xcb", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/xcb.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/xcbmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/xcb.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/xcb.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/xcb", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/xcb.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/xcbmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/xcb.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/xcb.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-linux2/xcb", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/xcb.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/xcbmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/xcb.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/xcb.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk/xcb", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/xcb.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/xcbmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/xcb.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/xcb.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload/xcb", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/xcb.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/xcbmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/xcb.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/xcb.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/site-packages/xcb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/xcb/init.py", {st_mode=S_IFREG|0644, st_size=63, ...}) = 0
stat("/usr/lib/python2.7/site-packages/xcb/init", 0x7ffc9c945860) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/init.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/init__module.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/__init
.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=63, ...}) = 0
open("/usr/lib/python2.7/site-packages/xcb/init.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=232, ...}) = 0
read(4, "\3\363\r\n\216\371\303Wc\0\0\0\0\0\0\0\0\3\0\0\0@\0\0\0s\35\0\0\0d\0"..., 4096) = 232
fstat(4, {st_mode=S_IFREG|0644, st_size=232, ...}) = 0
read(4, "", 4096) = 0
close(4) = 0
stat("/usr/lib/python2.7/site-packages/xcb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/xcb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/usr/lib/python2.7/site-packages/xcb/xcb", 0x7ffc9c945340) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/xcb.so", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=51720, ...}) = 0
open("/usr/lib/python2.7/site-packages/xcb/xcb.so", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360?\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=51720, ...}) = 0
mmap(NULL, 2146984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f7f2f50f000
mprotect(0x7f7f2f519000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2f718000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x9000) = 0x7f7f2f718000
close(5) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=186462, ...}) = 0
mmap(NULL, 186462, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f7f30da5000
close(5) = 0
open("/usr/lib/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\302\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=166864, ...}) = 0
mmap(NULL, 2262152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f7f2f2e6000
mprotect(0x7f7f2f30e000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2f50d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x27000) = 0x7f7f2f50d000
close(5) = 0
open("/usr/lib/libXau.so.6", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \17\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=14512, ...}) = 0
mmap(NULL, 2109744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f7f2f0e2000
mprotect(0x7f7f2f0e4000, 2097152, PROT_NONE) = 0
mmap(0x7f7f2f2e4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x2000) = 0x7f7f2f2e4000
close(5) = 0
open("/usr/lib/libXdmcp.so.6", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \25\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=22688, ...}) = 0
mmap(NULL, 2117912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f7f2eedc000
mprotect(0x7f7f2eee1000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2f0e0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0x7f7f2f0e0000
close(5) = 0
mprotect(0x7f7f2f0e0000, 4096, PROT_READ) = 0
mprotect(0x7f7f2f2e4000, 4096, PROT_READ) = 0
mprotect(0x7f7f2f50d000, 4096, PROT_READ) = 0
mprotect(0x7f7f2f718000, 4096, PROT_READ) = 0
munmap(0x7f7f30da5000, 186462) = 0
close(4) = 0
close(3) = 0
stat("/usr/lib/python2.7/site-packages/xcb/xproto", 0x7ffc9c9458a0) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/xproto.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/xprotomodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/xproto.py", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=126604, ...}) = 0
open("/usr/lib/python2.7/site-packages/xcb/xproto.pyc", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=179253, ...}) = 0
read(4, "\3\363\r\n\216\371\303Wc\0\0\0\0\0\0\0\0\5\0\0\0@\0\0\0s\373\27\0\0d\0"..., 4096) = 4096
fstat(4, {st_mode=S_IFREG|0644, st_size=179253, ...}) = 0
mmap(NULL, 180224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f30da7000
read(4, "\0d[\1\204\0\0\203\0\0YZ\270\0d\1f\0\0d]\1\204\0\0\203\0\0YZ\271"..., 172032) = 172032
read(4, "R^\4\0\0Rb\4\0\0Rc\4\0\0Rd\4\0\0Re\4\0\0Rf\4\0\0Rg"..., 4096) = 3125
read(4, "", 4096) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7f2ee9c000
munmap(0x7f7f30da7000, 180224) = 0
close(4) = 0
stat("/usr/lib/python2.7/site-packages/xcb/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/cStringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/cStringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/cStringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/cStringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/clay/.scripts/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/cStringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/cStringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/cStringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/cStringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/cStringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/cStringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/cStringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/cStringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-linux2/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/cStringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/cStringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/cStringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-linux2/cStringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/cStringIO.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/cStringIOmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/cStringIO.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/cStringIO.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload/cStringIO", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/cStringIO.so", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=22760, ...}) = 0
open("/usr/lib/python2.7/lib-dynload/cStringIO.so", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\33\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=22760, ...}) = 0
mmap(NULL, 2117936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f7f2ec96000
mprotect(0x7f7f2ec9a000, 2093056, PROT_NONE) = 0
mmap(0x7f7f2ee99000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x3000) = 0x7f7f2ee99000
close(5) = 0
mprotect(0x7f7f2ee99000, 4096, PROT_READ) = 0
close(4) = 0
stat("/usr/lib/python2.7/site-packages/xcb/struct", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/struct.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/structmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/struct.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/site-packages/xcb/struct.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/home/clay/.scripts/struct", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/struct.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/structmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/struct.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/clay/.scripts/struct.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/struct", 0x7ffc9c945380) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/struct.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/structmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/struct.py", O_RDONLY) = 4
fstat(4, {st_mode=S

@artheus
Copy link

artheus commented Sep 28, 2016

Really nice idea. I've created a gist heavily based on yours. (https://gist.github.com/artheus/c577716bd2f15b9ca330b15443e8bfbe)
I added a check to see if screen width and height are larger than 0. This was a problem I got since I have dual external screens on a closed-lid laptop as my setup.
Also I replaces the "pixelation" effect with a gaussian blur filter.

@cvcore
Copy link

cvcore commented Nov 12, 2017

Just want to send a quick note for anyone trying this script in 2017: you may want to replace xcb by xcffib

the following script works for me in python3

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab

import os
import xcffib
from xcffib.xproto import *
from PIL import Image

XCB_MAP_STATE_VIEWABLE = 2

def screenshot():
  os.system('import -window root /tmp/.i3lock.png')

def xcb_fetch_windows():
  """ Returns an array of rects of currently visible windows. """

  x = xcffib.connect()
  root = x.get_setup().roots[0].root

  rects = []

  # iterate through top-level windows
  for child in x.core.QueryTree(root).reply().children:
    # make sure we only consider windows that are actually visible
    attributes = x.core.GetWindowAttributes(child).reply()
    if attributes.map_state != XCB_MAP_STATE_VIEWABLE:
      continue

    rects += [x.core.GetGeometry(child).reply()]

  return rects

def obscure_image(image):
  """ Obscures the given image. """
  size = image.size
  pixel_size = 8

  if size[0] < pixel_size or size[1] < pixel_size:
    return image

  image = image.resize((int(size[0] / pixel_size), int(size[1] / pixel_size)), Image.NEAREST)
  image = image.resize((int(size[0]), int(size[1])), Image.NEAREST)

  return image

def obscure(rects):
  """ Takes an array of rects to obscure from the screenshot. """
  image = Image.open('/tmp/.i3lock.png')

  for rect in rects:
    area = (
      rect.x, rect.y,
      rect.x + rect.width,
      rect.y + rect.height
    )

    cropped = image.crop(area)
    cropped = obscure_image(cropped)
    image.paste(cropped, area)

  image.save('/tmp/.i3lock.png')

def lock_screen():
  os.system('i3lock -u -i /tmp/.i3lock.png')

if __name__ == '__main__':
  # 1: Take a screenshot.
  screenshot()

  # 2: Get the visible windows.
  rects = xcb_fetch_windows()

  # 3: Process the screenshot.
  obscure(rects)

  # 4: Lock the screen
  lock_screen()
'''

@sagarkar10
Copy link

sagarkar10 commented Nov 21, 2017

This takes up a lot of time, I would try to build the same effect with cli like imagemagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment