added shebangs
This commit is contained in:
parent
c2dbb38afe
commit
c9ef787521
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
class Root():
|
class Root():
|
||||||
a = "Root"
|
a = "Root"
|
||||||
def f(self):
|
def f(self):
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
print("hello world!\n")
|
print("hello world!\n")
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
if(i<9):
|
if(i<9):
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# stolen from stackoverflow: https://stackoverflow.com/questions/6840420/rewrite-multiple-lines-in-the-console
|
||||||
|
# breaks if filename is curses.py
|
||||||
|
import curses
|
||||||
|
import time
|
||||||
|
|
||||||
|
def report_progress(filename, progress):
|
||||||
|
"""progress: 0-10"""
|
||||||
|
stdscr.addstr(0, 0, "Moving file: {0}".format(filename))
|
||||||
|
stdscr.addstr(1, 0, "Total progress: [{1:10}] {0}%".format(progress * 10, "#" * progress))
|
||||||
|
stdscr.refresh()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
stdscr = curses.initscr()
|
||||||
|
curses.noecho()
|
||||||
|
curses.cbreak()
|
||||||
|
|
||||||
|
try:
|
||||||
|
for i in range(10):
|
||||||
|
report_progress("file_{0}.txt".format(i), i+1)
|
||||||
|
time.sleep(0.5)
|
||||||
|
finally:
|
||||||
|
curses.echo()
|
||||||
|
curses.nocbreak()
|
||||||
|
curses.endwin()
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in New Issue