[Python-checkins] CVS: python/dist/src/Lib/lib-old Para.py,1.4,1.5
Guido van Rossum
python-dev@python.org
Mon, 8 May 2000 13:29:53 -0400 (EDT)
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/lib-stdwin Abstract.py,1.6,NONE BoxParent.py,1.4,NONE Buttons.py,1.10,NONE CSplit.py,1.5,NONE DirList.py,1.7,NONE FormSplit.py,1.4,NONE HVSplit.py,1.6,NONE Histogram.py,1.5,NONE Sliders.py,1.8,NONE Soundogram.py,1.4,NONE Split.py,1.9,NONE StripChart.py,1.7,NONE TextEdit.py,1.7,NONE TransParent.py,1.5,NONE VUMeter.py,1.4,NONE WindowParent.py,1.11,NONE WindowSched.py,1.7,NONE anywin.py,1.2,NONE basewin.py,1.2,NONE dirwin.py,1.5,NONE filewin.py,1.4,NONE formatter.py,1.6,NONE gwin.py,1.6,NONE listwin.py,1.1,NONE mainloop.py,1.7,NONE rect.py,1.4,NONE srcwin.py,1.3,NONE stdwinevents.py,1.4,NONE stdwinq.py,1.1,NONE tablewin.py,1.4,NONE textwin.py,1.3,NONE wdb.py,1.7,NONE wdbframewin.py,1.7,NONE wdbsrcwin.py,1.3,NONE
- Next message: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 mimepars.py,NONE,1.1 rfc822-n.py,NONE,1.1 robotpar.py,NONE,1.1 sre_comp.py,NONE,1.1 sre_cons.py,NONE,1.1 sre_pars.py,NONE,1.1 stringol.py,NONE,1.1 test_con.py,NONE,1.1 test_ext.py,NONE,1.1 test_for.py,NONE,1.1 test_mma.py,NONE,1.1 test_pye.py,NONE,1.1 test_uni.py,NONE,1.1 test_win.py,NONE,1.1 test_zip.py,NONE,1.1 threadst.py,NONE,1.1 userstri.py,NONE,1.1 basehttp.py,1.4,1.5 cgihttps.py,1.6,1.7 configpa.py,1.5,1.6 exceptio.py,1.7,1.8 fileinpu.py,1.3,1.4 formatte.py,1.8,1.9 gopherli.py,1.2,1.3 htmlenti.py,1.1,1.2 linecach.py,1.1,1.2 macurl2p.py,1.5,1.6 mimetool.py,1.6,1.7 mimetype.py,1.5,1.6 multifil.py,1.3,1.4 nturl2pa.py,1.3,1.4 posixfil.py,1.7,1.8 posixpat.py,1.9,1.10 py_compi.py,1.8,1.9 queue.py,1.6,1.7 regex_sy.py,1.2,1.3 rlcomple.py,1.4,1.5 simpleht.py,1.4,1.5 socketse.py,1.8,1.9 statcach.py,1.1,1.2 stringio.py,1.3,1.4 telnetli.py,1.3,1.4 test_bin.py,1.2,1.3 test_cpi.py,1.1,1.2 test_fcn.py,1.5,1.6 test_gdb.py,1.1,1.2 test_gra.py,!
1.2,1.3 test_lon.py,1.1,1.2 test_rfc.py,1.1,1.2 test_soc.py,1.5,1.6 test_typ.py,1.6,1.7 test_zli.py,1.4,1.5 threadin.py,1.1,1.2 tracebac.py,1.6,1.7 userdict.py,1.5,1.6 userlist.py,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /projects/cvsroot/python/dist/src/Lib/lib-old
In directory eric:/projects/python/develop/guido/src/Lib/lib-old
Modified Files:
Para.py
Log Message:
Deleted the stdwin-based test() function.
Index: Para.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/lib-old/Para.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** Para.py 2000/02/15 21:57:14 1.4
--- Para.py 2000/05/08 17:29:50 1.5
***************
*** 342,409 ****
top1, bottom1 = top2, bottom2
d.invert((h1, top1), (h2, bottom2))
-
-
- # Test class Para
- # XXX This was last used on the Mac, hence the weird fonts...
- def test():
- import stdwin
- from stdwinevents import *
- words = 'The', 'quick', 'brown', 'fox', 'jumps', 'over', \
- 'the', 'lazy', 'dog.'
- paralist = []
- for just in 'l', 'r', 'lr', 'c':
- p = Para()
- p.just = just
- p.addword(stdwin, ('New York', 'p', 12), words[0], 1, 1)
- for word in words[1:-1]:
- p.addword(stdwin, None, word, 1, 1)
- p.addword(stdwin, None, words[-1], 2, 4)
- p.addword(stdwin, ('New York', 'b', 18), 'Bye!', 0, 0)
- p.addword(stdwin, ('New York', 'p', 10), 'Bye!', 0, 0)
- paralist.append(p)
- window = stdwin.open('Para.test()')
- start = stop = selpara = None
- while 1:
- etype, win, detail = stdwin.getevent()
- if etype == WE_CLOSE:
- break
- if etype == WE_SIZE:
- window.change((0, 0), (1000, 1000))
- if etype == WE_DRAW:
- width, height = window.getwinsize()
- d = None
- try:
- d = window.begindrawing()
- d.cliprect(detail)
- d.erase(detail)
- v = 0
- for p in paralist:
- v = p.render(d, 0, v, width)
- if p == selpara and \
- start <> None and stop <> None:
- p.invert(d, start, stop)
- finally:
- if d: d.close()
- if etype == WE_MOUSE_DOWN:
- if selpara and start <> None and stop <> None:
- d = window.begindrawing()
- selpara.invert(d, start, stop)
- d.close()
- start = stop = selpara = None
- mouseh, mousev = detail[0]
- for p in paralist:
- start = p.whereis(stdwin, mouseh, mousev)
- if start <> None:
- selpara = p
- break
- if etype == WE_MOUSE_UP and start <> None and selpara:
- mouseh, mousev = detail[0]
- stop = selpara.whereis(stdwin, mouseh, mousev)
- if stop == None: start = selpara = None
- else:
- if start > stop:
- start, stop = stop, start
- d = window.begindrawing()
- selpara.invert(d, start, stop)
- d.close()
- window.close()
--- 342,343 ----
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/lib-stdwin Abstract.py,1.6,NONE BoxParent.py,1.4,NONE Buttons.py,1.10,NONE CSplit.py,1.5,NONE DirList.py,1.7,NONE FormSplit.py,1.4,NONE HVSplit.py,1.6,NONE Histogram.py,1.5,NONE Sliders.py,1.8,NONE Soundogram.py,1.4,NONE Split.py,1.9,NONE StripChart.py,1.7,NONE TextEdit.py,1.7,NONE TransParent.py,1.5,NONE VUMeter.py,1.4,NONE WindowParent.py,1.11,NONE WindowSched.py,1.7,NONE anywin.py,1.2,NONE basewin.py,1.2,NONE dirwin.py,1.5,NONE filewin.py,1.4,NONE formatter.py,1.6,NONE gwin.py,1.6,NONE listwin.py,1.1,NONE mainloop.py,1.7,NONE rect.py,1.4,NONE srcwin.py,1.3,NONE stdwinevents.py,1.4,NONE stdwinq.py,1.1,NONE tablewin.py,1.4,NONE textwin.py,1.3,NONE wdb.py,1.7,NONE wdbframewin.py,1.7,NONE wdbsrcwin.py,1.3,NONE
- Next message: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 mimepars.py,NONE,1.1 rfc822-n.py,NONE,1.1 robotpar.py,NONE,1.1 sre_comp.py,NONE,1.1 sre_cons.py,NONE,1.1 sre_pars.py,NONE,1.1 stringol.py,NONE,1.1 test_con.py,NONE,1.1 test_ext.py,NONE,1.1 test_for.py,NONE,1.1 test_mma.py,NONE,1.1 test_pye.py,NONE,1.1 test_uni.py,NONE,1.1 test_win.py,NONE,1.1 test_zip.py,NONE,1.1 threadst.py,NONE,1.1 userstri.py,NONE,1.1 basehttp.py,1.4,1.5 cgihttps.py,1.6,1.7 configpa.py,1.5,1.6 exceptio.py,1.7,1.8 fileinpu.py,1.3,1.4 formatte.py,1.8,1.9 gopherli.py,1.2,1.3 htmlenti.py,1.1,1.2 linecach.py,1.1,1.2 macurl2p.py,1.5,1.6 mimetool.py,1.6,1.7 mimetype.py,1.5,1.6 multifil.py,1.3,1.4 nturl2pa.py,1.3,1.4 posixfil.py,1.7,1.8 posixpat.py,1.9,1.10 py_compi.py,1.8,1.9 queue.py,1.6,1.7 regex_sy.py,1.2,1.3 rlcomple.py,1.4,1.5 simpleht.py,1.4,1.5 socketse.py,1.8,1.9 statcach.py,1.1,1.2 stringio.py,1.3,1.4 telnetli.py,1.3,1.4 test_bin.py,1.2,1.3 test_cpi.py,1.1,1.2 test_fcn.py,1.5,1.6 test_gdb.py,1.1,1.2 test_gra.py,!
1.2,1.3 test_lon.py,1.1,1.2 test_rfc.py,1.1,1.2 test_soc.py,1.5,1.6 test_typ.py,1.6,1.7 test_zli.py,1.4,1.5 threadin.py,1.1,1.2 tracebac.py,1.6,1.7 userdict.py,1.5,1.6 userlist.py,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]