3 import os
, sys
, getopt
, re
9 opts
, args
= getopt
.gnu_getopt( sys
.argv
[1:], "v" )
10 except getopt
.GetoptError
:
13 for ( opt
, arg
) in opts
:
15 print "Pirhanna! Version " + Piranha
.version()
18 piranha
= Piranha
.Piranha()
23 line
= raw_input( "P> " )
29 command
= parse( line
)
31 print "Unrecognized input."
33 if command
[0] == "quit":
36 elif command
[0] == "list":
39 print "Invalid command."
43 parser
= re
.compile( "^([a-zA-Z]+)( [a-zA-Z0-9:]+)*" )
44 matches
= parser
.search( line
)
47 if matches
.lastindex
== None:
51 for i
in range( 1, matches
.lastindex
+1 ):
52 command
.append(matches
.group(i
))
56 if __name__
== "__main__":