Added 'join' to file commands, check for empty string before printing to
command line.
This commit is contained in:
parent
aab322dcca
commit
c6cc9f3d40
|
@ -50,4 +50,8 @@ def rm(path):
|
||||||
if checkPath(path)==False:
|
if checkPath(path)==False:
|
||||||
write("File does not exist: "+path)
|
write("File does not exist: "+path)
|
||||||
return;
|
return;
|
||||||
os.remove(path)
|
os.remove(path)
|
||||||
|
|
||||||
|
|
||||||
|
def join(a,b):
|
||||||
|
return os.path.join(a,b)
|
|
@ -33,10 +33,6 @@ def main():
|
||||||
for path in settings.get("PLUGPATH",True):
|
for path in settings.get("PLUGPATH",True):
|
||||||
loadPluginPath(path)
|
loadPluginPath(path)
|
||||||
|
|
||||||
#raw_input("Input something: ")
|
|
||||||
#manager.manager.reloadPlugin("example")
|
|
||||||
#manager.manager.shutdown()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":main()
|
if __name__ == "__main__":main()
|
||||||
|
|
|
@ -24,12 +24,15 @@ def advance(y, maxy, stdscr):
|
||||||
|
|
||||||
# Add string to line y
|
# Add string to line y
|
||||||
def insert(string):
|
def insert(string):
|
||||||
|
if len(string) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
stdscr = settings.get("stdscr")
|
stdscr = settings.get("stdscr")
|
||||||
maxyx = settings.get("maxyx")
|
maxyx = settings.get("maxyx")
|
||||||
y = settings.get("cliney")
|
y = settings.get("cliney")
|
||||||
|
|
||||||
if len(string) > maxyx[1]:
|
if len(string) >= maxyx[1]:
|
||||||
stdscr.addstr(y, 0, string[0:maxyx[1]])
|
stdscr.addstr(y, 0, string[0:maxyx[1]-1])
|
||||||
advance(y, maxyx[0], stdscr)
|
advance(y, maxyx[0], stdscr)
|
||||||
insert(string[maxyx[1]:])
|
insert(string[maxyx[1]:])
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue