nutools/pyulib/devel/shell_init

59 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-08-27 15:14:44 +04:00
# -*- coding: utf-8 mode: python -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
import pdb
from ulib.all import *
###############################################################################
#for first in ('1/12/9', '1/1/10', '1/2/10', '1/3/10', '1/4/10', '1/5/10', '1/6/10', '1/7/10'):
# date = parse_date(first)
# print "Mois de %s" % date.format("%fm")
# for debut, fin in date.get_monthweeks(False):
# print " %s - %s" % (debut, fin)
###############################################################################
##from ulib.tasks import *
##ts = SimpleStore('/home/jclain/Tasks.txt')
##t1 = ts.tasks[0:1] and ts.tasks[0] or None
##t2 = ts.tasks[1:2] and ts.tasks[1] or None
#
#from ulib.web import *
#P = web.template.Parser
#parser1=P("""$for item in list:
# $for jtem in ljst:
# hello world $item, $jtem\n
#""")
#p1=parser1.parse
#parser2=P("""$for item in list:
# indented_4spc
#\tindented_tabs
#\t$for jtem in ljst:
#\t\thello world $item, $jtem
#\t\t\tindented_tabs
#\t\t indented_4spc
#\t\tnot_indented
#""")
#p2=parser2.parse
###############################################################################
#from ulib.p.uinc import FileSpec, FileSpecs
###############################################################################
#from ulib.p.templ import *
###############################################################################
#from ulib.base.args import Options
#options=Options()
#options.add_option(('help','h'), Options.SetValue(True))
#options.add_option(('no-force', 'n'), Options.SetValue(False, initial=True))
###############################################################################
from ulib.p.templ.base import Templ
from ulib.p.templ.shtempl import ShTempl
d = ShTempl('default.sh')
x = ShTempl('exec.sh', ['-x'])
n = ShTempl('noexec.sh', ['-n'])