Commit 3f82285c authored by Guido van Rossum's avatar Guido van Rossum

use os and os.path

parent 80c0bbb4
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment