bt.file.ls(): Return sorted list
cline.message: Leave last line blank
This commit is contained in:
parent
4cacc390c2
commit
65e778d48a
|
@ -47,7 +47,9 @@ def fopen(path,flags='r'):
|
||||||
def ls(path):
|
def ls(path):
|
||||||
if checkDir(path) == False:
|
if checkDir(path) == False:
|
||||||
return False
|
return False
|
||||||
return os.listdir(path)
|
list = os.listdir(path)
|
||||||
|
list.sort()
|
||||||
|
return list
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ def disp(text):
|
||||||
def write(text,verbose=False):
|
def write(text,verbose=False):
|
||||||
if (verbose==False) or (settings.get("verbose")==True):
|
if (verbose==False) or (settings.get("verbose")==True):
|
||||||
w = settings.get("write")
|
w = settings.get("write")
|
||||||
w(text)
|
w(str(text))
|
||||||
|
|
||||||
|
|
||||||
# Print an error message
|
# Print an error message
|
||||||
|
|
|
@ -13,7 +13,7 @@ import bt.message
|
||||||
|
|
||||||
|
|
||||||
def advance(y, maxy, stdscr):
|
def advance(y, maxy, stdscr):
|
||||||
if y < (maxy-1):
|
if y < (maxy-2):
|
||||||
settings.replace("cliney", y+1)
|
settings.replace("cliney", y+1)
|
||||||
return y+1
|
return y+1
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ def advance(y, maxy, stdscr):
|
||||||
|
|
||||||
# Add string to line y
|
# Add string to line y
|
||||||
def insert(string):
|
def insert(string):
|
||||||
|
string = str(string)
|
||||||
if len(string) == 0:
|
if len(string) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue