is python a pure objected oriented language?<br><br><div class="gmail_quote">On Thu, Jan 29, 2009 at 2:08 PM, <span dir="ltr"><<a href="mailto:python-list-request@python.org">python-list-request@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Send Python-list mailing list submissions to<br>
<a href="mailto:python-list@python.org">python-list@python.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:python-list-request@python.org">python-list-request@python.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:python-list-owner@python.org">python-list-owner@python.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Python-list digest..."<br>
<br>Today's Topics:<br>
<br>
1. Re: dicts,instances,containers, slotted instances, et cetera.<br>
(Michele Simionato)<br>
2. Re: Recommendation for a small web framework like Perl's<br>
CGI::Application to run as CGI? (Jeroen Ruigrok van der Werven)<br>
3. Re: Profiling Python Apps on Mac? (Robert Kern)<br>
4. Re: Results of executing hyperlink in script (Tino Wildenhain)<br>
5. Re: I'm a python addict ! (<a href="mailto:afriere@yahoo.co.uk">afriere@yahoo.co.uk</a>)<br>
6. ANN: eGenix mx Base Distribution 3.1.2<br>
(eGenix Team: M.-A. Lemburg)<br>
<br><br>---------- Forwarded message ----------<br>From: Michele Simionato <<a href="mailto:michele.simionato@gmail.com">michele.simionato@gmail.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>
Date: Wed, 28 Jan 2009 22:17:12 -0800 (PST)<br>Subject: Re: dicts,instances,containers, slotted instances, et cetera.<br>On Jan 29, 12:23 am, <a href="mailto:ocsch...@gmail.com">ocsch...@gmail.com</a> wrote:<br>
<br>
> I just find it odd that there's no quick answer on the<br>
> fastest way in Python to implement a mapping in this context.<br>
<br>
A Python dict is as fast as you can get. If that is not enough, your<br>
only choice is to try something at the C level, which may give the<br>
desired speedup or not. Good luck!<br>
<br>
Michele Simionato<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Jeroen Ruigrok van der Werven <<a href="mailto:asmodai@in-nomine.org">asmodai@in-nomine.org</a>><br>To: excord80 <<a href="mailto:excord80@gmail.com">excord80@gmail.com</a>><br>
Date: Thu, 29 Jan 2009 07:31:54 +0100<br>Subject: Re: Recommendation for a small web framework like Perl's CGI::Application to run as CGI?<br>-On [20090128 20:36], excord80 (<a href="mailto:excord80@gmail.com">excord80@gmail.com</a>) wrote:<br>
>If that's correct, it would be great if there were a Werkzeug tutorial<br>
>on deploying it for use with CGI.<br>
<br>
There are some real life frontends for CGI, FCGI and WSGI in Zine[1]. Look<br>
in the servers directory in the repository.<br>
<br>
I'll double check the documentation and expand where necessary.<br>
<br>
[1] <a href="http://zine.pocoo.org/" target="_blank">http://zine.pocoo.org/</a><br>
<br>
--<br>
Jeroen Ruigrok van der Werven <asmodai(-at-)<a href="http://in-nomine.org" target="_blank">in-nomine.org</a>> / asmodai<br>
$B%$%'%k!<%s(B $B%i%&%U%m%C%/(B $B%t%!%s(B $B%G%k(B $B%&%'%k%t%'%s(B<br>
<a href="http://www.in-nomine.org/" target="_blank">http://www.in-nomine.org/</a> | <a href="http://www.rangaku.org/" target="_blank">http://www.rangaku.org/</a> | GPG: 2EAC625B<br>
Earth to earth, ashes to ashes, dust to dust...<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Robert Kern <<a href="mailto:robert.kern@gmail.com">robert.kern@gmail.com</a>><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Thu, 29 Jan 2009 00:47:46 -0600<br>
Subject: Re: Profiling Python Apps on Mac?<br>On 2009-01-28 13:14, RGK wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 &<br>
wxPython under OSX 10.4)<br>
<br>
As I make program architecture decisions, it would be nice to be able to<br>
profile the choices. Should I add that extra thread? Is this big-assed<br>
xml object I just created horribly bloated or kind of ordinary.<br>
<br>
Is there anything out there I should look into to if I want to see how<br>
those things are affecting my app? The closest I have is the widget<br>
iStat, but it's a very static low resolution view of what's really going<br>
on.<br>
</blockquote>
<br>
I have a script kernprof.py which provides a few conveniences over the builtin cProfile module. One of its modes of operation is to inject a decorator into the __builtins__. It will enable the profiler on entry to the method and disable it on exit. This lets you localize your profile results to just the part of your code that you are interested in. I found this especially useful in GUI apps which require user interaction to trigger the part of the code you are actually interesting in profiling. You don't want the interesting parts of your profile to be obscured by the GUI event loop waiting for your input.<br>
<br>
You can get it as part of my line_profiler package (which you may also be interested in; cProfile profiles function calls, line_profiler profiles individual lines).<br>
<br>
<a href="http://pypi.python.org/pypi/line_profiler" target="_blank">http://pypi.python.org/pypi/line_profiler</a><br>
<br>
You can view the profile results interactively with "python -m pstats my_script.py.prof", RunSnakeRun, or pyprof2calltree if you manage to install kcachegrind on your system:<br>
<br>
<a href="http://www.vrplumber.com/programming/runsnakerun/" target="_blank">http://www.vrplumber.com/programming/runsnakerun/</a><br>
<a href="http://pypi.python.org/pypi/pyprof2calltree/1.1.0" target="_blank">http://pypi.python.org/pypi/pyprof2calltree/1.1.0</a><br>
<br>
I don't recommend using hotshot because it is deprecated and slow to postprocess the data dumps. Also, I don't recommend using the plain profile module because it slows down your program rather more than cProfile. See the Python documentation for an overview of these modules:<br>
<br>
<a href="http://docs.python.org/library/profile" target="_blank">http://docs.python.org/library/profile</a><br>
<br>
-- <br>
Robert Kern<br>
<br>
"I have come to believe that the whole world is an enigma, a harmless enigma<br>
that is made terrible by our own mad attempt to interpret it as though it had<br>
an underlying truth."<br>
-- Umberto Eco<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Tino Wildenhain <<a href="mailto:tino@wildenhain.de">tino@wildenhain.de</a>><br>To: Tim Chase <<a href="mailto:python.list@tim.thechases.com">python.list@tim.thechases.com</a>><br>
Date: Thu, 29 Jan 2009 07:59:58 +0100<br>Subject: Re: Results of executing hyperlink in script<br>Tim Chase wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
1. This method was suggested by Cameron Laird:<br>
<br>
os.system("start %s" % URL)<br>
<br>
It works. But, if the URL contains character &, it will fail. For<br>
</blockquote>
<br>
<br>
As an aside, the START command is a bit picky regarding quotes. You have to use this horrible contortion<br>
<br>
os.system('start "title" "%s"' % URL)<br>
<br>
The "title" is optional content-wise, but required positionally if there's a quoted resource, so you can just use<br>
<br>
start "" "%s"<br>
<br>
a pain, but that's CMD.EXE for you. :)<br>
</blockquote>
<br>
ah, and just for the records, at least<br>
os.popen2,os.popen3 support tuple as argument:<br>
<br>
i,o=os.popen2((cmd,arg1,arg2)) and quotes them<br>
correctly.<br>
<br>
Regards<br>
Tino<br>
<br><br>---------- Forwarded message ----------<br>From: <a href="mailto:afriere@yahoo.co.uk">afriere@yahoo.co.uk</a><br>To: <a href="mailto:python-list@python.org">python-list@python.org</a><br>Date: Wed, 28 Jan 2009 23:15:23 -0800 (PST)<br>
Subject: Re: I'm a python addict !<br>On Jan 27, 4:52 am, Paul McGuire <<a href="mailto:pt...@austin.rr.com">pt...@austin.rr.com</a>> wrote:<br>
[snip]<br>
><br>
> # how you have to do it in C++ and Java<br>
> # light = light.next_state()<br>
><br>
> # using Python<br>
> light.__class__ = light.next_state<br>
<br>
I'm sure you can, but why poke yourself in the eye with a blunt<br>
stick? ;)<br>
<br>
IMO there are two obvious problems with the latter approach. Firstly<br>
the information about the next state is left lying about in some<br>
namespace separate from the object, whereas the object itself ought to<br>
know what it's 'next_state' is (or, more correctly, how to determine<br>
it).<br>
<br>
Secondly you miss the opportunity of sending a signal to the new<br>
state. Consider that in some jurisdictions the amber light shows<br>
before the green as well as before the red (yeah, I know is that an<br>
invitation for drag racing or what!?). If you called next_state as a<br>
verb you could pass the current state as an argument and the amber (or<br>
yellow, if you prefer) light could work which of the two possible next<br>
states to call in turn. The fact that this behaviour is, in this<br>
example, peculiar to the amber light, demonstrates the pertinence of<br>
my first objection above.<br>
<br>
Fortunately the "C++ and Java" approach, (though I would never want to<br>
be seen advocating the C++ or Java approach to anything), is in this<br>
case available in Python as well, at the cheaper price of fewer<br>
characters and arguably greater readibility to boot.<br>
<br>
I know, Iknow ... you wanted to show how that code could be used in a<br>
non "sulphurous" way. Which just goes to show that the devil makes<br>
work for idle hands ... or foils the best laid plans ... or is in the<br>
detail ... or something sulphurous. :)<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: "eGenix Team: M.-A. Lemburg" <<a href="mailto:info@egenix.com">info@egenix.com</a>><br>To: "Python List @ Python.org" <<a href="mailto:python-list@python.org">python-list@python.org</a>><br>
Date: Thu, 29 Jan 2009 09:37:49 +0100<br>Subject: ANN: eGenix mx Base Distribution 3.1.2<br>________________________________________________________________________<br>
<br>
ANNOUNCING<br>
<br>
eGenix.com mx Base Distribution<br>
<br>
Version 3.1.2 for Python 2.3 - 2.6<br>
<br>
Open Source Python extensions providing<br>
important and useful services<br>
for Python programmers.<br>
<br>
This announcement is also available on our web-site for online reading:<br>
<a href="http://www.egenix.com/company/news/eGenix-mx-Base-Distribution-3.1.2-GA.html" target="_blank">http://www.egenix.com/company/news/eGenix-mx-Base-Distribution-3.1.2-GA.html</a><br>
<br>
________________________________________________________________________<br>
<br>
ABOUT<br>
<br>
The eGenix.com mx Base Distribution for Python is a collection of<br>
professional quality software tools which enhance Python's usability<br>
in many important areas such as fast text searching, date/time<br>
processing and high speed data types.<br>
<br>
The tools have a proven record of being portable across many Unix and<br>
Windows platforms. You can write applications which use the tools on<br>
Windows and then run them on Unix platforms without change due to the<br>
consistent platform independent interfaces.<br>
<br>
Contents of the distribution:<br>
<br>
* mxDateTime - Date/Time Library for Python<br>
* mxTextTools - Fast Text Parsing and Processing Tools for Python<br>
* mxProxy - Object Access Control for Python<br>
* mxBeeBase - On-disk B+Tree Based Database Kit for Python<br>
* mxURL - Flexible URL Data-Type for Python<br>
* mxUID - Fast Universal Identifiers for Python<br>
* mxStack - Fast and Memory-Efficient Stack Type for Python<br>
* mxQueue - Fast and Memory-Efficient Queue Type for Python<br>
* mxTools - Fast Everyday Helpers for Python<br>
<br>
All available packages have proven their stability and usefulness in<br>
many mission critical applications and various commercial settings all<br>
around the world.<br>
<br>
For more information, please see the distribution page:<br>
<br>
<a href="http://www.egenix.com/products/python/mxBase/" target="_blank">http://www.egenix.com/products/python/mxBase/</a><br>
<br>
________________________________________________________________________<br>
<br>
NEWS<br>
<br>
The 3.1.2 release of the eGenix mx Base Distribution is the latest<br>
release of our open-source Python extensions.<br>
<br>
We have fixed a number of small platform issues and added support for<br>
the strptime() function to mxDateTime on Windows. We have also enhanced<br>
the portability of our pre-built Mac OS X binaries.<br>
<br>
As always, we are providing pre-built binaries for all supported<br>
platforms, currently: Windows 32-bit, Linux 32-bit, Linux 64-bit,<br>
FreeBSD 32-bit, FreeBSD 64-bit, Mac OS X 32-bit Intel and PPC.<br>
<br>
Whether you are using a pre-built package or the source distribution,<br>
installation is a simple "python setup.py install" command in all<br>
cases. The only difference is that the pre-built packages do not<br>
require a compiler to be installed.<br>
<br>
For a list of changes, please refer to the eGenix mx Base Distribution<br>
change log at<br>
<br>
<a href="http://www.egenix.com/products/python/mxBase/changelog.html" target="_blank">http://www.egenix.com/products/python/mxBase/changelog.html</a><br>
<br>
and the change logs of the various included Python packages.<br>
<br>
________________________________________________________________________<br>
<br>
DOWNLOADS<br>
<br>
The download archives and instructions for installing the packages can<br>
be found on the eGenix mx Base Distribution page:<br>
<br>
<a href="http://www.egenix.com/products/python/mxBase/" target="_blank">http://www.egenix.com/products/python/mxBase/</a><br>
<br>
________________________________________________________________________<br>
<br>
LICENSE<br>
<br>
The eGenix mx Base package is distributed under the eGenix.com Public<br>
License 1.1.0 which is an Open Source license similar to the Python<br>
license. You can use the packages in both commercial and non-commercial<br>
settings without fee or charge.<br>
<br>
The package comes with full source code<br>
<br>
________________________________________________________________________<br>
<br>
SUPPORT<br>
<br>
Commercial support for this product is available from eGenix.com.<br>
Please see<br>
<br>
<a href="http://www.egenix.com/services/support/" target="_blank">http://www.egenix.com/services/support/</a><br>
<br>
for details about our support offerings.<br>
<br>
Enjoy,<br>
--<br>
Marc-Andre Lemburg<br>
eGenix.com<br>
<br>
Professional Python Services directly from the Source (#1, Jan 29 2009)<br>
>>> Python/Zope Consulting and Support ... <a href="http://www.egenix.com/" target="_blank">http://www.egenix.com/</a><br>
>>> mxODBC.Zope.Database.Adapter ... <a href="http://zope.egenix.com/" target="_blank">http://zope.egenix.com/</a><br>
>>> mxODBC, mxDateTime, mxTextTools ... <a href="http://python.egenix.com/" target="_blank">http://python.egenix.com/</a><br>
________________________________________________________________________<br>
<br>
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::<br>
<br>
<br>
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48<br>
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg<br>
Registered at Amtsgericht Duesseldorf: HRB 46611<br>
<a href="http://www.egenix.com/company/contact/" target="_blank">http://www.egenix.com/company/contact/</a><br>
<br>
<br>
<br>
<br>--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br><br>Maneesh KB<br><br>
Comat Technologies<br><br>Bangalore<br><br>Mob: 9740-192309<br><br> <br><br>We work with the underprivileged and in rural India. If you are interested to be a part of it, please mail or call me. I will be happy to share and inform - <a href="http://www.comat.com">http://www.comat.com</a> <br>