Move terminal prompt script to extension directory

This commit is contained in:
Kim Silkebækken 2013-01-09 14:40:06 +01:00
parent 2ceec25713
commit d0d35cac34
2 changed files with 15 additions and 13 deletions

View File

@ -1,13 +0,0 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
'''Powerline terminal prompt example.
'''
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
from powerline.core import Powerline
pl = Powerline('terminal')
print(pl.renderer.render('n'))

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
'''Powerline terminal prompt example.
'''
try:
from powerline.core import Powerline
except ImportError:
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
from powerline.core import Powerline
pl = Powerline('terminal')
print(pl.renderer.render(None).encode('utf-8'))