A class with built-in doctest feature ?

2006-02-01 Thread Runsun Pan
oc__ that offers some sort of documentation, a mechnism like what I am proposing can provide "customization on the fly" feature to allow manipulations of the doctext at run-time. For example, C( ).toHtml( ) to convert the __doc__ to a webpage by converting it throu reStructuredText. --

Re: OT: Re: Using non-ascii symbols

2006-01-31 Thread Runsun Pan
refore hopeless in Taiwan (at least currently). Maybe Norwegians have some sort of that mentality too ? Considering that they rather to elect people from the old foreign power ... On 1/29/06, Magnus Lycka <[EMAIL PROTECTED]> wrote: > Runsun Pan wrote: > > The simplified chinese exists

A class with eventhandlers ?

2006-01-29 Thread Runsun Pan
('IndexError', IndexErrorHook) or, more specific, a function/method-specific error handling feature: c.load.onError( IOErrorHook) c.load( filename ) Is there such a mechnism around? If not, is it possible to make such a thing ? -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ Runsun Pan, PhD [EMAIL

Re: Using non-ascii symbols

2006-01-27 Thread Runsun Pan
... to my knowledge, all of the input tablets that using OCR has a training feature. You can teach the program to recognize your own order of strokes. The ability to train (be trained) is a very key element of such an input device. -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ Runsun Pan, PhD [EMAIL PROTE

Re: Using non-ascii symbols

2006-01-27 Thread Runsun Pan
ll ONLY be people using only Big5. That means, if it exists, the chance of showing it to other-language-users probably be extremely nil, Think about this: there are still a whole lot of people who don't know English at all. If no such a 'Big5-specific' programming tool around, their chances of learning programming is completely rid off. -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ Runsun Pan, PhD [EMAIL PROTECTED] Nat'l Center for Macromolecular Imaging http://ncmi.bcm.tmc.edu/ncmi/ ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Mining strings from a HTML document.

2006-01-26 Thread Runsun Pan
artswith or ends with s1 or s2, special consideration should be taken. Line-2 and -4 are just common practice of list slicing that u should be able to find in any python tutorial. Let us know if it's still not clear. -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ Runsun Pan, PhD [EMAIL PROTECTED] Nat'l Center for Macromolecular Imaging http://ncmi.bcm.tmc.edu/ncmi/ ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using non-ascii symbols

2006-01-26 Thread Runsun Pan
On 1/26/06, Terry Hancock <[EMAIL PROTECTED]> wrote: > On Thu, 26 Jan 2006 01:12:10 -0600 > Runsun Pan <[EMAIL PROTECTED]> wrote: > > Error) in python. I'd love to see if I can use han char > > for all those keywords like import, but it doesn't work. >

Re: Using non-ascii symbols

2006-01-25 Thread Runsun Pan
te, 'cos there's no need to simplify any more.   -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~Runsun Pan, PhD[EMAIL PROTECTED]Nat'l Center for Macromolecular Imaging http://ncmi.bcm.tmc.edu/ncmi/~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Being unjust

2006-01-22 Thread Runsun Pan
tep. For the package developers, if this 'to html' is what they have in mind, now they only have to worry about converting their code to BGC, but not all those html-specific details. -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~Runsun Pan, PhD[EMAIL PROTECTED]Nat'l Center for Macromolecul

Re: LocaWapp: localhost web applications (v.03 - 2005 Dec 31)

2006-01-22 Thread Runsun Pan
server.   -- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~Runsun Pan, PhD[EMAIL PROTECTED] Nat'l Center for Macromolecular Imaginghttp://ncmi.bcm.tmc.edu/ncmi/~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Read from Serial Port

2006-01-21 Thread Runsun Pan
How about reading from the USB ports ?-- ~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~Runsun Pan, PhD[EMAIL PROTECTED]Nat'l Center for Macromolecular Imaging http://ncmi.bcm.tmc.edu/ncmi/~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Being unjust

2006-01-18 Thread Runsun Pan
print p.toGui( face = 'html')   # generate a webpage       p.toGui( face = 'wxPython' ).run  # generate a desktop program, using wxpython   There are many advantages for this sort of "universal gui core". At least, a user will only need to learn one set of gui approach

Re: list-comprehension and map question (simple)

2005-03-30 Thread runsun pan
Thx, Robert. I did some tests: >>> xs = range(1) >>> ys = range(0,2,2) >>> def m1(x, count=100): ... for c in range(count): ...y = map(float, x) ... return y >>> def L1(x, count=100): ... for c in range(count): ...y = [float(z) for z in x] ... return y >>> d

Re: instance vs class attributes

2005-03-29 Thread runsun pan
>>> shy._Shy__mangled_method() Ive been mangled! Hi Brian, can you explain how this could possibly work? First of all it's not standard python usage, and secondly it's not working on my computer... pan -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding methods in classes you don't control

2005-03-28 Thread runsun pan
good point, andy. -- http://mail.python.org/mailman/listinfo/python-list

Re: list-comprehension and map question (simple)

2005-03-28 Thread runsun pan
I remember reading somewhere that the map, filter, reduce are much faster than list comp. -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding methods in classes you don't control

2005-03-28 Thread runsun pan
Some untested idea: 1. find what is the base class of wxPython 2. x= subclass from that base class 3. make wxPython.__base__ = x Don't know if this works, but this is what I would try if I were u ('cos its ease). -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie Shell Editor Question

2005-03-28 Thread runsun pan
whatever you type after the >>> is either a statement that command python to do something (like "print 'hello'"), or an object that might or might not contain/return a value. The 'hello' you typed (the one that caused error) is simply a word. It is not a command, it is not a variable, it is not an

Re: String Splitter Brain Teaser

2005-03-28 Thread runsun pan
For the fans of funtional programming: >>> s='ATT/GATA/G' >>> [y.split('/') for y in (' '.join([x for x in s]).replace(' / ', '/')).split()] [['A'], ['T'], ['T', 'G'], ['A'], ['T'], ['A', 'G']] -- http://mail.python.org/mailman/listinfo/python-list

Re: tree data structure

2005-03-26 Thread runsun pan
couple of links for python tree: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/217212 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/201423 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/305313 http://www.rexx.com/~dkuhlman/ -- http://mail.python.org/mailman/listinfo/