Added 'join' to file commands, check for empty string before printing to

command line.
This commit is contained in:
bjschuma 2009-12-27 20:30:36 -05:00
parent aab322dcca
commit c6cc9f3d40
3 changed files with 10 additions and 7 deletions

View File

@ -50,4 +50,8 @@ def rm(path):
if checkPath(path)==False:
write("File does not exist: "+path)
return;
os.remove(path)
os.remove(path)
def join(a,b):
return os.path.join(a,b)

View File

@ -33,10 +33,6 @@ def main():
for path in settings.get("PLUGPATH",True):
loadPluginPath(path)
#raw_input("Input something: ")
#manager.manager.reloadPlugin("example")
#manager.manager.shutdown()
if __name__ == "__main__":main()

View File

@ -24,12 +24,15 @@ def advance(y, maxy, stdscr):
# Add string to line y
def insert(string):
if len(string) == 0:
return
stdscr = settings.get("stdscr")
maxyx = settings.get("maxyx")
y = settings.get("cliney")
if len(string) > maxyx[1]:
stdscr.addstr(y, 0, string[0:maxyx[1]])
if len(string) >= maxyx[1]:
stdscr.addstr(y, 0, string[0:maxyx[1]-1])
advance(y, maxyx[0], stdscr)
insert(string[maxyx[1]:])
return