PyPy 1.1 final released!

2009-04-29 Thread Carl Friedrich Bolz
== PyPy 1.1: Compatibility Consolidation == Welcome to the PyPy 1.1 release - the first release after the end of EU funding. This release focuses on making PyPy's Python interpreter more compatible with CPython

Jython 2.5 Beta 4 Released

2009-04-29 Thread Frank Wierzbicki
Jython 2.5b4 is available for download here: http://downloads.sourceforge.net/jython/jython_installer-2.5b4.jar. See the installation instructions here: http://www.jython.org/Project/installation.html. While no new features have been added since Beta 3, we have fixed a number of bugs. One of the

bzr 1.13.2 released!

2009-04-29 Thread Bob Tanner
A regression was found in the 1.13.1 release. When bzr 1.13.1 and earlier push a stacked branch they do not take care to push all the parent inventories for the transferred revisions. This means that a smart server serving that branch often cannot calculate inventory deltas for the branch

ANN: Course Python for Non-Programmers

2009-04-29 Thread Mike Müller
Python Academy is offering the course Python for Non-Programmers on June 20 and 21, 2009 in Leipzig, Germany. The course is designed for participants without programming experience. It is a gentle introduction to Python and programming covering all Python basics including object-orientation. A

bzr-1.14 released!

2009-04-29 Thread Bob Tanner
New formats 1.14 and 1.14-rich-root supporting End-Of-Line (EOL) conversions, keyword templating (via the bzr-keywords plugin) and generic content filtering. End-of-line conversion is now supported for formats supporting content filtering. Changes from 1.14rc2 to 1.14final

OSCON ramp-up: booth

2009-04-29 Thread Aahz
OSCON this year is local to me, and I'd like to make this the year we finally have a booth at OSCON. Do you have experience with purchasing material for a booth? If you can help with planning, I would appreciate it if you would join the mailing list http://mail.python.org/mailman/listinfo/oscon

Re: complementary lists?

2009-04-29 Thread Arnaud Delobelle
Kay Schluehr kay.schlu...@gmx.net writes: On 29 Apr., 05:41, Ross ross.j...@gmail.com wrote: If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a subset of x: y = [1,4,7] , is there a quick way that I could return the complementary subset to y z=[2,3,5,6,8,9] ? The

Can not run under python 2.6?

2009-04-29 Thread Jianchun Zhou
Hi, there: I am new to python, and now I got a trouble: I have an application named canola, it is written under python 2.5, and can run normally under python 2.5 But when it comes under python 2.6, problem up, it says: Traceback (most recent call last): File

Re: What do you think of ShowMeDo

2009-04-29 Thread Steven D'Aprano
On Tue, 28 Apr 2009 21:56:08 -0700, kyran wrote: I stumbled across this thread while typing a speculative 'showmedo' in google, as you do while taking a break on a (very) late Tuesday evening. To declare my interest, as things stand I am Showmedo CEO, CTO, boywhomakesthetea etc.. I'm not

Re: PEP 382: Namespace Packages

2009-04-29 Thread Martin v. Löwis
syt wrote: Another point: I don't like .pth, .pkg files. Isn't this pep an opportunity to at least unify them? Can you propose a unification? I'm concerned that if I propose one, you may still not like it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Silent install of Python software(2.5) for windows.

2009-04-29 Thread kc.pyt...@gmail.com
Hi All, Is it possible to automate the installation of python software(2.5) without the need of pressing Next so many times? Below is the platform in which it should be installed. OS : windows Thanks Regards, Kalyan. -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV performance

2009-04-29 Thread Peter Otten
Lawrence D'Oliveiro wrote: In message gt47lc$kar$0...@news.t-online.com, Peter Otten wrote: gc.disable() # create many small objects that you want to keep gc.enable() Every time I see something like this, I feel the urge to save the previous state and restore it afterwards:

Re: Can not run under python 2.6?

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 03:20:14 -0300, Jianchun Zhou jianchun.z...@gmail.com escribió: Traceback (most recent call last): mod = __import__(modpath, fromlist=[mod_name]) ImportError: Import by filename is not supported. Any body any idea what should I do? See this recent thread on the same

