Thursday, December 10, 2009

comp.lang.python - 26 new messages in 14 topics - digest

comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en

comp.lang.python@googlegroups.com

Today's topics:

* When will Python 3 be fully deployed - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/d66445beffdaf836?hl=en
* www.withadream.com - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/7a2a0d2b6b7fa685?hl=en
* "file" does not work with the "with" statement! - 8 messages, 4 authors
http://groups.google.com/group/comp.lang.python/t/9c3b8a55de21ec6c?hl=en
* Parsing html with Beautifulsoup - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/19db590cb9a31fb1?hl=en
* "BOLLYWOOD GIRLS" "BOLLYWOOD actress" "BOLLYWOOD wallpapers" "BOLLYWOOD
masala GIRLS" "BOLLYWOOD movies online GIRLS" "BOLLYWOOD GIRLS" ON www.e-
indiangirls.blogspot.com - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/4b4bc6e5a13401ee?hl=en
* Connecting to Python COM server from Excel VBA does not work - 2 messages, 2
authors
http://groups.google.com/group/comp.lang.python/t/d5cd14dad4227e44?hl=en
* DCT transform (API)? (scipy or otherwise) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/d342d7436cfa6bef?hl=en
* Graph library for Python - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/785d100681f7d101?hl=en
* relative imports with the __import__ function - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/05619793a7833bc2?hl=en
* LANJA KODAKA - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/633367fb5a86c715?hl=en
* Generating diagrams from PostgreSQL with Python (Re: postgresql_autodoc in
Python?) - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/8785ad530d13c9d2?hl=en
* switch - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/9af90ddc7652beb0?hl=en
* freeze in python3 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/cda747a5223f861d?hl=en
* plain text parsing to html (newbie problem) - 2 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/a12a1edc1f011ea9?hl=en

==============================================================================
TOPIC: When will Python 3 be fully deployed
http://groups.google.com/group/comp.lang.python/t/d66445beffdaf836?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 10 2009 12:18 am
From: John Nagle


Luis M. González wrote:
> On Dec 6, 3:21 pm, vsoler <vicente.so...@gmail.com> wrote:
>> I recently read that many libraries, including Numpy have not been
>> ported to Python 3.
>>
>> When do you think that Python 3 will be fully deployed?
>>
>> Should I stick, so far, to Python 2.6?
>>
>> Regards
>>
>> Vicente Soler
>
> You'll have some answers here: http://jessenoller.com/2009/12/04/pythons-moratorium-lets-think-about-this/

I'd argue against using Python 2.6 for production work. Either use Python
2.5, which is stable, or 3.x, which is bleeding-edge. 2.6 has some of the
features of Python 3.x, but not all of them, and is neither fish nor fowl
as a result. 2.6 is really more of a sideline that was used for trying
out new features, not something suitable for production.

I think the idea is to run your 2.5 code through '2to3" and see if it
works in 3.x.

Anyway, it will be years, if ever, before Python 3.x gets any real support.
Too many major packages still aren't fully supported on it, and some popular
packages, like SGMLlib and Feedparser, are being dropped.

When a few major Linux distros ship with Python 3.x and enough of the binary
packages to run a web site, take a look at it again.

John Nagle


== 2 of 2 ==
Date: Thurs, Dec 10 2009 12:42 am
From: Ned Deily


In article <4b20ac0a$0$1596$742ec2ed@news.sonic.net>,
John Nagle <nagle@animats.com> wrote:
> I'd argue against using Python 2.6 for production work. Either use
> Python
> 2.5, which is stable, or 3.x, which is bleeding-edge. 2.6 has some of the
> features of Python 3.x, but not all of them, and is neither fish nor fowl
> as a result. 2.6 is really more of a sideline that was used for trying
> out new features, not something suitable for production.

I disagree with that advice, strongly. 2.6 not only has new features
but it has many bug fixes that have not and will not be applied to 2.5.
It is hardly a sideline.

See http://www.python.org/download/releases/2.5.4/ for the official
policy on 2.5, in particular:

"Future releases of Python 2.5 [ -- that is, should the need arise -- ]
will only contain security patches; no new features are being added, and
no 'regular' bugs will be fixed anymore."

"If you want the latest production version of Python, use Python 2.6.1
or later." [2.6.4 is the latest version].

Then see http://www.python.org/download/releases/2.6.4/

Note that Python 2.6 is considered the stable version and is "now in
bugfix-only mode; no new features are being added". Per normal python
development policy, new features are added to the next major release
cycles, now under development: Python 2.7 and Python 3.2.

--
Ned Deily,
nad@acm.org


==============================================================================
TOPIC: www.withadream.com
http://groups.google.com/group/comp.lang.python/t/7a2a0d2b6b7fa685?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 12:43 am
From: "outsiemsn320@msn.com"


Get Nike Shoes at Super Cheap Prices
Discount Ed hardy tshirt (www.withadream.com)
Discount Ed hardy jean (www.withadream.com)
Discount Ed hardy shoes (www.withadream.com)
Discount Ed hardy handbag (www.withadream.com)
Discount Ed hardy other porduct (www.withadream.com)
Discount Nike air jordans (www.withadream.com)
Discount Nike Air Max 90 Sneakers (www.withadream.com)
Discount Nike Air Max 91 Supplier (www.withadream.com)
Discount Nike Air Max 95 Shoes Supplier (www.withadream.com)
Discount Nike Air Max 97 Trainers (www.withadream.com)
Discount Nike Air Max 2003 Wholesale (www.withadream.com)
Discount Nike Air Max 2004 Shoes Wholesale
(www.withadream.com)
Discount Nike Air Max 2005 Shop (www.withadream.com)
Discount Nike Air Max 2006 Shoes Shop (www.withadream.com)
Discount Nike Air Max 360 Catalogs (www.withadream.com)
Discount Nike Air Max Ltd Shoes Catalogs (www.withadream.com)
Discount Nike Air Max Tn Men's Shoes (www.withadream.com)
Discount Nike Air Max Tn 2 Women's Shoes (www.withadream.com)
Discount Nike Air Max Tn 3 Customize (www.withadream.com)
Discount Nike Air Max Tn 4 Shoes Customize
( www.withadream.com)
Discount Nike Air Max Tn 6 Supply (www.withadream.com)
Discount Nike Shox NZ Shoes Supply (www.withadream.com)
Discount Nike Shox OZ Sale (www.withadream.com)
Discount Nike Shox TL Store (www.withadream.com)
Discount Nike Shox TL 2 Shoes Store (www.withadream.com)
Discount Nike Shox TL 3 Distributor (www.withadream.com)
Discount Nike Shox Bmw Shoes Distributor (www.withadream.com)
Discount Nike Shox Elite Shoes Manufacturer
(www.withadream.com)
Discount Nike Shox Monster Manufacturer (www.withadream.com)
Discount Nike Shox R4 Running Shoes (www.withadream.com)
Discount Nike Shox R5 Mens Shoes (www.withadream.com)
Discount Nike Shox Ride Womens Shoes (www.withadream.com)
Discount Nike Shox Rival Shoes Wholesaler (www.withadream.com)
Discount Nike Shox Energia Wholesaler (www.withadream.com)
Discount Nike Shox LV Sneaker (www.withadream.com)
Discount Nike Shox Turbo Suppliers (www.withadream.com)
Discount Nike Shox Classic Shoes Suppliers
(www.withadream.com)
Discount Nike Shox Dendara Trainer (www.withadream.com)
Discount Nike Air Jordan 1 Seller (www.withadream.com)
Discount Nike Air Jordan 2 Shoes Seller (www.withadream.com)
Discount Nike Air Jordan 3 Collection (www.withadream.com)
Discount Nike Air Jordan 4 Shoes Collection
(www.withadream.com)
Discount Nike Air Jordan 5 Chaussure Shoes
(www.withadream.com)
Discount Nike Air Jordan 6 Catalog (www.withadream.com)
Discount Nike Air Jordan 7 Shoes Catalog (www.withadream.com)
Discount Nike Air Jordan 8 Customized (www.withadream.com)
Discount Nike Air Jordan 9 Shoes Customized
(www.withadream.com)
Discount Nike Air Jordan 10 Wholesalers (www.withadream.com)
Discount Nike Jordan 11 Shoes Wholesalers (www.withadream.com)
Discount Nike Air Jordan 12 Factory (www.withadream.com)
Discount Nike Air Jordan 13 Shoes Factory (www.withadream.com)
Discount Nike Air Jordan 14 Shoes Sell (www.withadream.com)
Discount Nike Air Jordan 16 Exporter (www.withadream.com)
Discount Nike Air Jordan 17 Shoes Exporter
(www.withadream.com)
Discount Nike Air Jordan 18 Offer (www.withadream.com)
Discount Nike Air Jordan 19 Shoes Offer (www.withadream.com)
Discount Nike Air Jordan 20 Manufacture (www.withadream.com)
Discount Nike Jordan 21 Shoes Manufacture (www.withadream.com)
GMAIL:ALLTHEDREAM@MSN.COM
MSN :ALLTHEDREAM@MSN.COM

http://www.withadream.com

we are specialized in all kinds of brand name sport shoes AAA grade,
like NIKE SHOES, ADIDAS SHOES, JORDAN AIR MAX, SHOX, PUMA, DUNK, BAPE,
TIMBERLAND, AF1, GUCCI,LV,PRADA,LEISURE SHOES ,BBC nike suppliers in
china, nike, nike dunk, dunk, nike af1, af1, nike rift, rift, nike max
95, max95, nike max 90, max 90, nike max 91, max 91, nike max 95, max
95, nike max 97, max97, nike max180, nike max360, max 360, max 180,
nike max ltd, nike max tn, nike max 2003, max 2003, nike max 2006, max
2006, nike max 2004, max 2004, air force 1, air force one, nike af1,
af1, nike air force 1, nike shox, nike max, nike shox nz, shox nz, nz,
nike shox oz, shox oz, oz, nike shox r3, shox r3, r3, nike shox r4,
shox r4, r4, nike shox r5, shox r5, r5, nike shox tl1, shox tl1, tl1,
nike shox tl2, tl2, nike shox tl3, LRG, GGG, RMC, ArtfulDodger, D&G,
Rockjeans, A&F, EVS, seven, t-shirts, LV, AF1, max, shox, converse,
timberland boots, NBAstars, james, kobe, garnett, carter, macgrady,
pippen, sandals, hogan, adidas, nikeshoes, dunk, puma, prada, bape,
gucci, jordan, BBC, jacket, DS, hoody, ED hardy, CLH, kidrobot,
sweater, kidclothes, jersey, swimmingwear, ranbansunglass, coach,
chanel, armani, burberry, watch, fendi handbags, belts, wallet,
jewellery, umbrella, hats, mobile phone..., bape, bbc, evisu, lrg, ed-
hardy, lacoste hoody, polo, red monkey, NFL abercrombie, Clothing,
hoody, jacket, coat, jeans, suit, t-shirt, sweater, jerseys BAPE,
BBC,EVISU HOODIES POLO LACOSATE t-shirt, jeans like ED EVISU BBC RMC;
LV, CHANEL GUCCI PRADA HANDBAGS, IPOD MP3,,MP4 PS3 PSP; HATS;
SUNGLASSES; BELTS; and so on, our products have been exported to South
America, north merica,Australia, Europe, Italy,France,Spain,Greece;
and getting warmly welcome from these customers by its stable quality,
competitive prices and safe delivery. We are insisting on our company
principle Best Service and Highest Quality, and willing to build
mutual benefits and long term business relationships with all
customers. SAVE HUNDREDS OF DOLLARS ON DESIGNER SHOES!!!

http://www.withadream.com

==============================================================================
TOPIC: "file" does not work with the "with" statement!
http://groups.google.com/group/comp.lang.python/t/9c3b8a55de21ec6c?hl=en
==============================================================================

== 1 of 8 ==
Date: Thurs, Dec 10 2009 1:13 am
From: Michele Simionato


I have just discovered that the syntax

with file(name, 'w') as f:
do_something(f)

does not close the file at the end of the with statement! On the
contrary

with open(name, 'w') as f:
do_something(f)

works fine. The docs say "When opening a file, it's preferable to use
open() instead of invoking this constructor directly." but perhaps
they should mention why :(

== 2 of 8 ==
Date: Thurs, Dec 10 2009 1:59 am
From: Peter Otten <__peter__@web.de>


Michele Simionato wrote:

> I have just discovered that the syntax
>
> with file(name, 'w') as f:
> do_something(f)
>
> does not close the file at the end of the with statement! On the
> contrary
>
> with open(name, 'w') as f:
> do_something(f)
>
> works fine. The docs say "When opening a file, it's preferable to use
> open() instead of invoking this constructor directly." but perhaps
> they should mention why :(

Are you sure?

Python 2.6.4 (r264:75706, Nov 2 2009, 14:44:17)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> with file("tmp.txt", "w") as f:
... print >> f, "whatever"
...
>>> f.write("something")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: I/O operation on closed file

Peter


== 3 of 8 ==
Date: Thurs, Dec 10 2009 2:04 am
From: "Diez B. Roggisch"


Michele Simionato wrote:

> I have just discovered that the syntax
>
> with file(name, 'w') as f:
> do_something(f)
>
> does not close the file at the end of the with statement! On the
> contrary
>
> with open(name, 'w') as f:
> do_something(f)
>
> works fine. The docs say "When opening a file, it's preferable to use
> open() instead of invoking this constructor directly." but perhaps
> they should mention why :(

Are you sure? For me on python2.5, it works as advertised:

from __future__ import with_statement

def test(outf):
with outf:
outf.write("test\n")
try:
outf.write("test\n")
assert False, "Not closed"
except ValueError:
pass

outf = open("/tmp/foo", "w")
test(outf)
outf = file("/tmp/bar", "w")
test(outf)

Which Python do you use?

Diez


== 4 of 8 ==
Date: Thurs, Dec 10 2009 2:29 am
From: Michele Simionato


On Dec 10, 11:04 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
> Are you sure? For me on python2.5, it works as advertised:
>
> from __future__ import with_statement
>
> def test(outf):
>     with outf:
>         outf.write("test\n")
>     try:
>         outf.write("test\n")
>         assert False, "Not closed"
>     except ValueError:
>         pass
>
> outf = open("/tmp/foo", "w")
> test(outf)
> outf = file("/tmp/bar", "w")
> test(outf)
>
> Which Python do you use?
>
> Diez

Python 2.5, but it could be an artifact of the way I am looking if a
file is closed.
I have subclassed the file builtin, added a .close method and it was
not called by the
"with" statement. This during debugging, but now I have found another
reason to explain why I was
running out of file descriptors, (I was opening too many connections
to the db).
It is entirely possible that the problem was not with the "with"
statement.


== 5 of 8 ==
Date: Thurs, Dec 10 2009 2:35 am
From: "Diez B. Roggisch"


Michele Simionato wrote:

> On Dec 10, 11:04 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>> Are you sure? For me on python2.5, it works as advertised:
>>
>> from __future__ import with_statement
>>
>> def test(outf):
>> with outf:
>> outf.write("test\n")
>> try:
>> outf.write("test\n")
>> assert False, "Not closed"
>> except ValueError:
>> pass
>>
>> outf = open("/tmp/foo", "w")
>> test(outf)
>> outf = file("/tmp/bar", "w")
>> test(outf)
>>
>> Which Python do you use?
>>
>> Diez
>
> Python 2.5, but it could be an artifact of the way I am looking if a
> file is closed.

The above ran on python2.5 for me, no hitch.

> I have subclassed the file builtin, added a .close method and it was
> not called by the
> "with" statement. This during debugging, but now I have found another
> reason to explain why I was
> running out of file descriptors, (I was opening too many connections
> to the db).
> It is entirely possible that the problem was not with the "with"
> statement.

Probably. Closing a file through with might not involve calling close() - it
might be implemented differently in __exit__.

So overload *that*, too.

Diez


== 6 of 8 ==
Date: Thurs, Dec 10 2009 2:55 am
From: Peter Otten <__peter__@web.de>


Michele Simionato wrote:

> On Dec 10, 11:04 am, "Diez B. Roggisch" <de...@nospam.web.de> wrote:
>> Are you sure? For me on python2.5, it works as advertised:
>>
>> from __future__ import with_statement
>>
>> def test(outf):
>> with outf:
>> outf.write("test\n")
>> try:
>> outf.write("test\n")
>> assert False, "Not closed"
>> except ValueError:
>> pass
>>
>> outf = open("/tmp/foo", "w")
>> test(outf)
>> outf = file("/tmp/bar", "w")
>> test(outf)
>>
>> Which Python do you use?
>>
>> Diez
>
> Python 2.5, but it could be an artifact of the way I am looking if a
> file is closed.
> I have subclassed the file builtin, added a .close method and it was
> not called by the
> "with" statement. This during debugging, but now I have found another
> reason to explain why I was
> running out of file descriptors, (I was opening too many connections
> to the db).
> It is entirely possible that the problem was not with the "with"
> statement.

Subclassing file doesn't work properly:

http://mail.python.org/pipermail/python-list/2005-April/920562.html

Peter


== 7 of 8 ==
Date: Thurs, Dec 10 2009 2:59 am
From: Christian Heimes


Michele Simionato wrote:
> Python 2.5, but it could be an artifact of the way I am looking if a
> file is closed.
> I have subclassed the file builtin, added a .close method and it was
> not called by the
> "with" statement. This during debugging, but now I have found another
> reason to explain why I was
> running out of file descriptors, (I was opening too many connections
> to the db).
> It is entirely possible that the problem was not with the "with"
> statement.

In Python 2.5 you have to implement your own __enter__ and __exit__
methods if you subclass from file. The file.__exit__ function doesn't
call f.close(). The minor inconsistency has been fixed in Python 2.6.


Python 2.5:

static PyObject *
file_exit(PyFileObject *f, PyObject *args)
{
PyObject *ret = file_close(f);
if (!ret)
/* If error occurred, pass through */
return NULL;
Py_DECREF(ret);
/* We cannot return the result of close since a true
* value will be interpreted as "yes, swallow the
* exception if one was raised inside the with block". */
Py_RETURN_NONE;
}

Python 2.6:

static PyObject *
file_exit(PyObject *f, PyObject *args)
{
PyObject *ret = PyObject_CallMethod(f, "close", NULL);
if (!ret)
/* If error occurred, pass through */
return NULL;
Py_DECREF(ret);
/* We cannot return the result of close since a true
* value will be interpreted as "yes, swallow the
* exception if one was raised inside the with block". */
Py_RETURN_NONE;
}


== 8 of 8 ==
Date: Thurs, Dec 10 2009 3:59 am
From: Michele Simionato


On Dec 10, 11:59 am, Christian Heimes <li...@cheimes.de> wrote:
> In Python 2.5 you have to implement your own __enter__ and __exit__
> methods if you subclass from file. The file.__exit__ function doesn't
> call f.close().

Yes, that was my problem.

==============================================================================
TOPIC: Parsing html with Beautifulsoup
http://groups.google.com/group/comp.lang.python/t/19db590cb9a31fb1?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 1:15 am
From: Johann Spies


I am trying to get csv-output from a html-file.

With this code I had a little success:
=========================
from BeautifulSoup import BeautifulSoup
from string import replace, join
import re

f = open("configuration.html","r")
g = open("configuration.csv",'w')
soup = BeautifulSoup(f)
t = soup.findAll('table')
for table in t:
rows = table.findAll('tr')
for th in rows[0]:
t = th.find(text=True)
g.write(t)
g.write(',')
# print(','.join(t))

for tr in rows:
cols = tr.findAll('td')
for td in cols:
try:
t = td.find(text=True).replace('&nbsp;','')
g.write(t)
except:
g.write ('')
g.write(",")
g.write("\n")
===============================

producing output like this:

RULE,SOURCE,DESTINATION,SERVICES,ACTION,TRACK,TIME,INSTALL ON,COMMENTS,
1,,,,drop,Log,Any,,,
2,All Users@Any,,Any,clientencrypt,Log,Any,,,
3,Any,Any,,drop,None,Any,,,
4,,,,drop,None,Any,,,
...

It left out all the non-plaintext parts of <td></td>

I then tried using

t.renderContents and then got something like this (one line broken into
many for the sake of this email):

1,<img src=icons/group.png>&nbsp;<a href=#OBJ_sunetint>
sunetint</A><BR>,
<img src=icons/gateway_cluster.png>&nbsp;<a>href=#OBJ_Rainwall_Cluster
>Rainwall_Cluster</A> <BR>,
<img>src=icons/udp.png>&nbsp;<a href=#SVC_IKE >IKE</a><br>,
<img src=icons/drop.png>&nbsp;drop,
<img src=icons/log.png>&nbsp;Log&nbsp;,
<img src=icons/any.png>&nbsp;Any<br>&nbsp;,
<img src=icons/gateway_cluster.png>&nbsp;<a href=#OBJ_Rainwall_Cluster
>Rainwall_Cluster</A> <BR>&nbsp;,&nbsp;

How do I get Beautifulsoup to render (taking the above line as
example)

sunentint for <img src=icons/group.png>&nbsp;<a
href=#OBJ_sunetint>sunetint</A><BR>

and still provide the text-parts in the <td>'s with plain text?

I have experimented a little bit with regular expressions, but could
so far not find a solution.

Regards
Johann
--
Johann Spies Telefoon: 021-808 4599
Informasietegnologie, Universiteit van Stellenbosch

"Lo, children are an heritage of the LORD: and the
fruit of the womb is his reward." Psalms 127:3

==============================================================================
TOPIC: "BOLLYWOOD GIRLS" "BOLLYWOOD actress" "BOLLYWOOD wallpapers" "BOLLYWOOD
masala GIRLS" "BOLLYWOOD movies online GIRLS" "BOLLYWOOD GIRLS" ON www.e-
indiangirls.blogspot.com
http://groups.google.com/group/comp.lang.python/t/4b4bc6e5a13401ee?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 1:49 am
From: Naeem


"BOLLYWOOD GIRLS" "BOLLYWOOD actress" "BOLLYWOOD wallpapers"
"BOLLYWOOD masala GIRLS" "BOLLYWOOD movies online GIRLS"
"BOLLYWOOD GIRLS" ON www.e-indiangirls.blogspot.com"BOLLYWOOD
GIRLS" "BOLLYWOOD actress" "BOLLYWOOD wallpapers" "BOLLYWOOD
masala GIRLS" "BOLLYWOOD movies online GIRLS" "BOLLYWOOD
GIRLS" ON www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS"
"BOLLYWOOD actress" "BOLLYWOOD wallpapers" "BOLLYWOOD masala
GIRLS" "BOLLYWOOD movies online GIRLS" "BOLLYWOOD GIRLS"
ON www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD
actress" "BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS"
"BOLLYWOOD movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON
www.e-indiangirls.blogspot.com"BOLLYWOOD GIRLS" "BOLLYWOOD actress"
"BOLLYWOOD wallpapers" "BOLLYWOOD masala GIRLS" "BOLLYWOOD
movies online GIRLS" "BOLLYWOOD GIRLS" ON www.e-indiangirls.blogspot.com

==============================================================================
TOPIC: Connecting to Python COM server from Excel VBA does not work
http://groups.google.com/group/comp.lang.python/t/d5cd14dad4227e44?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 10 2009 1:50 am
From: diego


I ran this script:
---------------------------
class Example(object):
_public_methods_ = ['Add','Mul']
_reg_progid_ = 'MyPython.Example'
_reg_clsid_ = '{E39ECD8C-7FAF-48B0-B914-1202319499D4}'

def Add(self,a,b): return a+b

def Mul(self,a,b): return a*b

if __name__ == '__main__':
import win32com.server.register
win32com.server.register.UseCommandLine(Example)
---------------------------------
connecting to this COM server works with following VBS-script:
---------------------------------
Set ex = CreateObject("MyPython.Example")
msgbox ex.Add(1, 2)
---------------------------------

when i run following VBA script in excel
---------------------------------
Sub Testit()
Set ex = CreateObject("MyPython.Example")
MsgBox ex.Add(1, 2)
End Sub
---------------------------------

i get the error:
Run-time error '-2137024770 (8007007e)':
Automation error
The specified module could not be found

Any ideas what the problem could be?
Already searched a long time for solutions but did not find any....

thanks,
diego


== 2 of 2 ==
Date: Thurs, Dec 10 2009 2:52 am
From: "Michel Claveau - MVP"


Hi !

Warning with lower/uppercases!
Try to make two versions of your methods (ex.: "add" & "ADD"), for study.

@+
--
MCI


==============================================================================
TOPIC: DCT transform (API)? (scipy or otherwise)
http://groups.google.com/group/comp.lang.python/t/d342d7436cfa6bef?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 2:02 am
From: Hans Georg Schaathun


I am looking for a 2-D DCT transform function for use in python.
Does anyone have any good pointers?

I see that one is promised in scipy 0.8.0, but I cannot find any
details on how close that is to being released. I am not sure if
running bleeding-edge scipy would solve my problem; I should have
liked more experience with numerical programming before I tried
that, especially since I do not otherwise use the C and fortran
libraries it is based on. Are there alternatives to scipy for this
particular feature?

TIA for any pointers
:-- George

==============================================================================
TOPIC: Graph library for Python
http://groups.google.com/group/comp.lang.python/t/785d100681f7d101?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 2:18 am
From: Bearophile


geremy condra:

> Since that's released under the python license, I'm going to
> go ahead and commit the version that includes the topo
> traversal, but if you have any objections you only need to
> say the word and I'll take it down.

No objections :-)

Bye,
bearophile

==============================================================================
TOPIC: relative imports with the __import__ function
http://groups.google.com/group/comp.lang.python/t/05619793a7833bc2?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 2:24 am
From: Peter Otten <__peter__@web.de>


Chris Colbert wrote:

> It seems the relative import level is dependent on the location of the
> main entry module. I thought the whole idea of relative imports was to
> make the import independent of the entry point?

You don't have to specify it explicitly, so you can move a module containing

from .foo import bar

into another package without changing its source code (provided there is a
foo submodule with a bar attribute). This includes the trivial case of
renaming the parent package.

Of course Python has to know the importing module's location, just like you
cannot meet me one block north and three blocks west unless you know where I
currently am.

See also

http://www.python.org/dev/peps/pep-0328/#rationale-for-relative-imports

Peter

==============================================================================
TOPIC: LANJA KODAKA
http://groups.google.com/group/comp.lang.python/t/633367fb5a86c715?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 2:34 am
From: Connecting World


LANJA KODAKA
GUDHA MOOSUKONI KINDA WEBSITE CHOOSI NAARCHUKO .

http://knowledgeatheaven.blogspot.com/2009/09/welcome-to-home-page.html

==============================================================================
TOPIC: Generating diagrams from PostgreSQL with Python (Re: postgresql_autodoc
in Python?)
http://groups.google.com/group/comp.lang.python/t/8785ad530d13c9d2?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, Dec 10 2009 3:32 am
From: Wolfgang Keller


Hello,

I will re-precise my question:

Has anyone ever implemented a script in Python that generates documentation (especially diagrams, in a format such as e.g. Dia, Inkscape SVG or Tikz) for a PostgreSQL database either from an SQL script or by connecting to the database?

Postgresql_autodoc is unfortunately written in Perl. >;->

TIA,

And, btw., please respect my .sig,

Sincerely,

Wolfgang Keller

--
NO "Courtesy Copies" PLEASE!


== 2 of 3 ==
Date: Thurs, Dec 10 2009 3:48 am
From: "Diez B. Roggisch"


Wolfgang Keller wrote:

> Hello,
>
> I will re-precise my question:
>
> Has anyone ever implemented a script in Python that generates
> documentation (especially diagrams, in a format such as e.g. Dia, Inkscape
> SVG or Tikz) for a PostgreSQL database either from an SQL script or by
> connecting to the database?

I've written a schemadiff-tool for postgres based on SQLAlchemy reflection,
which is a branch of SQLAlchemy and which should become part of the
upcoming SA 0.6.

http://svn.sqlalchemy.org/sqlalchemy/branches/reflection

It allows you to extract information about the schema of the DB. This could
be the foundation of your tool.

>
> Postgresql_autodoc is unfortunately written in Perl. >;->
>
> TIA,
>
> And, btw., please respect my .sig,

Which is supposed to mean what? Never heard the term courtesy copy.

Diez


== 3 of 3 ==
Date: Thurs, Dec 10 2009 4:18 am
From: Chris Rebert


On Thu, Dec 10, 2009 at 3:48 AM, Diez B. Roggisch <deets@nospam.web.de> wrote:
> Wolfgang Keller wrote:
>
>> Hello,
>>
>> I will re-precise my question:
>>
>> Has anyone ever implemented a script in Python that generates
>> documentation (especially diagrams, in a format such as e.g. Dia, Inkscape
>> SVG or Tikz) for a PostgreSQL database either from an SQL script or by
>> connecting to the database?
>
> I've written a schemadiff-tool for postgres based on SQLAlchemy reflection,
> which is a branch of SQLAlchemy and which should become part of the
> upcoming SA 0.6.
>
> http://svn.sqlalchemy.org/sqlalchemy/branches/reflection
>
> It allows you to extract information about the schema of the DB. This could
> be the foundation of your tool.
>
>>
>> Postgresql_autodoc is unfortunately written in Perl. >;->
>>
>> TIA,
>>
>> And, btw., please respect my .sig,
>
> Which is supposed to mean what? Never heard the term courtesy copy.

It appears to be an incorrect expansion of "Cc", which is actually
Carbon copy. Apparently he means all replies should be directly to the
list and not Cc his individual email address.
Which seems strange, because usually mailinglists are smart enough not
to send the author duplicate copies if they're named in the To or Cc
fields.

Cheers,
Chris
--
http://blog.rebertia.com

==============================================================================
TOPIC: switch
http://groups.google.com/group/comp.lang.python/t/9af90ddc7652beb0?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 3:34 am
From: Asun Friere


On Dec 10, 2:00 pm, Carl Banks <pavlovevide...@gmail.com> wrote:
> On Dec 9, 5:02 pm, Asun Friere <afri...@yahoo.co.uk> wrote:
>
> > On Dec 9, 7:08 pm, Carl Banks <pavlovevide...@gmail.com> wrote:
>
> > > What if the object is a string you just read from a file?
>
> > > How do you dispatch using polymorphism in that case?
>
> > This would be a pertinent question, were I advocating that _all_
> > switch statements should, or even can, be replaced with "dispatch
> > using polymorphism."
>
> Then why did you claim that a decent OO should never have a switch
> statement then?

The mere fact that it is possible to demonstrate a use of the 'goto'
statement, which does not offend against a program's structural
integrity, does not mean it's necessarily a good idea to have it lying
about given that in the large majority of cases it leads to
(encourages?) bad code. Python sagely declined to implement 'goto'.

I feel the same considerations apply in regard to the switch/case
statement in the context of a true* OO (ie python but not java ;>).
Imo the decision not to implement a switch statement was wise. This
is not to deny that a traditional switch is not in often a sane
solution. I just think that if your elifs are getting unwieldy enough
to require the application of the proverbial layer of abstraction,
then a switch statement fails to deliver sufficient abstraction.

> You argued that a decent language OO should never
> have a switch statement because polymorphic dispatch is the right way
> to handle it in OO languages, which implies that polymorphism can and
> should take the place of any switch statement.

That is a misreading. I wrote, that the case logic is "probably"
symptomatic of poor design. I advocated "considering" whether an OO
solution might be more appropriate. You misunderstand my intent. I'm
not here to postulate some ultimate OO truths, but to provide
practical advice (aimed here mainly at Hong and Kee). In regard elif
chains, this is my advice.

If you see too many elifs in your code (or if you find yourself
wishing for a switch statement) alarm bells should start to go off.
STOP, give serious consideration as to whether applying some patterns
or similar will improve the design, and HINT: first consider whether
that pattern might be something resembling a dispatch mechanism, it's
just downright spooky how in real-life programming situations this
turns out to be the answer. Obviously the answers to these questions
are not invariably 'yes.' Often enough they are.

>
> > What if, instead of reading strings from a file,
>
> Why don't you answer my question first,

Because, as I have already explained, I object to the question. It
presupposes my holding a position I don't.

But look perhaps I'm being unfair to you Carl. I presumed your
question was rhetorical, or at least you supposed it disproved
whatever it is you were attacking. If instead you were asking for
clarification, the short answer is "wrap as you read." A longer
answer is in the response to Tim, I'll send in a while.

cheers

==============================================================================
TOPIC: freeze in python3
http://groups.google.com/group/comp.lang.python/t/cda747a5223f861d?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 10 2009 3:50 am
From: Almar Klein


Hi Patrick,

It's not exactly what you asked, but I've been able to freeze a Python
3 project using cx_Freeze.

Almar


2009/12/10 Patrick Stinson <patrickstinson.lists@gmail.com>:
> NOTE: This is related but is not a duplicate of my post from yesterday.
>
> Has anyone used Tools/freeze/freeze.py in python3? I tried it with a
> clean source distribution and for some reason freeze.py is generating
> code that uses the old naming convention for module init functions. I
> get the following unresolved symbols for the default hello.py:
>
> Undefined symbols for architecture i386:
>  "_init_codecs", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_functools", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_thread", referenced from:
>      __PyImport_Inittab in config.o
>  "_initerrno", referenced from:
>      __PyImport_Inittab in config.o
>  "_initposix", referenced from:
>      __PyImport_Inittab in config.o
>  "_initgc", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_locale", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_io", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_sre", referenced from:
>      __PyImport_Inittab in config.o
>  "_initimp", referenced from:
>      __PyImport_Inittab in config.o
>  "_initpwd", referenced from:
>      __PyImport_Inittab in config.o
>  "_init_weakref", referenced from:
>      __PyImport_Inittab in config.o
>  "_initsignal", referenced from:
>      __PyImport_Inittab in config.o
>  "_initzipimport", referenced from:
>      __PyImport_Inittab in config.o
>
> For example, initerrno should now be PyInit_errno. Am I missing something?
> --
> http://mail.python.org/mailman/listinfo/python-list
>

==============================================================================
TOPIC: plain text parsing to html (newbie problem)
http://groups.google.com/group/comp.lang.python/t/a12a1edc1f011ea9?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 10 2009 4:16 am
From: João


Thanks for the output.
akean, I've installed ipython and I'm exploring it. Thanks.

Terry,
from what I've read stringIO allows us to store strings in a 'virtual'
file.
Can you please write just 2 lines exemplifying a write to and a read
from an OS level file?

MRAB, that 'mail' object should've been the os level 'mail' file. But
as I'm a beginner I was using it wrong..

Thanks

== 2 of 2 ==
Date: Thurs, Dec 10 2009 4:17 am
From: João


Thanks for the output.
akean, I've installed ipython and I'm exploring it. Thanks.

Terry,
from what I've read stringIO allows us to store strings in a 'virtual'
file.
Can you please write just 2 lines exemplifying a write to and a read
from an OS level file?

MRAB, that 'mail' object should've been the os level 'mail' file. But
as I'm a beginner I was using it wrong..

Thanks

==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en

To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate