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 , 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: > > save_enabled = gc.isenable

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 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 topic: http://groups.go

Re: Get item from set

2009-04-29 Thread Peter Otten
Aahz wrote: > In article , > 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 can't see the inversion

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 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 /i python.msi /q

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

2009-04-29 Thread tinnews
Scott David Daniels 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 , 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. :) -- http://mail.python.org/mailman/listinfo/python-list

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

Re: What do you think of ShowMeDo

2009-04-29 Thread Jeremiah Dodds
On Wed, Apr 29, 2009 at 6:48 AM, Banibrata Dutta wrote: > 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 what is demonstrated wa

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
wrote: >On Apr 28, 2:54 pm, forrest yang 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, they're strings. Though I don't think tha

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 l

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() >

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 -- http://mail.python.org/mailman/listi

Re: python segfaulting, MemoryError (PyQt)

2009-04-29 Thread Denis L
"Phil Thompson" wrote in message news:mailman.4719.1240945001.11746.python-l...@python.org... > On Tue, 28 Apr 2009 19:07:30 +0200, "Denis L" wrote: >> "Phil Thompson" wrote in message >> news:mailman.4699.1240932385.11746.python-l...@python.org... >> >>> If there was a bug with lambda slots it

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 (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 > to b

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 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 program an app

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 t

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

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.6

Re: Why bool( object )?

2009-04-29 Thread Aahz
In article <340175e7-b349-4ca2-bf66-fa9113253...@v23g2000pro.googlegroups.com>, Aaron Brady 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 programmer if you c

Re: Get item from set

2009-04-29 Thread Aahz
In article , Peter Otten <__pete...@web.de> wrote: >Aahz wrote: >> In article , >> 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

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

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 i

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 ab

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 http://www.micro

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 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 '@' characte

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" 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. > You cannot update a strin

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 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, 1)[0]]=arr but, the dict

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 profes

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 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 fo

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 , > Peter Otten <__pete...@web.de> wrote: >>Aahz wrote: >>> In article , >>> 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 >>>

Re: Get item from set

2009-04-29 Thread Aahz
In article , Peter Otten <__pete...@web.de> wrote: >Aahz wrote: >> In article , >> Peter Otten <__pete...@web.de> wrote: >>>Aahz wrote: In article , Peter Otten <__pete...@web.de> wrote: > >Here's a trick to find the actual element. I think Raymond Hettinger >posted an impl

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

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 -- http://mail.python.org/mailman/listinfo/python-li

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 recal

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 Daniels

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 sto

Re: Return value usage

2009-04-29 Thread Simon Brunning
2009/4/29 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? AFAIK, no, it's not. > The use case is that I have functions who's side effects and return > values are cached. I would

Re: Return value usage

2009-04-29 Thread Zac Burns
On Wed, Apr 29, 2009 at 10:14 AM, Simon Brunning wrote: > 2009/4/29 Zac Burns : > 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 looked through some recipes here, but eve

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 woul

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 > fo

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 it

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

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, th

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 line.spl

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 module

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 impl

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. >

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(

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 ac

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, 5]

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 the

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 line.

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

Re: CSV performance

2009-04-29 Thread Jorgen Grahn
On Mon, 27 Apr 2009 23:56:47 +0200, dean 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 data st

Re: Third Party Modules

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 10:15:23 -0700, John Nagle 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 modules.

Re: stuck with PyOBEX

2009-04-29 Thread Jorgen Grahn
On Tue, 28 Apr 2009 18:52:38 +0200, Diez B. Roggisch 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 pass it in. >

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 use

Re: dict is really slow for big truck

2009-04-29 Thread pruebauno
On Apr 29, 1:05 pm, 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

Re: Why bool( object )?

2009-04-29 Thread Aaron Brady
On Apr 28, 9:54 pm, Steven D'Aprano 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 singleton Nothing None, and so fort

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 t

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 (t

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 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 compiling all y

Re: Restart generator when it is exhausted.

2009-04-29 Thread Lacrima
On Apr 28, 6:38 pm, "J. Cliff Dyer" wrote: > On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote: > > Lacrima wrote: > > > > If it is not possible what are common techniques to use iterator or > > > generator objects that allow restarting when it is needed? > > > The usual thing if you want to

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 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 glob . > > > with t

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, -- http://mail.python.org/mailman/li

Re: complementary lists?

2009-04-29 Thread Bryan
On Apr 28, 11:16 pm, Arnaud Delobelle wrote: > Kay Schluehr writes: > > On 29 Apr., 05:41, Ross 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,

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" fl

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 said: However, as I am using OSX Server I would ideally like the install location to be here: /System/Library/F

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 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 install > location to

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 insid

[ANN] BPT (Boxed Package Tool)

2009-04-29 Thread Giuseppe Ottaviano
Hi all, I am pleased to announce BPT 0.2a (despite the number, this is the first public version). http://pypi.python.org/pypi/bpt Like virtualenv, BPT allows to create isolate environments, but it is not limited to Python software, as it can be used to install arbitrary Unix software. It

Re: complementary lists?

2009-04-29 Thread Bryan
On Apr 28, 11:16 pm, Arnaud Delobelle wrote: > Kay Schluehr writes: > > On 29 Apr., 05:41, Ross 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,

c array

2009-04-29 Thread luca72
hello i'm using ctypes i have this c function PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); where : nt main(void) { short handle = 0; /* The handle to a TC-08 returned by usb_tc08_open_unit() */ char selection =

Re: dict is really slow for big truck

2009-04-29 Thread Scott David Daniels
prueba...@latinmail.com wrote: It is probably out of habit of using the generalized idiom: line="a,b,c\n" line.strip().split(",") Ah, thank you. I just couldn't figure out where it started. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

ctypes

2009-04-29 Thread luca72
can you explain how to use this function : this is the api documentation : PREF0 short usb_tc08_get_single ( short handle, float * temp, short * overflow_flags, short units); This is the sample made in c: int main(void) { short handle = 0; /* The handle to a TC-08 returned

Re: command prompt history filtered by initial letters

2009-04-29 Thread MRAB
limit wrote: 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

Re: Which flag to use in "configure" to Change the Install location?

2009-04-29 Thread Diez B. Roggisch
Omita schrieb: 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/ Why? Do I need

Re: Third Party Modules

2009-04-29 Thread David Lyon
> On Tue, 28 Apr 2009 10:15:23 -0700, John Nagle 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: What do you think of ShowMeDo

2009-04-29 Thread showm...@googlemail.com
On 29 Apr, 07:27, Steven D'Aprano wrote: > 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 amShowme

  1   2   >