repo.or.cz
/
lcapit-junk-code.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
games: Introduce a simple puzzle game
[lcapit-junk-code.git]
/
wb-remove-rand
blob
33fdcc6c37b55e766e79ccdf1163e013d9151dc4
1
#!/usr/bin/python
2
3
import
sys
,
random
,
commands
4
5
max
=
int
(
sys
.
argv
[
1
])
6
7
files
=
commands
.
getoutput
(
'find /wb/ -type f'
).
splitlines
()
8
amount
=
len
(
files
) -
1
9
10
for
i
in
range
(
max
):
11
print
'removes
%s
'
%
files
[
random
.
randint
(
0
,
amount
)]
12
13
sys
.
exit
(
0
)