diff options
author | Guido van Rossum <guido@python.org> | 2002-09-17 20:36:40 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-09-17 20:36:40 (GMT) |
commit | 16aac45fc269ad355f069d5f76a0f4cafd06063f (patch) | |
tree | 1941156fe4df24b0c5a34d25174e3c1473c6e8d7 /Demo/sgi/flp | |
parent | d679e09970465d1b914b7d3dc11eaddbbcd6d289 (diff) | |
download | cpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.zip cpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.tar.gz cpython-16aac45fc269ad355f069d5f76a0f4cafd06063f.tar.bz2 |
Remove the SGI demos. These were all ancient and nobody cared enough.
Diffstat (limited to 'Demo/sgi/flp')
-rw-r--r-- | Demo/sgi/flp/.cvsignore | 1 | ||||
-rwxr-xr-x | Demo/sgi/flp/tcache.fd | 51 | ||||
-rwxr-xr-x | Demo/sgi/flp/tcache.py | 32 | ||||
-rwxr-xr-x | Demo/sgi/flp/test_cb.fd | 75 | ||||
-rwxr-xr-x | Demo/sgi/flp/test_cb.py | 61 | ||||
-rwxr-xr-x | Demo/sgi/flp/test_nocb.fd | 75 | ||||
-rwxr-xr-x | Demo/sgi/flp/test_nocb.py | 45 |
7 files changed, 0 insertions, 340 deletions
diff --git a/Demo/sgi/flp/.cvsignore b/Demo/sgi/flp/.cvsignore deleted file mode 100644 index 4cee222..0000000 --- a/Demo/sgi/flp/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -tcache.fdc test_cb.fdc test_nocb.fdc diff --git a/Demo/sgi/flp/tcache.fd b/Demo/sgi/flp/tcache.fd deleted file mode 100755 index 2ae91fa..0000000 --- a/Demo/sgi/flp/tcache.fd +++ /dev/null @@ -1,51 +0,0 @@ -Magic: 12321 - -Internal Form Definition File - (do not change) - -Number of forms: 2 - -=============== FORM =============== -Name: first -Width: 340.000000 -Height: 160.000000 -Number of Objects: 1 - --------------------- -class: 1 -type: 1 -box: 0.000000 0.000000 340.000000 160.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 10.000000 -lcol: 0 -label: -name: -callback: -argument: - -=============== FORM =============== -Name: second -Width: 150.000000 -Height: 400.000000 -Number of Objects: 1 - --------------------- -class: 1 -type: 1 -box: 0.000000 0.000000 150.000000 400.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 10.000000 -lcol: 0 -label: -name: -callback: -argument: - -============================== -create_the_forms diff --git a/Demo/sgi/flp/tcache.py b/Demo/sgi/flp/tcache.py deleted file mode 100755 index cf713fc..0000000 --- a/Demo/sgi/flp/tcache.py +++ /dev/null @@ -1,32 +0,0 @@ -# Test bug in caching of forms - -import sys -import os -import flp - -filename = 'tcache.fd' -cachename = filename + 's' - -def first(): - try: - os.unlink(cachename) - except os.error: - pass - first = flp.parse_form(filename, 'first') - -def second(): - forms = flp.parse_forms(filename) - k = forms.keys() - if 'first' in k and 'second' in k: - print 'OK' - else: - print 'BAD!', k - -def main(): - if sys.argv[1:]: - second() - else: - first() - print 'Now run the script again with an argument' - -main() diff --git a/Demo/sgi/flp/test_cb.fd b/Demo/sgi/flp/test_cb.fd deleted file mode 100755 index e83fd1f..0000000 --- a/Demo/sgi/flp/test_cb.fd +++ /dev/null @@ -1,75 +0,0 @@ -Magic: 12321 - -Internal Form Definition File - (do not change) - -Number of forms: 1 - -=============== FORM =============== -Name: main_form -Width: 170.000000 -Height: 190.000000 -Number of Objects: 4 - --------------------- -class: 1 -type: 1 -box: 0.000000 0.000000 170.000000 190.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: -name: -callback: -argument: - --------------------- -class: 11 -type: 0 -box: 10.000000 140.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: Button 1 -name: button1 -callback: button1CB -argument: 0 - --------------------- -class: 11 -type: 0 -box: 10.000000 100.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: Button 2 -name: button2 -callback: button2CB -argument: 0 - --------------------- -class: 11 -type: 6 -box: 10.000000 10.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: EXIT -name: exitbutton -callback: exitbuttonCB -argument: 0 - -============================== -create_the_forms diff --git a/Demo/sgi/flp/test_cb.py b/Demo/sgi/flp/test_cb.py deleted file mode 100755 index 4163503..0000000 --- a/Demo/sgi/flp/test_cb.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Example 2 - Using fl in python with callbacks. -# -# The form is named 'main_form' and resides on file 'test_cb.fd'. -# It has three objects named button1, button2 and exitbutton. -# All buttons have callbacks with the same names as their corresponding -# buttons but with CB appended. -# -import fl # The forms library -import FL # Symbolic constants for the above -import flp # The module to parse .fd files -import sys - -# The following struct is created to hold the instance variables -# main_form, button1, button2 and exitbutton. - -class myform: - # - # The constructor parses and creates the form, but doesn't - # display it (yet). - def __init__(self, number): - # - # First we parse the form - parsetree = flp.parse_form('test_cb', 'main_form') - # - # Next we create it - - flp.create_full_form(self, parsetree) - - # And keep our number - self.number = number - - # - # The show function displays the form. It doesn't do any interaction, - # though. - def show(self): - self.main_form.show_form(FL.PLACE_SIZE, 1, '') - - # The callback functions - def button1CB(self, obj, arg): - print 'Button 1 pressed on form', self.number - - def button2CB(self, obj, arg): - print 'Button 2 pressed on form', self.number - - def exitbuttonCB(self, obj, arg): - print 'Ok, bye bye' - sys.exit(0) - -# -# The main program. Instantiate two variables of the forms class -# and interact with them. - -form1 = myform(1) -form2 = myform(2) - -form1.show() -form2.show() - -obj = fl.do_forms() -print 'do_forms() returned. This should not happen. obj=', obj diff --git a/Demo/sgi/flp/test_nocb.fd b/Demo/sgi/flp/test_nocb.fd deleted file mode 100755 index 4d3f7ef..0000000 --- a/Demo/sgi/flp/test_nocb.fd +++ /dev/null @@ -1,75 +0,0 @@ -Magic: 12321 - -Internal Form Definition File - (do not change) - -Number of forms: 1 - -=============== FORM =============== -Name: main_form -Width: 170.000000 -Height: 190.000000 -Number of Objects: 4 - --------------------- -class: 1 -type: 1 -box: 0.000000 0.000000 170.000000 190.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: -name: -callback: -argument: - --------------------- -class: 11 -type: 0 -box: 10.000000 140.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: Button 1 -name: button1 -callback: -argument: - --------------------- -class: 11 -type: 0 -box: 10.000000 100.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: Button 2 -name: button2 -callback: -argument: - --------------------- -class: 11 -type: 6 -box: 10.000000 10.000000 150.000000 40.000000 -boxtype: 1 -colors: 47 47 -alignment: 4 -style: 0 -size: 11.000000 -lcol: 0 -label: EXIT -name: exitbutton -callback: -argument: - -============================== -create_the_forms diff --git a/Demo/sgi/flp/test_nocb.py b/Demo/sgi/flp/test_nocb.py deleted file mode 100755 index 6346da3..0000000 --- a/Demo/sgi/flp/test_nocb.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Example 1 - Using fl in python without callbacks. -# -# The form is named 'main_form' and resides on file 'test_nocb.fd'. -# It has three objects named button1, button2 and exitbutton. -# -import fl # The forms library -import FL # Symbolic constants for the above -import flp # The module to parse .fd files -import sys - -# The following struct is created to hold the instance variables -# main_form, button1, button2 and exitbutton. - -class struct: pass -container = struct() - -# -# We now first parse the forms file - -parsetree = flp.parse_form('test_nocb', 'main_form') - -# -# Next we create it - -flp.create_full_form(container, parsetree) - -# -# And display it - -container.main_form.show_form(FL.PLACE_MOUSE, 1, '') - -# -# And interact until the exit button is pressed -while 1: - selected_obj = fl.do_forms() - if selected_obj == container.button1: - print 'Button 1 selected' - elif selected_obj == container.button2: - print 'Button 2 selected' - elif selected_obj == container.exitbutton: - print 'Ok, bye bye' - sys.exit(0) - else: - print 'do_forms() returned unknown object ', selected_obj |