Re: Get item from set

2009-04-29 Thread Peter Otten
Aahz wrote: In article gt1kb7$jqg$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Here's a trick to find the actual element. I think Raymond Hettinger posted an implementation of this idea recently, but I can't find it at the moment. Your code is inverted from Raymond's: I

Re: Python Noob - a couple questions involving a web app

2009-04-29 Thread Bruno Desthuilliers
Kyle T. Jones a écrit : Been programming for a long time, but just starting out with Python. Not a professional programmer, just that guy in one of those organizations that won't hire a pro, instead saying Hey, Kyle knows computer stuff - let's have him do this (and that, and the other, etc).

Re: Silent install of Python software(2.5) for windows.

2009-04-29 Thread Gabriel Genellina
En Wed, 29 Apr 2009 03:58:02 -0300, kc.pyt...@gmail.com kc.pyt...@gmail.com escribió: Is it possible to automate the installation of python software(2.5) without the need of pressing Next so many times? Below is the platform in which it should be installed. OS : windows Try using: msiexec

Re: How to retry something with a timeout in Python?

2009-04-29 Thread tinnews
Scott David Daniels scott.dani...@acm.org wrote: tinn...@isbd.co.uk wrote: This feels like it should be simple but I can't see a clean way of doing it at the moment. I want to retry locking a file for a number of times and then give up, in pseudo-code it would be something like:-

Screenshot of a web page

2009-04-29 Thread mattia
Are you aware of any python module that automatically gives you a screenshot of a web page? -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV performance

2009-04-29 Thread Lawrence D'Oliveiro
In message gt8ush$kib$0...@news.t-online.com, Peter Otten wrote: When I see the sequence save state change state do something restore state I feel compelled to throw in a try ... finally Yeah, but I try to avoid using exceptions to that extent. :) --

Re: desperately looking for a howto on running my wxPython app on Vista

2009-04-29 Thread Paul Sijben
Gabriel Genellina wrote: I am currently stuck on the infamous R6034 error but I understand that after that there may be another issue with certain wxPython functions. That should be fixed in Python 2.6.2, I think. Are you compiling all your dependencies, including Python itself? R6034 is

Re: What do you think of ShowMeDo

2009-04-29 Thread Jeremiah Dodds
On Wed, Apr 29, 2009 at 6:48 AM, Banibrata Dutta banibrata.du...@gmail.comwrote: Personally, I faced some despair with a large number of the free ShowMeDo tutorials, example the one on WxPython, where for the first 4 free tutorials, the tutor hardly progresses to any bit of programming, and

Re: Silent install of Python software(2.5) for windows.

2009-04-29 Thread Martin P. Hellwig
kc.pyt...@gmail.com wrote: Hi All, Is it possible to automate the installation of python software(2.5) without the need of pressing Next so many times? Below is the platform in which it should be installed. OS : windows Thanks Regards, Kalyan. Distribute the msi using Active Directories

Re: dict is really slow for big truck

2009-04-29 Thread Sion Arrowsmith
bearophileh...@lycos.com wrote: On Apr 28, 2:54 pm, forrest yang gforrest.y...@gmail.com wrote: for line in open(file)    arr=line.strip().split('\t')    dict[line.split(None, 1)[0]]=arr Keys are integers, so they are very efficiently managed by the dict. The keys aren't integers, though,

Problems resolved

2009-04-29 Thread Paul Hemans
Thanks to everyone for all the suggestions. Here's what I did: Stuck with sqlAlchemy because I like the idea of ORMs and I like being able to abstract from the database vendor. Left the schema definitions to be generated in a separate file, so that it could be re-used Dumped xml.dom and went to

Re: What do you think of ShowMeDo

2009-04-29 Thread Berkin Malkoc
I do not get why the level of criticism is rising so high in some of the messages. I have nothing to say about more philosophical aspects of the issue but would like to comment from a more pragmatic point of view: I am completely happy with the *structure* of site (*visually* it may get better,

Re: Geohashing

2009-04-29 Thread djc
Raymond Hettinger wrote: import hashlib def geohash(latitude, longitude, datedow): '''Compute geohash() in http://xkcd.com/426/ geohash(37.421542, -122.085589, b'2005-05-26-10458.68') 37.857713 -122.544543 ''' h = hashlib.md5(datedow).hexdigest() p, q =

Re: Geohashing

2009-04-29 Thread Marco Mariani
djc wrote: Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) geohash(37.421542, -122.085589, b'2005-05-26-10458.68') ^ SyntaxError: invalid syntax The byte type is new in 2.6 --

Re: python segfaulting, MemoryError (PyQt)

2009-04-29 Thread Denis L
Phil Thompson p...@riverbankcomputing.com wrote in message news:mailman.4719.1240945001.11746.python-l...@python.org... On Tue, 28 Apr 2009 19:07:30 +0200, Denis L n...@spam.com wrote: Phil Thompson p...@riverbankcomputing.com wrote in message

Re: Python servlet for Java applet ?

2009-04-29 Thread Linuxguy123
On Sat, 2009-04-25 at 02:00 +0200, Piet van Oostrum wrote: Linuxguy123 linuxguy...@gmail.com (L) wrote: L Hi guys. L Is there a way to use a python application as the back end (ie rpc) for L a Java based applet ? Yes, you can use Corba, XMLRPC, SOAP, JSON-RPC. Corba probably will have

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread skip
Thanks. Didn't used to be that way I don't think. Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam float('1.23456789e+004 ') 12345.6789 John :-) Maybe string.ato[if] used to

Re: Python servlet for Java applet ?

2009-04-29 Thread Marco Bizzarri
On Wed, Apr 29, 2009 at 3:14 PM, Linuxguy123 linuxguy...@gmail.com wrote: How does one connect the servlet to the applet ?  Does anyone know of an example program that demonstrates a Python servlet with a Java applet ? Thanks ! Ok, let's make some basic questions: 1) do you know how to

Pythonic emptiness checking

2009-04-29 Thread Filip Gruszczyński
One of the Python Zen rules is Explicit is better implicit. And yet it's ok to do: if x: do_sth when x is string or list. Since it's very comfy, I've got nothing against though. I am just curious, why is it so? And one more thing: is it ok to do if x: instead of if x is not None: Because

Re: Why bool( object )?

2009-04-29 Thread Bruno Desthuilliers
Lawrence D'Oliveiro a écrit : In message 54cb7f8a- fef4-4bf8-8054-16dc9b5c8...@d2g2000pra.googlegroups.com, Aaron Brady wrote: What is the rationale for considering all instances true of a user- defined type? It's a stupid idea, Nope, it's a very sensible default (given you can redefine

Re: Tools for web applications

2009-04-29 Thread Mario
On Tue, 28 Apr 2009 17:37:57 -0700, Daniel Fetchinson wrote: What easyToLearn tools you suggest for creating: 1. powerfull web applications Have a look at http://wiki.python.org/moin/WebFrameworks You will find that there are many options each with its own fan crowd emphasizing the

Re: Pythonic emptiness checking

2009-04-29 Thread Bruno Desthuilliers
Filip Gruszczyński a écrit : One of the Python Zen rules is Explicit is better implicit. And yet it's ok to do: if x: do_sth when x is string or list. Since it's very comfy, I've got nothing against though. I am just curious, why is it so? Because it is explicit (or at least considered as

Re: Pythonic emptiness checking

2009-04-29 Thread Sibylle Koczian
Filip Gruszczyński schrieb: One of the Python Zen rules is Explicit is better implicit. And yet it's ok to do: if x: do_sth when x is string or list. Since it's very comfy, I've got nothing against though. I am just curious, why is it so? And one more thing: is it ok to do if x:

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread John Machin
On 29/04/2009 11:33 PM, s...@pobox.com wrote: Thanks. Didn't used to be that way I don't think. Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam float('1.23456789e+004 ') 12345.6789

Re: Why bool( object )?

2009-04-29 Thread Aahz
In article 340175e7-b349-4ca2-bf66-fa9113253...@v23g2000pro.googlegroups.com, Aaron Brady castiro...@gmail.com wrote: The sound of that metaphor is rather pleasing ('sweet nothings'), but I'm not so sure that metaphors belong in computer science and programming. Well, you won't be a good

Re: Get item from set

2009-04-29 Thread Aahz
In article gt8v37$kib$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Aahz wrote: In article gt1kb7$jqg$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Here's a trick to find the actual element. I think Raymond Hettinger posted an implementation of this idea recently,

Re: Tools for web applications

2009-04-29 Thread Mario
On Wed, 29 Apr 2009 13:38:53 +, Mario wrote: On Tue, 28 Apr 2009 17:37:57 -0700, Daniel Fetchinson wrote: What easyToLearn tools you suggest for creating: 1. powerfull web applications Have a look at http://wiki.python.org/moin/WebFrameworks You will find that there are many

Re: Python Noob - a couple questions involving a web app

2009-04-29 Thread Kyle T. Jones
Bruno Desthuilliers, my dear, dear friend, there was this time, oh, 4/29/2009 3:02 AM or thereabouts, when you let the following craziness loose on Usenet: Kyle T. Jones a écrit : Been programming for a long time, but just starting out with Python. Not a professional programmer, just that guy

Re: sorting items in a table problematic because of scientific notation

2009-04-29 Thread skip
Maybe string.ato[if] used to behave that way? John Nope. ... OK, I remember what it was. The C atof()/atoi() functions will stop at the first non-numeric character. (I believe the more modern strtod/strtof functions behave the same way.) You could thus call atof( 12345

Inspecting And Changing Strings In Python

2009-04-29 Thread Jim Carlock
Anyone here able to provide a link to the Python functions for comparing strings and updating strings? I'm looking to do some character by character analysis until I find the '@' character and then change the rest of the string after that. Thank you for your help. -- Jim Carlock

Re: Inspecting And Changing Strings In Python

2009-04-29 Thread Joel Madigan
Start here: http://www.lmgtfy.com/?q=python+string On Wed, Apr 29, 2009 at 10:36 AM, Jim Carlock jcarl...@munged.microcosmotalk.com wrote: Anyone here able to provide a link to the Python functions for comparing strings and updating strings? I'm looking to do some character by character

Re: Pythonic emptiness checking

2009-04-29 Thread Filip Gruszczyński
Yes, I get the difference. If x is [], than if x: won't be executed and if x is not None: will be. Thanks for clarifying. -- Filip Gruszczyński -- http://mail.python.org/mailman/listinfo/python-list

Re: Inspecting And Changing Strings In Python

2009-04-29 Thread Duncan Booth
Jim Carlock jcarl...@munged.microcosmotalk.com wrote: Anyone here able to provide a link to the Python functions for comparing strings and updating strings? I'm looking to do some character by character analysis until I find the '@' character and then change the rest of the string after that.

Re: dict is really slow for big truck

2009-04-29 Thread Bruno Desthuilliers
bearophileh...@lycos.com a écrit : On Apr 28, 2:54 pm, forrest yang gforrest.y...@gmail.com wrote: i try to load a big file into a dict, which is about 9,000,000 lines, something like 1 2 3 4 2 2 3 4 3 4 5 6 code for line in open(file) arr=line.strip().split('\t') dict[line.split(None,

Re: Python Noob - a couple questions involving a web app

2009-04-29 Thread David Smith
Kyle T. Jones wrote: Bruno Desthuilliers, my dear, dear friend, there was this time, oh, 4/29/2009 3:02 AM or thereabouts, when you let the following craziness loose on Usenet: Kyle T. Jones a écrit : Been programming for a long time, but just starting out with Python. Not a professional

Re: Python Noob - a couple questions involving a web app

2009-04-29 Thread Kyle Terry
On Wed, Apr 29, 2009 at 8:24 AM, David Smith d...@cornell.edu wrote: Kyle T. Jones wrote: Bruno Desthuilliers, my dear, dear friend, there was this time, oh, 4/29/2009 3:02 AM or thereabouts, when you let the following craziness loose on Usenet: Kyle T. Jones a écrit : Been programming

Re: Why bool( object )?

2009-04-29 Thread Marco Mariani
Bruno Desthuilliers wrote: Lawrence D'Oliveiro a écrit : What is the rationale for considering all instances true of a user- defined type? It's a stupid idea, Nope, it's a very sensible default (given you can redefine the 'nothingness' value of your types instances), specially when the

Re: Get item from set

2009-04-29 Thread Peter Otten
Aahz wrote: In article gt8v37$kib$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Aahz wrote: In article gt1kb7$jqg$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Here's a trick to find the actual element. I think Raymond Hettinger posted an implementation of this

Re: Get item from set

2009-04-29 Thread Aahz
In article gt9t62$g6f$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Aahz wrote: In article gt8v37$kib$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Aahz wrote: In article gt1kb7$jqg$0...@news.t-online.com, Peter Otten __pete...@web.de wrote: Here's a trick to

Re: Tools for web applications

2009-04-29 Thread Daniel Fetchinson
What easyToLearn tools you suggest for creating: 1. powerfull web applications Have a look at http://wiki.python.org/moin/WebFrameworks You will find that there are many options each with its own fan crowd emphasizing the advantages and downplaying the disadvantages of their favorite

Re: Screenshot of a web page

2009-04-29 Thread Daniel Fetchinson
Are you aware of any python module that automatically gives you a screenshot of a web page? http://mail.python.org/pipermail/tutor/2008-December/065847.html Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown --

Return value usage

2009-04-29 Thread Zac Burns
I would like to know when my function is called whether or not the return value is used. Is this doable in python? If it is, can it ever be pythonic? The use case is that I have functions who's side effects and return values are cached. I would like to optimize them such that I don't have to

Re: dict is really slow for big truck

2009-04-29 Thread Scott David Daniels
Bruno Desthuilliers wrote: d = {} for line in open(thefile): arr = line.strip().split() d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When does line.strip().split() ever differ from line.split()? --Scott David

Re: fcntl and siginfo_t in python

2009-04-29 Thread ma
Here's something that I came up with so far, I'm having some issues with segfaulting, if I want to pass a struct member by ref in ctypes(see below), if not, I just get a Real-time signal 0 sent back to me. Any ideas? #!/usr/bin/env python import os, sys, re try: import fcntl except ImportError:

Installing Python 2.5.4 from Source under Windows

2009-04-29 Thread Paul Franz
I have looked and looked and looked. But I can not find any directions on how to install the version of Python build using Microsoft's compiler. It builds. I get the dlls and the exe's. But there is no documentation that says how to install what has been built. I have read every readme and

Re: Return value usage

2009-04-29 Thread Simon Brunning
2009/4/29 Zac Burns zac...@gmail.com: I would like to know when my function is called whether or not the return value is used. Is this doable in python? If it is, can it ever be pythonic? AFAIK, no, it's not. The use case is that I have functions who's side effects and return values are

Re: Return value usage

2009-04-29 Thread Zac Burns
On Wed, Apr 29, 2009 at 10:14 AM, Simon Brunning si...@brunningonline.net wrote: 2009/4/29 Zac Burns zac...@gmail.com: Why not return a proxy, and have the proxy do the retrieval of the needed data if it's used? Delegation is ridiculously easy in Python. Interesting idea. I like it. I've

Re: Return value usage

2009-04-29 Thread MRAB
Zac Burns wrote: I would like to know when my function is called whether or not the return value is used. Is this doable in python? If it is, can it ever be pythonic? It doesn't sound Pythonic to me. The use case is that I have functions who's side effects and return values are cached. I

Re: Web framework for embedded system

2009-04-29 Thread Thomas Heller
Thomas Heller schrieb: I'm looking for a lightweight web-framework for an embedded system. The system is running a realtime linux-variant on a 200 MHz ARM processor, Python reports a performance of around 500 pystones. The web application will not be too fancy, no databases involved for

Python installation challenge

2009-04-29 Thread Evan Kroske
I'm not one to overreact, but I've got a serious problem with my Python installation. I've tried to install from source, and I've tried to install with apt-get, but no matter which method I use, my installation is crippled. When I try to install Python 2.6.2 or 2.6.1, the installer warns me that

import and package confusion

2009-04-29 Thread Dale Amon
I am going around in circles right now and have to admit I do not understand what is going on with import of hierarchical packages/modules. Perhaps someone can get me on the road again. Here is a subset of what I am trying to accomplish: The package directory set up: VLMLegacy/

Re: Return value usage

2009-04-29 Thread Zac Burns
The point of caching is that it lets you retrieve a result cheaply that was expensive to produce by saving the result in case it's needed again. If the caching itself is expensive because it requires network access then, IMHO, that's not proper caching! (You would need a 2-level cache, ie a

Re: Python installation challenge

2009-04-29 Thread skip
Evan ... 've tried to install from source, and I've tried to install Evan with apt-get, but no matter which method I use, my installation is Evan crippled. When I try to install Python 2.6.2 or 2.6.1, the Evan installer warns me that it has failed to install zlib and Evan

Re: Screenshot of a web page

2009-04-29 Thread Дамјан Георгиевски
Are you aware of any python module that automatically gives you a screenshot of a web page? PyQt then use it's WebKit based component, load the web page, then render it into an image. -- дамјан ( http://softver.org.mk/damjan/ ) Give me the knowledge to change the code I do not accept, the

Re: Return value usage

2009-04-29 Thread MRAB
Zac Burns wrote: The point of caching is that it lets you retrieve a result cheaply that was expensive to produce by saving the result in case it's needed again. If the caching itself is expensive because it requires network access then, IMHO, that's not proper caching! (You would need a 2-level

Re: dict is really slow for big truck

2009-04-29 Thread MRAB
Scott David Daniels wrote: Bruno Desthuilliers wrote: d = {} for line in open(thefile): arr = line.strip().split() d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When does line.strip().split() ever differ from

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: I am going around in circles right now and have to admit I do not understand what is going on with import of hierarchical packages/modules. Perhaps someone can get me on the road again. Here is a subset of what I am trying to accomplish: The package directory set up:

Re: import and package confusion

2009-04-29 Thread Dale Amon
I am trying to get to the heart of what it is I am missing. Is it the case that if you have a module C in a package A: A.C that there is no way to load it such that you can use: x = A.C() in your code? This is just a simpler case of what I'm trying to do now, which has a

Re: Would you support adding UNC support to os.path on Windows?

2009-04-29 Thread Larry Hastings
norseman wrote: ...This patch changes ntpath ...changing or adding to such a module which is OS specific is fine with me. [...] To point it bluntly: How does one use F: in Linux in the identical fashion as a MicroSoft OS? Sorry, I assumed this was common knowledge: os.path is

Re: dict is really slow for big truck

2009-04-29 Thread Scott David Daniels
MRAB wrote: Scott David Daniels wrote: Bruno Desthuilliers wrote: d = {} for line in open(thefile): arr = line.strip().split() d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When does line.strip().split() ever differ

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: I am trying to get to the heart of what it is I am missing. Is it the case that if you have a module C in a package A: A.C that there is no way to load it such that you can use: x = A.C() in your code? OK, here's a simple question. What do you expect from:

Re: dict is really slow for big truck

2009-04-29 Thread J. Cliff Dyer
On Wed, 2009-04-29 at 10:05 -0700, Scott David Daniels wrote: Bruno Desthuilliers wrote: d = {} for line in open(thefile): arr = line.strip().split() d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When does

Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 01:12:33PM -0700, Scott David Daniels wrote: Dale Amon wrote: I am trying to get to the heart of what it is I am missing. Is it the case that if you have a module C in a package A: A.C that there is no way to load it such that you can use: x = A.C() in your

Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 04:34:03PM -0400, Dale Amon wrote: type = VLM4997 type.Header(args) type.Plan(args) type.Conditions(args) Where the type might change from execution to execution or even on different iterations. Actually let me make that reflect more

numpy choosing groups / clusters of values

2009-04-29 Thread T Kirstine
I have a numpy array and would like to get the values from the array where groups of values are the same. Select the groups of 0 where group is 3 and change 0 to 5 This [3, 2, 1, 0, 0], [1, 0, 3, 0, 0], [2, 0, 1, 3, 0], [0, 2, 3, 3, 0] to this [3, 2, 1, 5, 5], [1, 0, 3, 5, 5], [2, 0, 1, 3,

Re: import and package confusion

2009-04-29 Thread Pascal Chambon
Actually, the parethesis mean calling the object. Callable objects can be of different types : -functions - in which case they get executed -classes (or metaclasses) - in which case they get instantiated (with all the protocol : __new__(), __init__()...) -other objects - in which case they

Re: dict is really slow for big truck

2009-04-29 Thread MRAB
Scott David Daniels wrote: MRAB wrote: Scott David Daniels wrote: Bruno Desthuilliers wrote: d = {} for line in open(thefile): arr = line.strip().split() d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When does

Re: Silent install of Python software(2.5) for windows.

2009-04-29 Thread Martin v. Löwis
Is it possible to automate the installation of python software(2.5) without the need of pressing Next so many times? See http://www.python.org/download/releases/2.5/msi/ Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python 2.5.4 from Source under Windows

2009-04-29 Thread Martin v. Löwis
I have looked and looked and looked. But I can not find any directions on how to install the version of Python build using Microsoft's compiler. It builds. I get the dlls and the exe's. But there is no documentation that says how to install what has been built. I have read every readme and

Re: CSV performance

2009-04-29 Thread Jorgen Grahn
On Mon, 27 Apr 2009 23:56:47 +0200, dean de...@yahoo.com wrote: On Mon, 27 Apr 2009 04:22:24 -0700 (PDT), psaff...@googlemail.com wrote: I'm using the CSV library to process a large amount of data - 28 files, each of 130MB. Just reading in the data from one file and filing it into very simple

Re: Third Party Modules

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 10:15:23 -0700, John Nagle na...@animats.com wrote: Brock wrote: Hi Everyone, I know this is most likely a basic question and you will roll your eyes, but I am just starting out with Python (hobbyist) and I see many tutorials on the web referring to the use of external

Re: stuck with PyOBEX

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 18:52:38 +0200, Diez B. Roggisch de...@nospam.web.de wrote: alejandro wrote: [AF_BLUETOOTH] Can you tell me what is it? Maybe I can search it and pass it in another way... if it is an address or protocol name I'm not entirely sure, but I guess no, you can't simply

Re: import and package confusion

2009-04-29 Thread Scott David Daniels
Dale Amon wrote: On Wed, Apr 29, 2009 at 01:12:33PM -0700, Scott David Daniels wrote: Dale Amon wrote: I am trying to get to the heart of what it is I am missing. Is it the case that if you have a module C in a package A: A.C that there is no way to load it such that you can

Re: dict is really slow for big truck

2009-04-29 Thread pruebauno
On Apr 29, 1:05 pm, Scott David Daniels scott.dani...@acm.org wrote: Bruno Desthuilliers wrote: d = {} for line in open(thefile):    arr = line.strip().split()    d[arr[0]] = arr Sorry, not picking on Bruno in particular, but I keep seeing this formulation around various places. When

Re: Why bool( object )?

2009-04-29 Thread Aaron Brady
On Apr 28, 9:54 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 28 Apr 2009 11:59:18 -0700, Aaron Brady wrote: To steal an idiom from Laura: Python has a float-shaped Nothing 0.0, a list-shaped Nothing [], a dict-shaped Nothing {}, an int-shaped Nothing 0, a

Python 2.6 Install on OSX Server 10.5: lWhich flag to use in configure to Change the Install location?

2009-04-29 Thread Omita
Long story short... I am installing Python 2.6 on OSX Server. By default the Python.framework is installing in /Library: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the install location to be here: /System/Library/Frameworks/Python.framework/ Do

Techkicks.com technology links, community driven

2009-04-29 Thread Steven
TechKicks.com is a community based technology site. It specializes in Hi-Technologies like Robotics, ERP, GPS, Python, Haskell, Lisp, Ruby On Rails, and common techs like c#, PHP, Java, Sql and many more. Individual users of the site submit and review stories, the most popular of which make it to

command prompt history filtered by initial letters

2009-04-29 Thread limit
Hello, On WindowsXP with Python 2.5.1 (from the python-2.5.1.msi): when I'm at the python prompt, up-arrow scrolls through the command history. If I type group of characters first, up-arrow shows only the previous commands that start with that group of characters. On CentOS 5 with Python 2.5.4

Re: desperately looking for a howto on running my wxPython app on Vista

2009-04-29 Thread Mike Driscoll
On Apr 29, 4:17 am, Paul Sijben paul.sij...@xs4all.nl wrote: Gabriel Genellina wrote: I am currently stuck on the infamous R6034 error but I understand that after that there may be another issue with certain wxPython functions. That should be fixed in Python 2.6.2, I think. Are you

Re: Restart generator when it is exhausted.

2009-04-29 Thread Lacrima
On Apr 28, 6:38 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote: Lacrima lacrima.ma...@gmail.com wrote: If it is not possible what are common techniques to use iterator or generator objects that allow restarting when it is needed?

Re: can't use glog to find the path with square bracket

2009-04-29 Thread winterTTr
yes , i works as your advise. Thanks a lot . :-) On Apr 28, 9:52 am, MRAB goo...@mrabarnett.plus.com wrote: winterTTr wrote: I want to list the file with glob . The path( which is a directory ) is contain square bracket as [ab] xxx .  However , i can't find how to do it rightly with

Python SocketServer with IPv6

2009-04-29 Thread godshorse
Hello, I am working on a overlay network implementation with python. I need to use both IPv4 and IPv6 at each node. Python socketserver is being used for this task. can anybody pls suggest me how to input an IPv6 address to the socketserver. Thanks in advance, --

Re: complementary lists?

2009-04-29 Thread Bryan
On Apr 28, 11:16 pm, Arnaud Delobelle arno...@googlemail.com wrote: Kay Schluehr kay.schlu...@gmx.net writes: On 29 Apr., 05:41, Ross ross.j...@gmail.com wrote: If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a subset of x:  y = [1,4,7] , is there a quick way that I could

Which flag to use in configure to Change the Install location?

2009-04-29 Thread Omita
Long story short... I am installing Python 2.6 on OSX. By default the Library is installing here: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the location to be here: /System/Library/Frameworks/Python.framework/ Do I need to use the --libdir

Re: Python 2.6 Install on OSX Server 10.5: lWhich flag to use in configure to Change the Install location?

2009-04-29 Thread uuid
My first intuition would be that - even if it works - this would break future OS X updates, since you're probably not fixing the receipt files. On 2009-04-29 23:43:34 +0200, Omita hays.cl...@gmail.com said: However, as I am using OSX Server I would ideally like the install location to be

Re: Python 2.6 Install on OSX Server 10.5: lWhich flag to use in configure to Change the Install location?

2009-04-29 Thread Benjamin Kaplan
On Wed, Apr 29, 2009 at 5:43 PM, Omita hays.cl...@gmail.com wrote: Long story short... I am installing Python 2.6 on OSX Server. By default the Python.framework is installing in /Library: /Library/Frameworks/Python.framework However, as I am using OSX Server I would ideally like the

Re: import and package confusion

2009-04-29 Thread Dale Amon
On Wed, Apr 29, 2009 at 03:06:13PM -0700, Scott David Daniels wrote: You did not answer the question above, and I think the answer is the root of your misunderstanding. A class and a module are _not_the_same_thing_. sys is not a package, it is a module. Just because you put a class inside a

  1   2   3   >