Created
August 12, 2015 09:35
-
-
Save caad1229/d4c807daa2d0484e4663 to your computer and use it in GitHub Desktop.
command module test python script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from cmd import Cmd | |
| class testCmd(Cmd): | |
| prompt = "hoge) " | |
| def __init__(self): | |
| Cmd.__init__(self) | |
| def do_exe(self, arg): | |
| print "do anything" | |
| def help_exe(self): | |
| print "help : exe" | |
| if __name__ == '__main__': | |
| testCmd().cmdloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment