FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Tools/scripts/lll.py at master · python-emscripten/cpython · GitHub
python-emscripten
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Tools
/
scripts
/
lll.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
27 lines (23 loc) · 748 Bytes
Breadcrumbs
cpython
/
Tools
/
scripts
/
lll.py
Copy path
File metadata and controls
executable file
·
27 lines (23 loc) · 748 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /usr/bin/env python3
# Find symbolic links and show where they point to.
# Arguments are directories to search; default is current directory.
# No recursion.
# (This is a totally different program from "findsymlinks.py"!)
import
sys
,
os
def
lll
(
dirname
):
for
name
in
os
.
listdir
(
dirname
):
if
name
not
in
(
os
.
curdir
,
os
.
pardir
):
full
=
os
.
path
.
join
(
dirname
,
name
)
if
os
.
path
.
islink
(
full
):
print
(
name
,
'->'
,
os
.
readlink
(
full
))
def
main
(
args
):
if
not
args
:
args
=
[
os
.
curdir
]
first
=
1
for
arg
in
args
:
if
len
(
args
)
>
1
:
if
not
first
:
print
()
first
=
0
print
(
arg
+
':'
)
lll
(
arg
)
if
__name__
==
'__main__'
:
main
(
sys
.
argv
[
1
:])
Back
|
FazBrowse Home
|
New Git URL