#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse

# Configure Arguments:
aparser = argparse.ArgumentParser(prog='pysendsms', description='send SMS\
        message from csv file or string using one template.')
group = aparser.add_mutually_exclusive_group()
group.add_argument('-f', '--file',  help='file CSV to reading')
group.add_argument('-m', '--message', help='message to send')

aparser.add_argument(
        "-t", "--template", help="template for the message")
args = aparser.parse_args()


@@ -55,16 +55,88 @@
 rgparse%0A
+import threading%0Afrom string import Template%0Aimport queue%0Aimport gammu%0A%0A
 %0A# Confi
@@ -461,24 +461,21 @@
  send')%0A
-%0Aaparser
+group
 .add_arg
@@ -484,24 +484,15 @@
 ent(
-%0A        %22-t%22, %22
+'-t', '
 --te
@@ -501,17 +501,17 @@
 late
-%22
+'
 , help=
-%22
+'
 temp
@@ -534,36 +534,538 @@
 sage
-%22)%0Aargs = aparser.parse_args(
+. i.e:%5C%0A        %5C'Mr. %5B$name%7C$%7Bname%7D%5D like this%5C'')%0Aaparser.add_argument('-n', '--number', help='number to sms send')%0Aargs = aparser.parse_args()%0A%0A%0Aclass SendSMS(threading.Thread):%0A    def __init__(self):%0A        pass%0A%0A%0A%0Aif __name__ == '__main__': %0A    fifo = queue.Queue()%0A%0A%0A    print(args)%0A%0A    #print(args.template)%0A    t = args.template%0A    if t:%0A        t = Template(t)%0A    else:%0A        print(t or '')%0A%0A    #t = Template(args.template) or None%0A    #if t:%0A    #    print(t.substitute(name='jorge'))%0A    #else:%0A    #    print(t
 )%0A%0A

test arg