diff options
author | Dave Beazley <dave-swig@dabeaz.com> | 2002-11-30 22:01:28 +0000 |
---|---|---|
committer | Dave Beazley <dave-swig@dabeaz.com> | 2002-11-30 22:01:28 +0000 |
commit | 12a43edc2df8853e8e0315f742e57be88f0c4269 (patch) | |
tree | e3237f5f8c0a67c9bfa9bb5d6d095a739a49e4b2 /Examples/python/enum | |
parent | 5fcae5eb66d377e1c3f81da7465c44a62295a72b (diff) | |
download | swig-12a43edc2df8853e8e0315f742e57be88f0c4269.tar.gz |
The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/python/enum')
-rw-r--r-- | Examples/python/enum/.cvsignore | 9 | ||||
-rw-r--r-- | Examples/python/enum/Makefile | 3 | ||||
-rw-r--r-- | Examples/python/enum/example.py | 30 | ||||
-rw-r--r-- | Examples/python/enum/runme.py | 31 |
4 files changed, 42 insertions, 31 deletions
diff --git a/Examples/python/enum/.cvsignore b/Examples/python/enum/.cvsignore new file mode 100644 index 000000000..c50c39e9f --- /dev/null +++ b/Examples/python/enum/.cvsignore @@ -0,0 +1,9 @@ +*_wrap.c +*_wrap.cxx +*.dll +*.dsw +*.ncb +*.opt +*.plg +Release +Debug diff --git a/Examples/python/enum/Makefile b/Examples/python/enum/Makefile index 71af176f9..19580883e 100644 --- a/Examples/python/enum/Makefile +++ b/Examples/python/enum/Makefile @@ -14,6 +14,7 @@ static:: TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static clean:: - rm -f *_wrap* *.o *~ *.so mypython *.pyc .~* core + $(MAKE) -f $(TOP)/Makefile python_clean + rm -f $(TARGET).py check: all diff --git a/Examples/python/enum/example.py b/Examples/python/enum/example.py deleted file mode 100644 index 92979783e..000000000 --- a/Examples/python/enum/example.py +++ /dev/null @@ -1,30 +0,0 @@ -# file: example.py - -import example - -# ----- Object creation ----- - -# Print out the value of some enums -print "*** color ***" -print " RED =", example.RED -print " BLUE =", example.BLUE -print " GREEN =", example.GREEN - -print "\n*** Foo::speed ***" -print " Foo_IMPULSE =", example.Foo_IMPULSE -print " Foo_WARP =", example.Foo_WARP -print " Foo_LUDICROUS =", example.Foo_LUDICROUS - -print "\nTesting use of enums with functions\n" - -example.enum_test(example.RED, example.Foo_IMPULSE) -example.enum_test(example.BLUE, example.Foo_WARP) -example.enum_test(example.GREEN, example.Foo_LUDICROUS) -example.enum_test(1234,5678) - -print "\nTesting use of enum with class method" -f = example.new_Foo() - -example.Foo_enum_test(f,example.Foo_IMPULSE) -example.Foo_enum_test(f,example.Foo_WARP) -example.Foo_enum_test(f,example.Foo_LUDICROUS) diff --git a/Examples/python/enum/runme.py b/Examples/python/enum/runme.py new file mode 100644 index 000000000..e90f5d66f --- /dev/null +++ b/Examples/python/enum/runme.py @@ -0,0 +1,31 @@ +# file: example.py + +import example + +# ----- Object creation ----- + +# Print out the value of some enums +print "*** color ***" +print " RED =", example.RED +print " BLUE =", example.BLUE +print " GREEN =", example.GREEN + +print "\n*** Foo::speed ***" +print " Foo_IMPULSE =", example.Foo.IMPULSE +print " Foo_WARP =", example.Foo.WARP +print " Foo_LUDICROUS =", example.Foo.LUDICROUS + +print "\nTesting use of enums with functions\n" + +example.enum_test(example.RED, example.Foo.IMPULSE) +example.enum_test(example.BLUE, example.Foo.WARP) +example.enum_test(example.GREEN, example.Foo.LUDICROUS) +example.enum_test(1234,5678) + +print "\nTesting use of enum with class method" +f = example.Foo() + +f.enum_test(example.Foo.IMPULSE) +f.enum_test(example.Foo.WARP) +f.enum_test(example.Foo.LUDICROUS) + |