ikaaro 0.61.0 released

2010-03-03 Thread J. David Ibáñez
This is a Content Management System built on Python itools, among other features ikaaro provides: - content and document management (indexsearch, metadata, etc.) - multilingual user interfaces and content - high level modules: wiki, forum, tracker, etc. This is the companion release of

Version 0.3.8 of the Python config module has been released.

2010-03-03 Thread Vinay Sajip
Version 0.3.8 of the Python config module has been released. What Does It Do? The config module allows you to implement a hierarchical configuration scheme with support for mappings and sequences, cross-references between one part of the configuration and another, the ability to

Twisted 10.0.0 released

2010-03-03 Thread Jonathan Lange
On behalf of Twisted Matrix Laboratories, I am honored to announce the release of Twisted 10.0. Highlights include: * Improved documentation, including Twisted Web in 60 seconds * Faster Perspective Broker applications * A new Windows installer that ships without zope.interface * Twisted

Re: case do problem

2010-03-03 Thread Andre Engels
On Tue, Mar 2, 2010 at 6:46 PM, Tracubik affdfsdfds...@b.com wrote: and, generally speaking, the try..except block slow down the execution of the program or not? Try...except tends to be slow when the exception does occur, fast when it does not. Apart from that, if these

Re: cpan for python?

2010-03-03 Thread TomF
On 2010-03-02 19:59:01 -0800, Lie Ryan lie.1...@gmail.com said: On 03/03/2010 09:47 AM, TomF wrote: On 2010-03-02 13:14:50 -0800, R Fritz rfr...@u.washington.edu said: On 2010-02-28 06:31:56 -0800, sstein...@gmail.com said: On Feb 28, 2010, at 9:28 AM, Someone Something wrote: Is there

process mp3 file

2010-03-03 Thread asit
Somebody suggest me a python library for processing mp3 file. Here I don't want to play the file. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: case do problem

2010-03-03 Thread Peter Otten
Tracubik wrote: hi, i've to convert from Pascal this code: program loop; function generic_condition: boolean; begin generic_condition := random 0.7 end; procedure loop; var iterations, count, m: integer; begin iterations := 0; count := 0; m := 0; repeat iterations :=

Re: nonunique string replacements

2010-03-03 Thread Steven D'Aprano
On Tue, 02 Mar 2010 23:06:13 -0800, Ben Racine wrote: All, Say I have a string l ... l = 'PBUSH 201005 K 1. 1. 1. 1. 1. 1.' And I want to replace the first1. with a 500.2 and the second 1. with 5.2 ... What pythonic means would you all

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Tim, Tim Roberts wrote: News123 news...@free.fr wrote: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge

Re: nonunique string replacements

2010-03-03 Thread Peter Otten
Ben Racine wrote: Say I have a string l ... l = 'PBUSH 201005 K 1. 1. 1. 1. 1. 1.' And I want to replace the first1. with a 500.2 and the second 1. with 5.2 ... What pythonic means would you all recommend? With regular expressions:

Re: Image.frombuffer and warning

2010-03-03 Thread Peter Otten
News123 wrote: I am using the PIL function from_buffer in python 2.6.4 I am having the line im2 = Image.frombuffer('L',(wx,wy),buf) I receive the warning: ./pytest.py:63: RuntimeWarning: the frombuffer defaults may change in a future release; for portability, change the call to read:

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread Stefan Behnel
News123, 03.03.2010 01:38: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image -

Re: conditional import into global namespace

2010-03-03 Thread Diez B. Roggisch
Am 02.03.10 21:41, schrieb mk: Jerry Hill wrote: Just import subprocess at the top of your module. If subprocess hasn't been imported yet, it will be imported when your module is loaded. If it's already been imported, your module will use the cached version that's already been imported. In

Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Oren Elrad
Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try: block except: pass The logic here is that there are a ton of

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread News123
Hi Stefan, Stefan Behnel wrote: News123, 03.03.2010 01:38: I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge

Re: Docstrings considered too complicated

2010-03-03 Thread BlueBird
On Feb 24, 9:23 pm, Andreas Waldenburger use...@geekmail.invalid wrote: Hi all, a company that works with my company writes a lot of of their code in Python (lucky jerks). I've seen their code and it basically looks like this: Function that does stuff def doStuff():     while not

Re: Image.frombuffer and warning

2010-03-03 Thread News123
Hi Peter, Peter Otten wrote: News123 wrote: I cannot reproduce the problem: $ cat frombuffer.py import sys import Image wx = 3 wy = 2 buf = a*wx*wy if --fixed in sys.argv: Image.frombuffer(L, (wx, wy), buf, raw, L, 0, 1) else: Image.frombuffer(L, (wx, wy), buf) $ python

exp_internal in pexpect

2010-03-03 Thread Pankaj
how to enable expect log in pexpect ? (similar as exp_internal in expect) -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-03 Thread Stefan Behnel
News123, 03.03.2010 10:37: Stefan Behnel wrote: Take a look at Cython instead, it will allow you to access PIL's image buffer directly, instead of copying the data. It will also simplify and speed up your C wrapper code. I don't know Cython. Having looked at the web site I'm not entirely

PYTHONPATH and eggs

2010-03-03 Thread geoffbache
Hi all, I have a very simple problem that seems to have no simple solution. I have a module which is installed centrally and lives in a Python egg. I have experimented with some minor changes to it and would like to set my PYTHONPATH to pick up my local copy of it, but don't want to have to

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Chris Rebert
On Wed, Mar 3, 2010 at 1:27 AM, Oren Elrad orenel...@gmail.com wrote: Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try:

Re: process mp3 file

2010-03-03 Thread Chris Rebert
On Wed, Mar 3, 2010 at 12:33 AM, asit lipu...@gmail.com wrote: Somebody suggest me a python library for processing mp3 file.  Here I don't want to play the file. Define processing. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Dave Angel
Oren Elrad wrote: Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try: block except: pass The logic here is

Re: process mp3 file

2010-03-03 Thread asit
Define processing. getting the title, song name, etc of the file and updating in a database -- http://mail.python.org/mailman/listinfo/python-list

Re: Method / Functions - What are the differences?

2010-03-03 Thread Bruno Desthuilliers
Eike Welk a écrit : John Posner wrote: I've updated the text at this location: http://cl1p.net/bruno_0301.rst/ I think this is a very useful writeup! It would be perfect with a little bit of introduction that says: 1. - What it is: The rough details of method look-up; 2. - which

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Andre Engels
On Wed, Mar 3, 2010 at 10:27 AM, Oren Elrad orenel...@gmail.com wrote: Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try:

Re: process mp3 file

2010-03-03 Thread Chris Rebert
On Wed, Mar 3, 2010 at 2:43 AM, asit lipu...@gmail.com wrote: Define processing. getting the title, song name, etc of the file and updating in a database You'd want an ID3 tag library then. Here's one: http://eyed3.nicfit.net/ Cheers, Chris -- http://blog.rebertia.com --

easy install failed

2010-03-03 Thread durumd...@gmail.com
Hi! Windows, Py2.6. I read about Pyda and Spider. I used Pyscripter, Geany, ULIPAD, and COntext, and Netbeans with Python; but I want to try these products. But easy_install failed on get them: C:\Python26\Scriptseasy_install.exe pida Searching for pida Reading

Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Oren Elrad
To all that responded, thanks for the prompt response folks, your criticisms are well taken. Coming from Cland, one is inculcated with the notion that if the programmer wants to shoot himself in the foot the language ought not to prevent that (or even should return him a loaded magnum with the

monkey patching with @classmethod

2010-03-03 Thread gentlestone
Hi, is there some well-known problems with class method monkey patching? I've got this error message: unbound method get_pocet_neocislovanych() must be called with Pozemok instance as first argument (got Subjekt instance instead) The method is declared as: @classmethod @monkeypatch(Dokument)

Re: monkey patching with @classmethod

2010-03-03 Thread Bruno Desthuilliers
gentlestone a écrit : Hi, is there some well-known problems with class method monkey patching? I've got this error message: unbound method get_pocet_neocislovanych() must be called with Pozemok instance as first argument (got Subjekt instance instead) The method is declared as: @classmethod

Re: monkey patching with @classmethod

2010-03-03 Thread gentlestone
On 3. Mar., 12:57 h., gentlestone tibor.b...@hotmail.com wrote: Hi, is there some well-known problems with class method monkey patching? I've got this error message: unbound method get_pocet_neocislovanych() must be called with Pozemok instance as first argument (got Subjekt instance

Re: Which mock library do you prefer?

2010-03-03 Thread Albert van der Horst
In article e88f4781-4b1f-4a9d-8c61-3a13c854c...@d27g2000yqn.googlegroups.com, Lacrima lacrima.ma...@gmail.com wrote: On Feb 16, 10:30=A0pm, Ben Finney ben+pyt...@benfinney.id.au wrote: Lacrima lacrima.ma...@gmail.com writes: And I have already refused to write totally isolated tests, because

Working group for Python CPAN-equivalence?

2010-03-03 Thread Olof Bjarnason
Hi everybody! The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). I'm wondering - is there any work being done identifying .. (1) what is so good with CPAN? (2) how can it be brought to

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread Stefan Behnel
Olof Bjarnason, 03.03.2010 13:45: The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). It confuses me that you call this confusing. I'm wondering - is there any work being done

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Tim Chase
Oren Elrad wrote: I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try: block except: pass The general response to except: pass from the Old Ones on the python list (and those

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread Olof Bjarnason
2010/3/3 Stefan Behnel stefan...@behnel.de: Olof Bjarnason, 03.03.2010 13:45: The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). It confuses me that you call this confusing. How

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread Stefan Behnel
Stefan Behnel, 03.03.2010 13:52: Olof Bjarnason, 03.03.2010 13:45: The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). It confuses me that you call this confusing. I'm wondering - is

