gopy/_examples/hi/test.py

48 lines
731 B
Python
Raw Normal View History

2015-07-24 14:16:31 +00:00
import hi
2015-07-25 15:35:14 +00:00
print "--- doc(hi)..."
print hi.__doc__
print "--- doc(hi.Hi)..."
print hi.Hi.__doc__
2015-07-24 14:16:31 +00:00
print "--- hi.Hi()..."
hi.Hi()
2015-07-25 15:35:14 +00:00
print "--- doc(hi.Hello)..."
print hi.Hello.__doc__
2015-07-24 14:16:31 +00:00
print "--- hi.Hello('you')..."
hi.Hello("you")
2015-07-25 15:35:14 +00:00
print "--- doc(hi.Add)..."
print hi.Add.__doc__
2015-07-24 14:16:31 +00:00
print "--- hi.Add(1, 41)..."
print hi.Add(1,41)
print "--- hi.Concat('4', '2')..."
print hi.Concat("4","2")
print "--- doc(hi.Person):"
print hi.Person.__doc__
print "--- p = hi.Person()..."
p = hi.Person()
print dir(p)
print "--- p.Name:", p.Name
print "--- p.Age:",p.Age
print "--- doc(hi.Greet):"
print p.Greet.__doc__
print "--- p.Greet()..."
print p.Greet()
2015-07-27 16:46:30 +00:00
2015-07-28 08:08:27 +00:00
print "--- p.String()..."
print p.String()
2015-07-24 14:16:31 +00:00
print "--- doc(p):"
print p.__doc__