Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3f82285c
Commit
3f82285c
authored
Mar 31, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use os and os.path
parent
80c0bbb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
20 deletions
+6
-20
Lib/lib-stdwin/DirList.py
Lib/lib-stdwin/DirList.py
+3
-10
Lib/stdwin/DirList.py
Lib/stdwin/DirList.py
+3
-10
No files found.
Lib/lib-stdwin/DirList.py
View file @
3f82285c
...
...
@@ -2,14 +2,7 @@
# XXX Displays messy paths when following '..'
try
:
import
posix
,
path
os
=
posix
except
ImportError
:
import
mac
,
macpath
os
=
mac
path
=
macpath
import
os
import
stdwin
,
rect
from
stdwinevents
import
*
from
Buttons
import
PushButton
...
...
@@ -22,8 +15,8 @@ class DirList(VSplit):
self
=
VSplit
.
create
(
self
,
parent
)
names
=
os
.
listdir
(
dirname
)
for
name
in
names
:
if
path
.
isdir
(
path
.
join
(
dirname
,
name
)):
fullname
=
path
.
join
(
dirname
,
name
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
dirname
,
name
)):
fullname
=
os
.
path
.
join
(
dirname
,
name
)
btn
=
SubdirButton
().
definetext
(
self
,
fullname
)
elif
name
[
-
3
:]
==
'.py'
:
btn
=
ModuleButton
().
definetext
(
self
,
name
)
...
...
Lib/stdwin/DirList.py
View file @
3f82285c
...
...
@@ -2,14 +2,7 @@
# XXX Displays messy paths when following '..'
try
:
import
posix
,
path
os
=
posix
except
ImportError
:
import
mac
,
macpath
os
=
mac
path
=
macpath
import
os
import
stdwin
,
rect
from
stdwinevents
import
*
from
Buttons
import
PushButton
...
...
@@ -22,8 +15,8 @@ class DirList(VSplit):
self
=
VSplit
.
create
(
self
,
parent
)
names
=
os
.
listdir
(
dirname
)
for
name
in
names
:
if
path
.
isdir
(
path
.
join
(
dirname
,
name
)):
fullname
=
path
.
join
(
dirname
,
name
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
dirname
,
name
)):
fullname
=
os
.
path
.
join
(
dirname
,
name
)
btn
=
SubdirButton
().
definetext
(
self
,
fullname
)
elif
name
[
-
3
:]
==
'.py'
:
btn
=
ModuleButton
().
definetext
(
self
,
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment