Sunday, March 21, 2010

comp.lang.python - 25 new messages in 16 topics - digest

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

comp.lang.python@googlegroups.com

Today's topics:

* How to automate accessor definition? - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/1a17f02d834be169?hl=en
* device identification - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/22bc2b1c9d46f1c7?hl=en
* Method / Functions - What are the differences? - 4 messages, 4 authors
http://groups.google.com/group/comp.lang.python/t/72ab93ba395822ed?hl=en
* How to keep effects of image filters going for some seconds? - 1 messages, 1
author
http://groups.google.com/group/comp.lang.python/t/166445798c17868a?hl=en
* "EURO GIRLS" "MISS EUROPE" "MISS FRENCH" "FRENCH" "PRETTY GIRLS" "SEXY
FRENCH GIRLS" on www.sexyandpretty-girls.blogspot.com "SEXY RUSSIAN GIRLS" "
SEXY GREEK GIRLS" "SEXY DUTCH GIRLS" "SEXY UK GIRLS" "SEXY HOLLYWOOD GIRLS" "
SEXY BOLLYWOOD" - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/597c607de14e7d30?hl=en
* Python 3.1.2 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/9da9e392a2d04ed8?hl=en
* using Python distutils bdist_msi to create installer for large complicated
package - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/fed8e3ca9e67422f?hl=en
* should writing Unicode files be so slow - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/f76baa1b73e8d17e?hl=en
* sell:nike shoes$32,ed hardy(items),jean$30,handbag$35 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/542e969e6dfdbd0d?hl=en
* GC is very expensive: am I doing something wrong? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/de9f2b88dd1b469d?hl=en
* add an entry to twentyquestions.org (please) - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/9de999247c77a883?hl=en
* PyInstaller 1.4 - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/88562936a65a0e97?hl=en
* Best practise for dual stack programming in python - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/34ecf83fa2278654?hl=en
* DreamPie - The Python shell you've always dreamed about! - 1 messages, 1
author
http://groups.google.com/group/comp.lang.python/t/7e77cd5af5c1d57f?hl=en
* StringChain -- a data structure for managing large sequences of chunks of
bytes - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/0289b7f3bff4d999?hl=en
* ------->>>FREE MAC<<<------- - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/21c945586fba170d?hl=en

==============================================================================
TOPIC: How to automate accessor definition?
http://groups.google.com/group/comp.lang.python/t/1a17f02d834be169?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Mar 21 2010 11:40 am
From: Patrick Maupin


On Mar 21, 11:57 am, kj <no.em...@please.post> wrote:
>
> Just accessing attributes looks a bit dangerous to me, due to bugs
> like typing
>
>   i.typo = 'foo'
>
> when what you meant is
>
>   i.type = 'foo'
>
> I tried fixing this by mucking with __setattr__, but I didn't hit
> on a satisfactory solution (basically, I couldn't find a good,
> self-maintaining, way to specify the attributes that were OK to
> set from those that weren't).  Is there anything built-in?
>

If you *really* want static typing and validation for attributes in
Python, you might check out enthought traits: http://code.enthought.com/projects/traits/

Regards,
Pat


== 2 of 3 ==
Date: Sun, Mar 21 2010 11:47 am
From: Steve Holden


Christian Heimes wrote:
> Steve Holden wrote:
>> You may well find that namedtuple is faster than what you put together
>> yourself, as the collections module is implemented in C.
>
> But namedtuple isn't, Steve. Namedtuple is a class generator that
> creates fast and efficient classes.
>
Ah, right, thanks.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

== 3 of 3 ==
Date: Sun, Mar 21 2010 6:36 pm
From: kj


In <4ba66311$0$27838$c3e8da3@news.astraweb.com> Steven D'Aprano <steve@REMOVE-THIS-cybersource.com.au> writes:

>Then, in your __init__ method, to initialise an attribute use:

> self.__dict__['attr'] = value

>to bypass the setattr.

Ah, that's the trick! Thanks!

~K

==============================================================================
TOPIC: device identification
http://groups.google.com/group/comp.lang.python/t/22bc2b1c9d46f1c7?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 1:44 pm
From: Omer Ihsan


i have installed pyusb now and run the sample usbenum.py....i have 3
usb ports on my PC but the results show 6 outputs to
dev.filename..they are numbers like 001 or 005 etc.... and they
changed when i plugged in devices...(i am no good with the usb
standards)....i just want to identify each device/port... what
parameter in the example would help me....


==============================================================================
TOPIC: Method / Functions - What are the differences?
http://groups.google.com/group/comp.lang.python/t/72ab93ba395822ed?hl=en
==============================================================================

== 1 of 4 ==
Date: Sun, Mar 21 2010 2:34 pm
From: aahz@pythoncraft.com (Aahz)


In article <mailman.555.1268232321.23598.python-list@python.org>,
John Posner <jjposner@optimum.net> wrote:
>
>Bruno (and anyone else interested) --
>
>As I promised/threatened, here's the *start* of a write-up on
>properties, aimed at non-advanced Python programmers:
>
> http://www.jjposner.net/media/python-properties-0310.pdf

I'm interested, but not interested enough to download a PDF and fire up
a PDF reader. Are you really using features that require PDF instead of
just writing a web page?
--
Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer


== 2 of 4 ==
Date: Sun, Mar 21 2010 3:44 pm
From: Steve Holden


Aahz wrote:
> In article <mailman.555.1268232321.23598.python-list@python.org>,
> John Posner <jjposner@optimum.net> wrote:
>> Bruno (and anyone else interested) --
>>
>> As I promised/threatened, here's the *start* of a write-up on
>> properties, aimed at non-advanced Python programmers:
>>
>> http://www.jjposner.net/media/python-properties-0310.pdf
>
> I'm interested, but not interested enough to download a PDF and fire up
> a PDF reader. Are you really using features that require PDF instead of
> just writing a web page?

For us standard browser users it's a single click, of course.

Are you really forced to use an environment that can't start a PDF
reader by clicking on a link?

I appreciate that some people are disabled in ways that rule out reading
a PDF, but since John has gone to some personal trouble to write this
document he's surely entitled to choose his medium ...

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

== 3 of 4 ==
Date: Sun, Mar 21 2010 4:10 pm
From: John Bokma


aahz@pythoncraft.com (Aahz) writes:

> In article <mailman.555.1268232321.23598.python-list@python.org>,
> John Posner <jjposner@optimum.net> wrote:
>>
>>Bruno (and anyone else interested) --
>>
>>As I promised/threatened, here's the *start* of a write-up on
>>properties, aimed at non-advanced Python programmers:
>>
>> http://www.jjposner.net/media/python-properties-0310.pdf
>
> I'm interested, but not interested enough to download a PDF and fire up
> a PDF reader. Are you really using features that require PDF instead of
> just writing a web page?

http://docs.google.com/viewer?url=http%3A%2F%2Fwww.jjposner.net%2Fmedia%2Fpython-properties-0310.pdf

Hth,

--
John Bokma j3b

Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development


== 4 of 4 ==
Date: Sun, Mar 21 2010 4:28 pm
From: John Posner


On 3/21/2010 5:34 PM, Aahz wrote:
> In article<mailman.555.1268232321.23598.python-list@python.org>,
> John Posner<jjposner@optimum.net> wrote:
>>
>> Bruno (and anyone else interested) --
>>
>> As I promised/threatened, here's the *start* of a write-up on
>> properties, aimed at non-advanced Python programmers:
>>
>> http://www.jjposner.net/media/python-properties-0310.pdf
>
> I'm interested, but not interested enough to download a PDF and fire up
> a PDF reader. Are you really using features that require PDF instead of
> just writing a web page?


No, I compose text using a WYSIWYG editor, and I assumed that PDF was a
convenient format for others.

I've been working on the writeup, and marking it up for use on the
Python Wiki. So I've gone ahead and published it:

http://wiki.python.org/moin/ComputedAttributesUsingPropertyObjects

For good measure, I've also been working on an updated writeup for
"property" in the "Built-in Functions" section of the official Python
docs. A draft is in HTML format at:

http://cl1p.net/jjp_python_property_ref.html/

Thanks for your interest! All comments are most welcome.

-John

==============================================================================
TOPIC: How to keep effects of image filters going for some seconds?
http://groups.google.com/group/comp.lang.python/t/166445798c17868a?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 3:00 pm
From: Terry Reedy


On 3/21/2010 3:23 AM, Ren Wenshan wrote:
> Hello, every pythoner.
>
> Firstly, I want to mention that English is my second language, so
> maybe there are some sentences which makes you confused, sorry.
>
> I have been learning Panda3D, an open source 3D engine, these days.
> Now, I'm trying to write a small game for fun and practice. However,
> I've ran into a problem.
>
> I want to make some speical effects and there is my code:
>
> def ventose(self):
>
> global potato_HP
>
> if potato_HP[0] == 1 and potato_HP[1] == 0:
> if random()> .30:
> self.filters.setCartoonInk(separation = 0.8)
> self.robotVincent.resetHead.start()
> self.decreaseVincentHP()
> Wait(3)
> self.fliters.delCartoonInk()
>
> However, it doesn't work, the CartoonInk effect will never been shown
> in my game and I don't want my game to wait three seconds, what I need
> is to keep the effect for a period of time while the game run as well.

The generic answer is to turn CartoonInk on and set a timed event for
now+ 3 secs to turn it off. You will have to understand how to interact
with the Panda event loop. For a more specific answer, follow Donn's
advice -- Panda forum. I know there was one when I looked at Panda a
year ago.

> Besides that, I also want to show a counting back like "3", then "2",
> then "1", finally "Go".

Ok, instead to events set 1 sec in future.

Terry Jan Reedy


==============================================================================
TOPIC: "EURO GIRLS" "MISS EUROPE" "MISS FRENCH" "FRENCH" "PRETTY GIRLS" "SEXY
FRENCH GIRLS" on www.sexyandpretty-girls.blogspot.com "SEXY RUSSIAN GIRLS" "
SEXY GREEK GIRLS" "SEXY DUTCH GIRLS" "SEXY UK GIRLS" "SEXY HOLLYWOOD GIRLS" "
SEXY BOLLYWOOD"
http://groups.google.com/group/comp.lang.python/t/597c607de14e7d30?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 3:06 pm
From: Terry Reedy


On 3/21/2010 12:55 PM, Zooko O'Whielacronx wrote:
> On Sat, Mar 20, 2010 at 1:27 PM, Brian J Mingus
> <Brian.Mingus@colorado.edu> wrote:
>> Moderating this stuff requires moderating all messages.
>
> Not quite. GNU Mailman comes with nice features to ease this task. You
> can configure it so that everyone who is currently subscribed can post
> freely, but new subscribers get a "moderated" bit set on them. The
> first time this new subscriber attempts to post to the list, a human
> moderator has to inspect their message and decide whether to approve
> it or deny it. If they human moderator approves it, they can also on
> the same web form remove the "moderated" bit from that poster.
>
> Therefore, the volunteer work required would be inspecting the *first*
> post from each *new* subscriber to see if that post is spam.

The first time I post to *any* mailing list from gmane, gmane holds the
message until I respond to an email. So python-list could pass new posts
from gmane while at least auto-querying anything from google.


==============================================================================
TOPIC: Python 3.1.2
http://groups.google.com/group/comp.lang.python/t/9da9e392a2d04ed8?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 3:10 pm
From: Terry Reedy


On 3/21/2010 1:12 PM, Benjamin Peterson wrote:
> On behalf of the Python development team, I'm joyful to announce the second
> bugfix release of the Python 3.1 series, Python 3.1.2.

Thanks for the work.

> This bug fix release fixes numerous issues found in 3.1.1, and is considered a
> production release.
>
> The Python 3.1 version series focuses on the stabilization and optimization of
> the features and changes that Python 3.0 introduced. For example, the new I/O
> system has been rewritten in C for speed. File system APIs that use unicode
> strings now handle paths with undecodable bytes in them. Other features include
> an ordered dictionary implementation, a condensed syntax for nested with
> statements, and support for ttk Tile in Tkinter. For a more extensive list of
> changes in 3.1, see http://doc.python.org/3.1/whatsnew/3.1.html or Misc/NEWS in
> the Python distribution.
>
> To download Python 3.1.2 visit:
>
> http://www.python.org/download/releases/3.1.2/
>
> A list of changes in 3.1.2 can be found here:
>
> http://svn.python.org/projects/python/tags/r312/Misc/NEWS

There seem to be about a hundred fixes.

> The 3.1 documentation can be found at:
>
> http://docs.python.org/3.1
>
> Bugs can always be reported to:
>
> http://bugs.python.org


==============================================================================
TOPIC: using Python distutils bdist_msi to create installer for large
complicated package
http://groups.google.com/group/comp.lang.python/t/fed8e3ca9e67422f?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Mar 21 2010 3:50 pm
From: Bill Janssen


Martin,

I've been re-thinking the UpLib Windows installer technology, and it
occurred to me to wonder why I can't just use the nice bdist_msi module
in Python to build my packages. I took a look, and it seems almost
doable. Presumably you wrote it?

UpLib is a big package, with lots of Python and Java and C programs, and
for Windows I package it with lots of other programs like those from
xpdf. All of this is installed in C:\Program Files\UpLib\VERSION\, in
bin, lib, share, and so forth subdirectories. If I autogenerated a
setup.py file which described everything as "data_files", it should be
simple to package everything up in a Cab, and bdist_msi apparently also
provides the ability to add pre- and post-install scripts. Everything
I need, really.

There are a couple of Python-specific options in the code: the "Product
Name" is prefixed with the python version, and in the GUI, the default
location is the location of a Python distro. If the package had a
"--non-python" option which would defeat these, and perhaps also set
"no-target-optimize" and "no-target-compile" to True, it would be a
simple but pretty general-purpose packager module.

I'll subclass it and play around a bit.

Bill

== 2 of 3 ==
Date: Sun, Mar 21 2010 4:00 pm
From: "Martin v. Löwis"


> I've been re-thinking the UpLib Windows installer technology, and it
> occurred to me to wonder why I can't just use the nice bdist_msi module
> in Python to build my packages. I took a look, and it seems almost
> doable. Presumably you wrote it?

Correct.

> UpLib is a big package, with lots of Python and Java and C programs, and
> for Windows I package it with lots of other programs like those from
> xpdf. All of this is installed in C:\Program Files\UpLib\VERSION\, in
> bin, lib, share, and so forth subdirectories. If I autogenerated a
> setup.py file which described everything as "data_files", it should be
> simple to package everything up in a Cab, and bdist_msi apparently also
> provides the ability to add pre- and post-install scripts. Everything
> I need, really.
>
> There are a couple of Python-specific options in the code: the "Product
> Name" is prefixed with the python version, and in the GUI, the default
> location is the location of a Python distro. If the package had a
> "--non-python" option which would defeat these, and perhaps also set
> "no-target-optimize" and "no-target-compile" to True, it would be a
> simple but pretty general-purpose packager module.

I'd rather recommend to base this off msilib directly, instead of trying
to subvert bdist_msi to do what you want. There is actually quite a lot
python-specifics in bdist_msi. If you find this too tedious to use,
please propose *base classes* that could become part of msilib, rather
than trying to create *subclasses* of the bdist_msi classes.

Regards,
Martin

== 3 of 3 ==
Date: Sun, Mar 21 2010 4:52 pm
From: Bill Janssen


Martin v. Löwis <martin@v.loewis.de> wrote:

> > I've been re-thinking the UpLib Windows installer technology, and it
> > occurred to me to wonder why I can't just use the nice bdist_msi module
> > in Python to build my packages. I took a look, and it seems almost
> > doable. Presumably you wrote it?
>
> Correct.
>
> > UpLib is a big package, with lots of Python and Java and C programs, and
> > for Windows I package it with lots of other programs like those from
> > xpdf. All of this is installed in C:\Program Files\UpLib\VERSION\, in
> > bin, lib, share, and so forth subdirectories. If I autogenerated a
> > setup.py file which described everything as "data_files", it should be
> > simple to package everything up in a Cab, and bdist_msi apparently also
> > provides the ability to add pre- and post-install scripts. Everything
> > I need, really.
> >
> > There are a couple of Python-specific options in the code: the "Product
> > Name" is prefixed with the python version, and in the GUI, the default
> > location is the location of a Python distro. If the package had a
> > "--non-python" option which would defeat these, and perhaps also set
> > "no-target-optimize" and "no-target-compile" to True, it would be a
> > simple but pretty general-purpose packager module.
>
> I'd rather recommend to base this off msilib directly, instead of trying
> to subvert bdist_msi to do what you want.

Yes, that was the first thing I looked at. But as you've pointed out in
the past, it requires a lot of MSI know-how to use that library
directly. For a variety of applications, you've already embedded most
if not all of that know-how in the bdist_msi class. And subclassing
is the indicated way to build on distutils, isn't it?

> There is actually quite a lot python-specifics in bdist_msi.

Well, sort of. If a setup only references "data_files" -- no Python
packages, no extensions -- it's pretty generic.

The "add_find_python" method seems the most python-specific. I'd
remove a lot of that in the generic case. And, of course, modify "run"
so that the product name isn't prefixed with "Python x.y".

> If you find this too tedious to use,
> please propose *base classes* that could become part of msilib, rather
> than trying to create *subclasses* of the bdist_msi classes.

Yes, good idea. For example, all those panels that are in get_ui
could be added by a InstallerBaseGUI class of some sort.

But still, just a few mods to bdist_msi could go a long way. For
instance, you've already pulled out "get_installer_filename". I'd add a
similar method, "get_product_name", which would typically just return
the user-specific name, but in the default case could prefix the product
name with Python 2.6.

Bill

==============================================================================
TOPIC: should writing Unicode files be so slow
http://groups.google.com/group/comp.lang.python/t/f76baa1b73e8d17e?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 3:50 pm
From: Ben Finney


djc <slais-www@ucl.ac.uk> writes:

> I shall concentrate on finding an optimal time to upgrade from Python
> 2.6.

Note that Python 2.7, though nearly ready, is not yet released
<URL:http://www.python.org/download/releases/>.

--
\ "… Nature … is seen to do all things Herself and through |
`\ herself of own accord, rid of all gods." —Titus Lucretius |
_o__) Carus, c. 40 BCE |
Ben Finney

==============================================================================
TOPIC: sell:nike shoes$32,ed hardy(items),jean$30,handbag$35
http://groups.google.com/group/comp.lang.python/t/542e969e6dfdbd0d?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 4:28 pm
From: jhghjg jhgjh


<a href="http://etootoo.com">http://www.etootoo.com</a>

free shipping
competitive price

<p><a href="http://etootoo.com/articleshow.asp?
articleid=26123
">wholesale nikeshoes</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=40466">nike
wholesale</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=22981">china
wholesale jordan sneakers</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23010">wholesale
jordans</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23032">cheap
jordans</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23093">authentic
jordans</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23098">wholesale
Nike dunks</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23112">cheap
nike dunks</a><br>

<a href="http://etootoo.com/articleshow.asp?articleid=23213">nike dunk
for cheap</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23149">discount
nike dunks</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23254">cheap
nike air force one sneaker in u.sl</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23398">cheap
wholesale air force one</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23894">air force
1s 25th wholesale</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23874">cheap air
force ls,air force ones wholesale</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23855">cheap
wholesale nike air max,wholesale nike shox</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=23841">r3,shox
r4,shox r5,shox oz,shox nz,shox tl3</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=24341">cheap
wholesale bape shoes</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=24562">cheap
jeans wholesale</a><br>
<a href="http://etootoo.com/articleshow.asp?articleid=25094">bags
wholesale</a><br>

==============================================================================
TOPIC: GC is very expensive: am I doing something wrong?
http://groups.google.com/group/comp.lang.python/t/de9f2b88dd1b469d?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 4:36 pm
From: Lawrence D'Oliveiro


In message <mailman.963.1268958842.23598.python-list@python.org>, Terry
Reedy wrote:

> No one has discovered a setting
> of the internal tuning parameters for which there are no bad patterns
> and I suspect there are not any such. This does not negate Xavier's
> suggestion that a code change might also solve your problem.

Could it be that for implementing a structure like a trie as the OP is,
where a lot of CPU cycles can be spent manipulating the structure, a high-
level language like Python, Perl or Ruby just gets in the way?

My feeling would be, try to get the language to do as much of the work for
you as possible. If you can't do that, then you might be better off with a
lower-level language.

==============================================================================
TOPIC: add an entry to twentyquestions.org (please)
http://groups.google.com/group/comp.lang.python/t/9de999247c77a883?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Mar 21 2010 4:47 pm
From: twenty questions


add an entry to http://www.twentyquestions.org (please)


== 2 of 2 ==
Date: Sun, Mar 21 2010 6:46 pm
From: Ben Finney


twenty questions <twentyqstns@gmail.com> writes:

> add an entry to http://www.twentyquestions.org (please)

Don't spam groups with your off-topic begging for a closed database silo
(please)

--
\ "Our nylons cost more than common, but you'll find that they |
`\ are best in the long run." —shop, Tokyo |
_o__) |
Ben Finney

==============================================================================
TOPIC: PyInstaller 1.4
http://groups.google.com/group/comp.lang.python/t/88562936a65a0e97?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 4:50 pm
From: Giovanni Bajo


Hello,

I'm happy to announce PyInstaller 1.4, the first formal release after
several years of quiet development.

http://www.pyinstaller.org


=== What it is ===

PyInstaller is a program that converts (packages) Python programs into
stand-alone executables, under Windows, Linux, and Mac OS X. It's
similar to py2exe/py2app, but it is multiplatform and with many advanced
features.

The main goal of PyInstaller is to be compatible with 3rd-party packages
out-of-the-box. This means that, with PyInstaller, all the required
tricks to make external packages work are already integrated within
PyInstaller itself so that there is no user intervention required.
You'll never be required to look for tricks in wikis and apply custom
modification to your files or your setup scripts.

=== Features ===

* Packaging of Python programs into standard executables, that
work on computers without Python installed.
* Multiplatform: works under Windows, Linux and Irix. Experimental
Mac OS X support available.
* Multiversion: works under any version of Python from 1.5 up to
2.6. NOTE: Support for Python 2.6+ on Windows is not included in
this release yet. Please see this page for a working patch:
http://www.pyinstaller.org/wiki/Python26Win
* Flexible packaging mode:
* Single directory: build a directory containing an
executable plus all the external binary modules
(.dll, .pyd, .so) used by the program.
* Single file: build a single executable file, totally
self-contained, which runs without any external
dependency.
* Custom: you can automate PyInstaller to do whatever
packaging mode you want through a simple script file in
Python.
* Explicit intelligent support for many 3rd-packages (for hidden
imports, external data files, etc.), to make them work with
PyInstaller out-of-the-box.
* Full single-file EGG support: .egg files are automatically
packaged by PyInstaller as-is, so that all features are
supported at runtime as well (entry points, etc.).
* Automatic support for binary libraries used through ctypes (see
http://www.pyinstaller.org/wiki/CtypesDependencySupport for
details).
* Support for automatic binary packing through the well-known UPX
compressor.
* Support for code-signing executables on Windows.
* Optional console mode (see standard output and standard error at
runtime).
* Selectable executable icon (Windows only).
* Fully configurable version resource section in executable
(Windows only).
* Support for building COM servers (Windows only).

=== ChangeLog ===

For those already using older versions of PyInstaller, the full
changelog for this release can be found here:

http://www.pyinstaller.org/browser/tags/1.4/doc/CHANGES.txt


=== Feedback ===

We're eager to listent to your feedback on using PyInstaller:

Ticketing system: http://www.pyinstaller.org/newticket
Mailing list: http://groups-beta.google.com/group/PyInstaller

--
Giovanni Bajo :: Develer S.r.l.
rasky@develer.com :: http://www.develer.com

Blog: http://giovanni.bajo.it
Last post: ctypes support in PyInstaller

==============================================================================
TOPIC: Best practise for dual stack programming in python
http://groups.google.com/group/comp.lang.python/t/34ecf83fa2278654?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Mar 21 2010 5:12 pm
From: Jimmy Stewpot


Hello,

The organisation that I currently work for has a large number of 'legacy' tools and scripts which rely entirely on IPv4. Many of them have been written and not documented etc. The organisation is in the process of moving to a dual stack environment over the next 3 months. With that in mind many of our scripts need to be rewritten and documented. I have been looking at moving from a mix of languages over to a standard which at this point is looking like it will be Python (because I am most familiar with it). I have never done any dual stack coding so I am interested to know if there are any good resources for developing dual stack python code?

I have had a look around and have found very little on the python web page which makes me worry. Does anyone have any recommendations on web pages to read or books to look at?

Any additional advice would be really appreciated.

Regards,

Jimmy Stewpot.


== 2 of 2 ==
Date: Sun, Mar 21 2010 7:39 pm
From: Terry Reedy


On 3/21/2010 8:12 PM, Jimmy Stewpot wrote:
> Hello,
>
> The organisation that I currently work for has a large number of
> 'legacy' tools and scripts which rely entirely on IPv4. Many of them
> have been written and not documented etc. The organisation is in the
> process of moving to a dual stack environment over the next 3 months.
> With that in mind many of our scripts need to be rewritten and
> documented. I have been looking at moving from a mix of languages
> over to a standard which at this point is looking like it will be
> Python (because I am most familiar with it). I have never done any
> dual stack coding so I am interested to know if there are any good
> resources for developing dual stack python code? I have had a look
> around and have found very little on the python web page which makes
> me worry. Does anyone have any recommendations on web pages to read
> or books to look at?

There are at least 2 ip address libraries which handle both ip4 and ip6.
One is Google's package,
http://pypi.python.org/pypi/ipaddr/2.0.0
I forget the name of the other, which covers a bit more than the above
with a slightly different conceptual model. Would these help.

Terry Jan Reedy


==============================================================================
TOPIC: DreamPie - The Python shell you've always dreamed about!
http://groups.google.com/group/comp.lang.python/t/7e77cd5af5c1d57f?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 8:45 pm
From: kuru


Thanks for the shell. It is nice alternative , however I am not ready
to give up Ipython :)

If the code ends with a comment line your shell is giving an error.

Feature request: It would be nice to have numbered lines in the code
section, it makes it hard to find problem line
Feature request: Loading an actual Python file rather than copy
pasting

keep up the good work

==============================================================================
TOPIC: StringChain -- a data structure for managing large sequences of chunks
of bytes
http://groups.google.com/group/comp.lang.python/t/0289b7f3bff4d999?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 10:09 pm
From: "Zooko O'Whielacronx"


Folks:

I failed to make something sufficiently clear in my original message
about StringChain. The use case that I am talking about is not simply
that you need to accumulate a sequence of incoming chunks of data,
concatenate them together, and then process the entire result. If that
is all you need to do then indeed you can accumulate the incoming
strings in a list and then run ''.join(thelist) when you have received
all of them and are ready to process them.

But the use case that I am talking about is where you need to
accumulate new incoming strings into your buffer while alternately
processing leading prefixes of the buffer. The typical example is that
sequences of bytes are arriving on your TCP socket and you are
processing the stream incrementally. You need to process the leading
prefixes of the stream as soon as you can (e.g. as soon as a line
followed by a newline has accumulated, or as soon as another complete
element in your data format has accumulated, etc.); you can't simply
wait until the bytes stop coming and then concatenate the entire
collection together at once.

This is exactly the current situation in foolscap [1] which is causing
a performance problem in Tahoe-LAFS [2].

To illustrate what I mean I cooked up some benchmarks showing the task
of "accumulate a bunch of things then consume them in a single gulp"
versus the task of "alternate between accumulating and consuming"
(with accumulation going faster than consumption until the input
stream runs dry).

I implemented a few data structures for benchmarking: StringChain, the
naive "accumulatorstr += newstr" approach (named "Stringy" in the
benchmarks), one based on cStringIO (named "StringIOy"), one based on
accumulating the new strings into a list and then doing
''.join(accumulatorlist) whenever you need to consume a leading prefix
(called "SimplerStringChain").

Below are the abbreviated results of the benchmark. You can easily run
this benchmark yourself by following the README.txt in the StringChain
source package [3]. These results show that for the load imposed by
this benchmark StringChain is the only one of the four that scales and
that it is also nice and fast.

The left-hand column is the total number of bytes that were run
through it. The results are shown in nanoseconds per byte in
exponential notation. ("e+01" means times 10, "e+02" means times 100,
and "e+03" means times 1000, etc.) Each result is the best of 10
tries, or of 5 tries for the tasks which were taking too long to run
it 10 times.

Regards,

Zooko

[1] http://foolscap.lothar.com/trac/ticket/149
[2] http://allmydata.org/pipermail/tahoe-dev/2010-March/004181.html
[3] http://tahoe-lafs.org/trac/stringchain

impl: StringChain
task: _accumulate_then_one_gulp
10000 best: 2.694e+00
50000 best: 2.742e+00
100000 best: 2.310e+00
500000 best: 2.040e+00
1000000 best: 1.988e+00
5000000 best: 2.193e+00

task: _alternate_str
10000 best: 6.509e+00
50000 best: 4.559e+00
100000 best: 4.308e+00
500000 best: 4.070e+00
1000000 best: 3.991e+00
5000000 best: 4.000e+00

impl: SimplerStringChain
task: _accumulate_then_one_gulp
10000 best: 1.407e+00
50000 best: 2.317e+00
100000 best: 2.012e+00
500000 best: 1.902e+00
1000000 best: 1.897e+00
5000000 best: 2.104e+00

task: _alternate_str
10000 best: 4.888e+00
50000 best: 5.198e+00
100000 best: 1.750e+01
500000 best: 6.233e+01
1000000 best: 1.134e+02
5000000 best: 7.599e+02

impl: StringIOy
task: _accumulate_then_one_gulp
10000 best: 4.196e+00
50000 best: 5.522e+00
100000 best: 4.499e+00
500000 best: 3.756e+00
1000000 best: 4.176e+00
5000000 best: 5.414e+00

task: _alternate_str
10000 best: 5.484e+00
50000 best: 7.863e+00
100000 best: 2.126e+01
500000 best: 6.972e+01
1000000 best: 1.219e+02
5000000 best: 9.463e+02

task: _accumulate_then_one_gulp
10000 best: 1.502e+00
50000 best: 1.420e+01
100000 best: 2.245e+01
500000 best: 8.577e+01
1000000 best: 2.295e+02
5000000 best: 1.326e+03

task: _alternate_str
10000 best: 3.290e+00
50000 best: 4.220e+00
100000 best: 1.665e+01
500000 best: 6.281e+01
1000000 best: 1.127e+02
5000000 best: 7.626e+02

==============================================================================
TOPIC: ------->>>FREE MAC<<<-------
http://groups.google.com/group/comp.lang.python/t/21c945586fba170d?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Mar 21 2010 10:29 pm
From: sam


http://michellemichaeldiscounts.com/16801.html


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

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