Invitation to connect on LinkedIn

2009-10-14 Thread Frank Pan
LinkedIn Frank Pan requested to add you as a connection on LinkedIn: -- Jaime, I'd like to add you to my professional network on LinkedIn. - Frank Accept invitation from Frank Pan http://www.linkedin.

Re: String to sequence

2009-03-14 Thread Frank Pan
>>> a = eval("[%s]" % "'AAR','ABZ','AGA','AHO','ALC','LEI','AOC','EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'") >>> a ['AAR', 'ABZ', 'AGA', 'AHO', 'ALC', 'LEI', 'AOC', 'EGC', 'SXF', 'BZR', 'BIQ', 'BLL', 'BHX', 'BLQ'] On Sat, Mar 14, 2009 at 5:09 PM, mattia wrote: > How can I convert the following

Re: a question about the #prefix of sys.argv

2008-06-02 Thread Fossil Pan
On Jun 2, 8:50 am, Aldarion <[EMAIL PROTECTED]> wrote: > On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote: > > > Aldarion wrote: > > > for the little script > > > #egg.py > > > import sys > > > for k,v in enumerate(sys.argv): > > > print k,v > > > > it ignores the part after # on linux > >

Error message from function definition

2008-03-28 Thread aeneng pan
Dear community members, I just start to use python in numerical calculation. and I encountered some difficulties when I define my own function. Here is a piece of codes to compute the cross product of two 3x1 vector. can any one help me to find what is wrong with it? please see the codes below.

[Python] Matrix convergence

2007-09-30 Thread Zhengzheng Pan
Hi all, I'm trying to check whether a (stochastic/transition) matrix converges, i.e. a function/method that will return True if the input matrix sequence shows convergence and False otherwise. The background is a Markov progress, so the special thing about the transition matrix is the values of el

is there any Report module in python?

2006-08-06 Thread pan
hi.just like ReportBuilder in delphi.i did some google, but can't find. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python audio output switch

2006-07-26 Thread Pan Xingzhi
LSA, though maybe I'll have to write sth in C :) Ben Sizer wrote: > Pan Xingzhi wrote: >> Guys: >> >> Hi there. Recently I'll have to write a quite interesting program >> in Python on a Linux box. What I need is a function which allows the >> user to

Python audio output switch

2006-07-25 Thread Pan Xingzhi
edia frameworks but still need some light. Does anybody have experience on this? Thanks in advance! Regards, Pan Xingzhi -- http://mail.python.org/mailman/listinfo/python-list

Re: dicts vs classes

2006-07-25 Thread Pan Xingzhi
dict is already a classwhy another? Guyon Morée wrote: > Hi all, > > I'm using simple classes as a container of named values and I'm > instantiating a lot of them in a very short time. > > i was wondering if there is any benefit in using dicts instead from a > performance/memory usage point

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: Redirecting standard out in a single namespace

2006-01-23 Thread Pan Menghan
Maybe you can use __name__ to determine which module the print statement is in:class out: def write(s,a): if __name__ =="myModule": mylog.write(a) else: sys.__stdout__.write(a)sys.stdout = out() -- 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: Display of JPEG images from Python

2006-01-08 Thread py pan
I remember seeing somewhere saying that the "wx.StaticBitmap" is only for small image (64x64?), is that true?On 6 Jan 2006 07:01:24 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: You can f.i. use wxPython (www.wxPython.org). Here is a compact andugly, but (almost) minimal, example of a python

Re: python coding contest

2005-12-27 Thread py pan
On 12/27/05, Christian Tismer <[EMAIL PROTECTED]> wrote: And we are of course implementing algorithms with a twisted goal-setin mind: How to express this the shortest way, not elegantly,just how to shave off one or even two bytes, re-iterating thepossible algorithms again and again, just to find a

Re: python coding contest

2005-12-27 Thread py pan
When you guys say 127~150 characters, did you guys mean usinging test_vectors.py in some way? Or there's no import at all? -- http://mail.python.org/mailman/listinfo/python-list

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/