Re: Which mock library do you prefer?

2010-03-03 Thread Ben Finney
Albert van der Horst alb...@spenarnc.xs4all.nl writes: Unit testing is a concept that goes well with functions without side effects. If you have classes, that doesn't work so well. How so? Unit tests are ideal for testing classes, in my experience; they can be inspected and tested as a

Re: Docstrings considered too complicated

2010-03-03 Thread Lie Ryan
On 03/03/2010 04:48 PM, Steven D'Aprano wrote: Or one can simply use *reason*: what justification is there for putting comments in strings at the top of the function? The only one I can see is if you are writing for an embedded device, you may want to remove doc strings to save memory --

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread Ben Finney
Olof Bjarnason olof.bjarna...@gmail.com writes: Hi everybody! The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). Caused in no small measure by the fact that Perl people mean at least

Re: There should be one-- and preferably only one --obvious way to do it (was Interest check in some delicious syntactic sugar for except:pass)

2010-03-03 Thread Lie Ryan
On 03/03/2010 08:27 PM, Oren Elrad wrote: Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: . block - try: .block

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Benjamin Kaplan
On Wed, Mar 3, 2010 at 6:47 AM, Oren Elrad orenel...@gmail.com wrote: To all that responded, thanks for the prompt response folks, your criticisms are well taken. Coming from Cland, one is inculcated with the notion that if the programmer wants to shoot himself in the foot the language ought

RICHARD MOORE wants to stay in touch on LinkedIn

2010-03-03 Thread RICHARD MOORE
LinkedIn I'd like to add you to my professional network on LinkedIn. - RICHARD MOORE Confirm that you know RICHARD MOORE https://www.linkedin.com/e/isd/1117171902/jlHq1JKw/EML-invg_56/ -- (c) 2010, LinkedIn Corporation--

Re: monkey patching with @classmethod

2010-03-03 Thread gentlestone
On 3. Mar., 13:09 h., Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: gentlestone a écrit : Hi, is there some well-known problems with class method monkey patching? I've got this error message: unbound method get_pocet_neocislovanych() must be called with

RICHARD MOORE wants to stay in touch on LinkedIn

2010-03-03 Thread RICHARD MOORE
LinkedIn I'd like to add you to my professional network on LinkedIn. - RICHARD MOORE Confirm that you know RICHARD MOORE https://www.linkedin.com/e/isd/1117171902/jlHq1JKw/EML-invg_56/ -- (c) 2010, LinkedIn Corporation--

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Daniel Fetchinson
By way of motivation, I wrote that email after copying/pasting the following a few times around a project until I wrote it into def SilentlyDelete() and its cousin SilentlyRmdir() code involving somefile try: os.remove(somefile) except: ...pass # The bloody search

Few early questions on Class

2010-03-03 Thread joy99
Dear Group, I was practising some early example of class if you can kindly let me know where I was going wrong. I am pasting directly from IDLE. There may be slight indentation problem. I am using Python 2.6.4 on Windows XP Service Pack 3. The Code and the output: class Student: def

Re: Docstrings considered too complicated

2010-03-03 Thread MRAB
Gregory Ewing wrote: MRAB wrote: BTW, the first programming I did was in hexadecimal (C4xx was LDI xx). Hey, a SC/MP! That was my first programming language, too. What sort of machine was it in? Mk14 from Science of Cambridge, a kit with hex keypad and 7-segment display, which I had to

save CRL to a file (M2Crypto.X509.CRL object)

2010-03-03 Thread pranav
I do not see an option to save M2Crypto.X509.CRL object to a file. Am I overlooking something? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Few early questions on Class

2010-03-03 Thread John Gabriele
Hi Subhabrata, s/_init_/__init__/ -- http://mail.python.org/mailman/listinfo/python-list

Re: case do problem

2010-03-03 Thread MRAB
Gregory Ewing wrote: Alf P. Steinbach wrote: * Tracubik: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 Uhm, is this syntactically valid Pascal? As I

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Tim Chase
Oren Elrad wrote: code involving somefile try: os.remove(somefile) except: ...pass # The bloody search indexer has got the file and I can't delete it. Nothing to be done. I admit there are times I've done something similar, usually with what I call my int0 and float0

pyao makes the right sound but why?

2010-03-03 Thread '2+
with my soy.py tofu = soy.Bean() x = tofu.pattern(44100 * 3) creates x which is an array('h') and len(x) = 44100 * 6 this x is a stereo groove pattern that lasts 3 sec if samplerate is set to 44100 and since wave.py could save it to a_file.wav i was wondering if dev = ao.AudioDevice('alsa')

Re: Method / Functions - What are the differences?

2010-03-03 Thread John Posner
On 3/3/2010 5:56 AM, Bruno Desthuilliers wrote: Eike Welk a écrit : John Posner wrote: I've updated the text at this location: http://cl1p.net/bruno_0301.rst/ I think this is a very useful writeup! It would be perfect with a little bit of introduction that says: 1. - What it is: The rough

Re: Queue peek?

2010-03-03 Thread Veloz
On Mar 3, 1:14 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: MRAB wrote: I suppose it depends on the complexity of the data structure. A dict's methods are threadsafe, for example, but if you have a data structure where access leads to multiple method calls then collectively they

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Michael Rudolf
Am 03.03.2010 12:47, schrieb Oren Elrad: code involving somefile try: os.remove(somefile) except: ...pass # The bloody search indexer has got the file and I can't delete it. Nothing to be done. You don't know that what you stated in your comment is true. All you know is that

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread John Gabriele
On Mar 3, 7:45 am, Olof Bjarnason olof.bjarna...@gmail.com wrote: Hi everybody! The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). I'm wondering - is there any work being done

Re: Docstrings considered too complicated

2010-03-03 Thread Grant Edwards
On 2010-03-03, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Grant Edwards wrote: Just a mediocre copy of the CP/M filesystem, which was in turn copied from DEC's RSTS or RSX. It was actually an improvement over CP/M's file system. CP/M didn't have hierarchical directories Neither did

Re: cpan for python?

2010-03-03 Thread John Gabriele
On Mar 2, 11:58 pm, John Bokma j...@castleamber.com wrote: Lie Ryan lie.1...@gmail.com writes: On 03/03/2010 09:47 AM, TomF wrote: [..] There is also a program called cpan, distributed with Perl.  It is used for searching, downloading, installing and testing modules from the CPAN

A scopeguard for Python

2010-03-03 Thread Alf P. Steinbach
For C++ Petru Marginean once invented the scope guard technique (elaborated on by Andrei Alexandrescu, they published an article about it in DDJ) where all you need to do to ensure some desired cleanup at the end of a scope, even when the scope is exited via an exception, is to declare a

PAGINE DI UNA ITALIA MERAVIGLIOSA

2010-03-03 Thread ItaliaWeekend
Title: ITALIA WEEKEND Pregiatissima Azienda, Sottoponiamo alla

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread MRAB
Oren Elrad wrote: Howdy all, longtime appreciative user, first time mailer-inner. I'm wondering if there is any support (tepid better than none) for the following syntactic sugar: silence: block - try: block except: pass The logic here is

