bt.file.ls(): Return sorted list

cline.message: Leave last line blank
This commit is contained in:
bjschuma 2010-01-05 17:24:49 -05:00
parent 4cacc390c2
commit 65e778d48a
3 changed files with 6 additions and 3 deletions

View File

@ -47,7 +47,9 @@ def fopen(path,flags='r'):
def ls(path):
if checkDir(path) == False:
return False
return os.listdir(path)
list = os.listdir(path)
list.sort()
return list

View File

@ -16,7 +16,7 @@ def disp(text):
def write(text,verbose=False):
if (verbose==False) or (settings.get("verbose")==True):
w = settings.get("write")
w(text)
w(str(text))
# Print an error message

View File

@ -13,7 +13,7 @@ import bt.message
def advance(y, maxy, stdscr):
if y < (maxy-1):
if y < (maxy-2):
settings.replace("cliney", y+1)
return y+1
@ -24,6 +24,7 @@ def advance(y, maxy, stdscr):
# Add string to line y
def insert(string):
string = str(string)
if len(string) == 0:
return