Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, all, It is kind of a MacGyver question. I am just looking for some general suggestions/pointer. First let me first describe the development environment I am in: it is a locked down WinXP PC with limited development tools and libraries. At my disposal I have python 2.6 , webkit 5.33 dll, wx

Re: Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, Chris, Thanks for your reply. I really do not have any requirement. It is more a curiosity question (not work related). I'd like to find out how python can be used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy idea/proje

An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of my colleague asked an interesting: *If Python use indentation to denote scope, why it still needs semi-colon at the end of f

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Awesome! Thanks for blog post link Cheers On Tue, Jul 12, 2011 at 12:16 AM, Thomas Jollans wrote: > On 07/11/2011 03:51 PM, Anthony Kong wrote: > > Hi, all, > > > > Lately I am giving some presentations to my colleagues about the python > > language. A new internal

My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of the goals of the presentations, as told by the 'sponsor' of the presentation, is to help the existing Java/Excel VBA programm

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
8163 02:59 PM, Anthony Kong wrote: > >> Hi, all, >> >> Lately I am giving some presentations to my colleagues about the python >> language. A new internal project is coming up which will require the use >> of >> python. >> >> One of my colleague

Property setter and lambda question

2011-07-11 Thread Anthony Kong
Hi, all, This question is in the same context of my two earlier questions. This question was raised by some python beginners, and I would like to check with the list to ensure I provide a correct answer. Here is a code snippet I used to demonstrate the keyword *property*: class A(object):

Re: My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
t; On 07/11/2011 05:07 PM, Anthony Kong wrote: > > Hi, all, > > > > Lately I am giving some presentations to my colleagues about the python > > language. A new internal project is coming up which will require the use > > of python. > > > > One of the goals

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
as Jollans wrote: > On 07/11/2011 05:54 PM, Anthony Kong wrote: > > Hi, all, > > > > This question is in the same context of my two earlier questions. This > > question was raised by some python beginners, and I would like to check > > with the list to ensure I provi

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
Good point! Need to get my terminology right. Thanks On Tue, Jul 12, 2011 at 2:43 AM, Ian Kelly wrote: > On Mon, Jul 11, 2011 at 9:54 AM, Anthony Kong > wrote: > > Hi, all, > > This question is in the same context of my two earlier questions. This > > question w

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
> > PS: are you sure the lambda self: self.__foo() trick works, with > subclasses or otherwise? I haven't tested it, and I'm not saying it > doesn't, but I have a feeling double-underscore name mangling might be a > problem somewhere down the line? > > Awesome, Thomas. The trick only works if there

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
On Tue, Jul 12, 2011 at 3:41 AM, Ian Kelly wrote: > On Mon, Jul 11, 2011 at 11:21 AM, Anthony Kong > wrote: > > Awesome, Thomas. The trick only works if there is only one leading > > underscore in the method names. > > The following example works as I expected for the

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-13 Thread Anthony Kong
Thanks, mate! I was writing that up really late at night. Somehow I changed term to semi-colon half way through, Cheers On Wed, Jul 13, 2011 at 5:36 PM, Thorsten Kampe wrote: > * Dave Angel (Mon, 11 Jul 2011 10:36:48 -0400) > > On 01/-10/-28163 02:59 PM, Anthony Kong wrote: > >

Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
Hi, all, If you have read my previous posts to the group, you probably have some idea why I asked this question. I am giving a few presentations on python to my colleagues who are mainly java developers and starting to pick up python at work. So I have picked this topic for one of my presentati

Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
(My post did not appear in the mailing list, so this is my second try. Apology if it ends up posted twice) Hi, all, If you have read my previous posts to the group, you probably have some idea why I asked this question. I am giving a few presentations on python to my colleagues who are mainly

Re: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
Hi, James, > > You might also want to cover gotchas like Python's references. > Not sure what it means in the context of functional programming. If you can give some code to demonstrate, it will be great. Cheers -- Tony Kong *blog:* www.ahwkong.com Don’t EVER make the mistake that you can de

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
One of the main difference is that pypy supports only R-Python, which stands for 'Restricted Python". It is a subset of C-python language. See here for more info: http://codespeak.net/pypy/dist/pypy/doc/coding-guide.html#rpython-definition-not Cheers On Thu, Jul 14, 2011 at 12:06 AM, ArrC wrot

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
I stand corrected. Thanks Ian Cheers On Thu, Jul 14, 2011 at 1:18 AM, Ian Kelly wrote: > On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong > wrote: > > One of the main difference is that pypy supports only R-Python, which > stands > > for 'Restricted Python".

Re: Aw: Re: Aw: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-18 Thread Anthony Kong
Thanks for all the great suggestion. First of all, Carl is right that it does not take much to impress a java programmer about the expressiveness of functional programming. Covered map, reduce and filter as Rainer suggested. Emphasized the advantages of functional style as summarised by Steve

Question about compiling python 30 from subversion repository on OSX

2011-04-23 Thread Anthony Kong
Hi, all, I have checked out source code from this url http://svn.python.org/projects/python/branches/py3k, then run ./configure --with-universal-archs=64-bit make First of all, I got this message: --- Modules/Setup.dist is newer than Modules/Setup;

Design Pattern and Python: Any book recommendation? Your view?

2011-11-03 Thread Anthony Kong
Sorry to resurrect this topic. By google search the last discussion was in 2003. I would like to find out what is the current prevailing view or consensus (if any) on the use of Design Pattern in python? I am doing some 'fact-finding' in this area on request of my colleagues. Some of them want