Re: Is this secure?

2010-03-03 Thread Michael Rudolf
Am 03.03.2010 04:51, schrieb Lie Ryan: import itertools def gen(): valid_chars = 'abcdefghijklmnopqrstuvwxyz' for char in itertools.repeat(valid_chars): yield char gen = gen() def gen_rand_string(length): chars = (next(gen) for i in range(length)) return

Re: Docstrings considered too complicated

2010-03-03 Thread Grant Edwards
On 2010-03-03, Grant Edwards inva...@invalid.invalid wrote: On 2010-03-03, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Grant Edwards wrote: Just a mediocre copy of the CP/M filesystem, which was in turn copied from DEC's RSTS or RSX. It was actually an improvement over CP/M's file

Re: A scopeguard for Python

2010-03-03 Thread Mike Kent
What's the compelling use case for this vs. a simple try/finally? original_dir = os.getcwd() try: os.chdir(somewhere) # Do other stuff finally: os.chdir(original_dir) # Do other cleanup -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue peek?

2010-03-03 Thread Steve Holden
Veloz wrote: On Mar 3, 1:14 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: MRAB wrote: I suppose it depends on the complexity of the data structure. A dict's methods are threadsafe, for example, but if you have a data structure where access leads to multiple method calls then

Smalltalk-like categories for methods ?

2010-03-03 Thread efruttero
Hello, Is there an IDE that supports methods categories/classification, either through some comment convention, annotation, or any other mean ? Thanks in advance, Eric Fruttero -- http://mail.python.org/mailman/listinfo/python-list

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Mel
Tim Chase wrote: I admit there are times I've done something similar, usually with what I call my int0 and float0 utility functions which roughly translate to give me a stinkin' int/float and if something goes wrong, give me 0, but the return result better darn well be an int/float!

Re: Draft PEP on RSON configuration file format

2010-03-03 Thread mk
Paul Rubin wrote: Patrick Maupin pmau...@gmail.com writes: One of my complaints. If you had read the document you would have seen others. I actually have several complaints about YAML, but I tried to write a cogent summary. Yaml sucks, but seems to have gotten some traction regardless.

Re: Method / Functions - What are the differences?

2010-03-03 Thread Bruno Desthuilliers
John Posner a écrit : On 3/3/2010 5:56 AM, Bruno Desthuilliers wrote: Eike Welk a écrit : John Posner wrote: I've updated the text at this location: http://cl1p.net/bruno_0301.rst/ I think this is a very useful writeup! It would be perfect with a little bit of introduction that says: 1. -

Re: A scopeguard for Python

2010-03-03 Thread Alf P. Steinbach
* Mike Kent: What's the compelling use case for this vs. a simple try/finally? if you thought about it you would mean a simple try/else. finally is always executed. which is incorrect for cleanup by the way, that's one advantage: a with Cleanup is difficult to get wrong, while a try is

Re: Queue peek?

2010-03-03 Thread mk
Veloz wrote: Unless I missed where you guys were going, I think we got off the main point. The main question at hand was this: what's the best way (heck, any way) to implement a sort of peek whereby a number of processes can write results to some common object and some other process can peek

Re: Docstrings considered too complicated

2010-03-03 Thread D'Arcy J.M. Cain
On Wed, 03 Mar 2010 14:42:00 + MRAB pyt...@mrabarnett.plus.com wrote: Gregory Ewing wrote: Mk14 from Science of Cambridge, a kit with hex keypad and 7-segment display, which I had to solder together, and also make my own power supply. I had the extra RAM and the I/O chip, so that's 256B

Re: Docstrings considered too complicated

2010-03-03 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 03 Mar 2010 15:30:36 +, Grant Edwards wrote: I definitely remember that old MS-DOS programs would treat Ctrl-Z as an EOF marker when it was read from a text file and would terminate a text file with a Ctrl-Z when writing one. I believe that Windows (at least up

Sort Big File Help

2010-03-03 Thread John Filben
I am new to Python but have used many other (mostly dead) languages in the past.  I want to be able to process *.txt and *.csv files.  I can now read that and then change them as needed – mostly just take a column and do some if-then to create a new variable.  My problem is sorting these files:

Re: Re Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Steven D'Aprano
On Wed, 03 Mar 2010 06:47:28 -0500, Oren Elrad wrote: With that said, let me at least offer a token defense of my position. By way of motivation, I wrote that email after copying/pasting the following a few times around a project until I wrote it into def SilentlyDelete() and its cousin

Re: Queue peek?

2010-03-03 Thread Floris Bruynooghe
On Mar 2, 6:18 pm, Raymond Hettinger pyt...@rcn.com wrote: On Mar 2, 8:29 am, Veloz michaelve...@gmail.com wrote: Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the docs

Re: Docstrings considered too complicated

2010-03-03 Thread David Robinow
On Wed, Mar 3, 2010 at 10:30 AM, Grant Edwards inva...@invalid.invalid wrote: On 2010-03-03, Grant Edwards inva...@invalid.invalid wrote: I definitely remember that old MS-DOS programs would treat Ctrl-Z as an EOF marker when it was read from a text file and would terminate a text file with a

Re: taking python enterprise level?...

2010-03-03 Thread mk
D'Arcy J.M. Cain wrote: I keep seeing this statement but nothing to back it up. I have created many apps that run on Python with a PostgreSQL database with a fully normalized schema and I can assure you that database joins were never my problem unless I made a badly constructed query or left

Re: Method / Functions - What are the differences?

2010-03-03 Thread John Posner
On 3/3/2010 9:58 AM, John Posner wrote: Film at 11, John Done -- see http://wiki.python.org/moin/FromFunctionToMethod -John -- http://mail.python.org/mailman/listinfo/python-list

SOAP 1.2 Python client ?

2010-03-03 Thread BlueBird
Hi, I am looking for a SOAP 1.2 python client. To my surprise, it seems that this does not exist. Does anybody know about this ? The following clients seem to be both unmaintained and still supporting only SOAP 1.1 : - SUDS - zsi - SOAPy cheers, Philippe --

Re: Draft PEP on RSON configuration file format

2010-03-03 Thread Steve Howell
On Mar 3, 7:46 am, mk mrk...@gmail.com wrote: Paul Rubin wrote: Patrick Maupin pmau...@gmail.com writes: One of my complaints.  If you had read the document you would have seen others.  I actually have several complaints about YAML, but I tried to write a cogent summary. Yaml sucks, but

When to lock data items returned by multiprocessing.Manager?

2010-03-03 Thread Veloz
So I'm using a multiprocessing.Manager instance in my main app and asking it to create a dictionary, which I am providing to instances of the application that I'm forking off with Process. The Processes and main app will be reading/writing to the dictionary. It's not clear to me what I have to

Eric4 vs Python3.1

2010-03-03 Thread Zhu Sha Zang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Someone using Eric4 to program with Python3/3.1? What can i do, because he insist to use only Python2.6.4. Att -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

Re: Writing an assembler in Python

2010-03-03 Thread member thudfoo
On Tue, Mar 2, 2010 at 10:52 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: In article xns9d28186af890cfdnbgui7uhu5h8hrn...@127.0.0.1, Giorgos Tzampanakis  g...@hw.ac.uk wrote: I'm implementing a CPU that will run on an FPGA. I want to have a (dead) simple assembler that will generate

Re: Docstrings considered too complicated

2010-03-03 Thread D'Arcy J.M. Cain
On Wed, 3 Mar 2010 15:05:54 + (UTC) Grant Edwards inva...@invalid.invalid wrote: It was actually an improvement over CP/M's file system. CP/M didn't have hierarchical directories Neither did the original MS-DOS filesystem. I think that it always had a hierarchical file system although

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread John Nagle
Ben Finney wrote: Olof Bjarnason olof.bjarna...@gmail.com writes: Hi everybody! The Where is CPAN for Python? question keeps popping up, with answers ranging from There is no CPAN for Python and We already have CPAN for Python (confusing). Caused in no small measure by the fact that Perl

Re: A scopeguard for Python

2010-03-03 Thread Robert Kern
On 2010-03-03 09:39 AM, Mike Kent wrote: What's the compelling use case for this vs. a simple try/finally? original_dir = os.getcwd() try: os.chdir(somewhere) # Do other stuff finally: os.chdir(original_dir) # Do other cleanup A custom-written

Re: Method / Functions - What are the differences?

2010-03-03 Thread John Posner
On 3/3/2010 10:48 AM, Bruno Desthuilliers wrote: I spotted this: http://www.python.org/doc/faq/programming/#what-is-a-method http://www.python.org/doc/faq/general/#why-must-self-be-used-explicitly-in-method-definitions-and-calls Our text is probably a bit too long for a direct inclusion in

Re: Method / Functions - What are the differences?

2010-03-03 Thread Bruno Desthuilliers
John Posner a écrit : On 3/3/2010 9:58 AM, John Posner wrote: Film at 11, John Done -- see http://wiki.python.org/moin/FromFunctionToMethod Done and well done !-) Thanks again for the good job John. PS : Do you think it could be possible to add link to this page from the relevant FAQ

Re: A scopeguard for Python

2010-03-03 Thread Robert Kern
On 2010-03-03 09:56 AM, Alf P. Steinbach wrote: * Mike Kent: What's the compelling use case for this vs. a simple try/finally? if you thought about it you would mean a simple try/else. finally is always executed. which is incorrect for cleanup Eh? Failed execution doesn't require cleanup?

using subprocess.Popen env parameter

2010-03-03 Thread enda man
Hi, I want to use the env parameter to subprocess.Popen to pass in a path to a location the process needs to run, I do have a env variable already called MS_VC_PATH and I want to add to it, not set up more in the PATH variable. / ms_vc_path=os.environ['MS_VC_PATH'] cl_path = ms_vc_path +

Installing Scrapy on Mac OS X 10.6

2010-03-03 Thread Sky Larking
Has anyone successfully installed Scrapy ( http://scrapy.org ) on a Mac OS X machine running 10.6.x? The Documentaion says Mac OS X ships an libxml2 version too old to be used by Scrapy...But doesn't say which version of OS X.. I am wondering if the version of libxml2 is also not compatible..

Re: A scopeguard for Python

2010-03-03 Thread Alf P. Steinbach
* Robert Kern: On 2010-03-03 09:39 AM, Mike Kent wrote: What's the compelling use case for this vs. a simple try/finally? original_dir = os.getcwd() try: os.chdir(somewhere) # Do other stuff finally: os.chdir(original_dir) # Do other cleanup A

Re: Docstrings considered too complicated

2010-03-03 Thread Grant Edwards
On 2010-03-03, D'Arcy J.M. Cain da...@druid.net wrote: On Wed, 3 Mar 2010 15:05:54 + (UTC) Grant Edwards inva...@invalid.invalid wrote: It was actually an improvement over CP/M's file system. CP/M didn't have hierarchical directories Neither did the original MS-DOS filesystem. I

Re: A scopeguard for Python

2010-03-03 Thread Alf P. Steinbach
* Robert Kern: On 2010-03-03 09:56 AM, Alf P. Steinbach wrote: * Mike Kent: What's the compelling use case for this vs. a simple try/finally? if you thought about it you would mean a simple try/else. finally is always executed. which is incorrect for cleanup Eh? Failed execution doesn't

NoSQL Movement?

2010-03-03 Thread Xah Lee
recently i wrote a blog article on The NoSQL Movement at http://xahlee.org/comp/nosql.html i'd like to post it somewhere public to solicit opinions, but in the 20 min or so, i couldn't find a proper newsgroup, nor private list that my somewhat anti-NoSQL Movement article is fitting. So, i

Re: Multiprocessing problem

2010-03-03 Thread larudwer
Hello Matt I think the problem is here: for n in xrange(10): outqueue.put(str(n))-- fill the queue with 10 elements try: r = inqueue.get_nowait() -- queue is still empty because processes need some time to start

kredit haus , eigenheimzulage einkommensgrenzen , fi nanzamt eigenheimzulage , kredit für haus kauf , kredit auf haus , immobilienkredit ohne , finanzierung eines hauses ,

2010-03-03 Thread luaisn haus
kredit haus , eigenheimzulage einkommensgrenzen , finanzamt eigenheimzulage , kredit für haus kauf , kredit auf haus , immobilienkredit ohne , finanzierung eines hauses , + + +++ GUENSTIGE KREDITE ONLINE +++ KREDITE IM INTERNET OHNE SCHUFA IMMOBILIEN +++ + http://WWW.IMMOBILIEN-KREDIT-ONLINE.NL

  1   2   3   >