I am observing a weird spacing issue when I call git within a python-curses screen. What am I doing in my minimal working example below that causes the spacing to be ajar and not flush with the side of the screen?
Minimal Working Example:
import curses, subprocess
class MyApp(object):
def __init__(self, stdscreen):
self.screen = stdscreen
self.screen.addstr("Loading..." + '\n')
self.screen.refresh()
url = 'http://github.com/octocat/Hello-World/'
process = subprocess.Popen(['git', 'clone', url], stdout=subprocess.PIPE)
self.screen.addstr("Press any key to continue.")
self.screen.getch()
if __name__ == '__main__':
curses.wrapper(MyApp)
Output:
Loading...
Press any key to continue.Cloning into 'Hello-World'...
warning: redirecting to https://github.com/octocat/Hello-World/
remote: Enumerating objects: 13, done.
remote: Total 13 (delta 0), reused 0 (delta 0), pack-reused 13
Unpacking objects: 100% (13/13), done.3)
Expected Output:
Loading...
Cloning into 'Hello-World'...
warning: redirecting to https://github.com/octocat/Hello-World/
remote: Enumerating objects: 13, done.
remote: Total 13 (delta 0), reused 0 (delta 0), pack-reused 13
Unpacking objects: 100% (13/13), done.3)
Press any key to continue.