~yacinechaouche/+junk/BZR

« back to all changes in this revision

Viewing changes to CODE/TEST/PYTHON/command.py

  • Committer: yacinechaouche at yahoo
  • Date: 2015-01-14 22:23:03 UTC
  • Revision ID: yacinechaouche@yahoo.com-20150114222303-6gbtqqxii717vyka
Ajout de CODE et PROD. Il faudra ensuite ajouter ce qu'il y avait dan TMP

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import cmd
 
2
 
 
3
class Interpreter(cmd.Cmd):
 
4
    def __init__(self):
 
5
        cmd.Cmd.__init__(self)
 
6
        self.prompt = "> "
 
7
        
 
8
    def do_hello(self,s):
 
9
        print "hello",s
 
10
        
 
11
    def do_sayhi(self,name):
 
12
        print "Hi",name
 
13
        
 
14
i = Interpreter()
 
15
i.cmdloop()