Python-URL! - weekly Python news and links (Dec 15)

2009-12-16 Thread Gabriel Genellina
QOTW: Plus, it's not something that's never foolproof. - Carl Banks, daring negater http://groups.google.com/group/comp.lang.python/msg/e8f3adbf2cc31514 Several graph libraries are available; which one is the best? maybe they should be merged?

CodeInvestigator 0.20.0

2009-12-16 Thread hans moleman
CodeInvestigator 0.20.0 was released on December 16. Changes: UI changes. You need Python 2.6 and Firefox for CodeInvestigator. CodeInvestigator is a tracing tool for Python programs. Running a program through CodeInvestigator creates a recording. Program flow, function calls, variable values

[ANN] OpenOpt 0.27 (optimization), FuncDesigner 0.17 (auto differentiation)

2009-12-16 Thread dmitrey
Hi all, I'm glad to inform you about release of OpenOpt 0.27 (numerical optimization framework), FuncDesigner 0.17 (CAS with automatic differentiation, convenient modelling of linear/nonlinear functions, can use convenient modelling for some OpenOpt optimization problems and systems of

Python Concurrency Workshop, January 14-15, 2010

2009-12-16 Thread David Beazley
Python Concurrency Workshop, 2nd Edition with David Beazley, author Python Essential Reference January 14-15, 2010 Chicago, Illinois http://www.dabeaz.com/chicago Last June, you might have caught my

Re: Where is PyMethod_GET_CLASS in Python 3?

2009-12-16 Thread Infinity77
Hi, On Dec 15, 9:22 pm, Terry Reedy wrote: On 12/15/2009 11:08 AM, Infinity77 wrote: Hi All,      When building C extensions In Python 2.X, there was a magical PyMethod_GET_CLASS implemented like this: #define PyMethod_GET_CLASS(meth) \    (((PyMethodObject *)meth) -  im_class)

Re: AttributeError: logging module bug ?

2009-12-16 Thread Peter Otten
Peter wrote: What's the problem ? Please provide the config file logging.cfg to ease debugging. Peter Here it is, thanks for having a look Peter Unfortunately I still can't reproduce your problem. With a minimal file ./of/logger.py from logging import Formatter class

Storing a Value in a Cookie

2009-12-16 Thread Victor Subervi
Hi; From what I've studied and gotten working about cookies, it seems one can store only a certain few pieces of information--expiration, path, comment, domain, max-age, version and last visit--but how is it useful if one can't also store, say, the name of a temporary MySQL table where pertinent

[ANN] OpenOpt 0.27 (optimization), FuncDesigner 0.17 (auto differentiation)

2009-12-16 Thread dmitrey
Hi all, I'm glad to inform you about release of OpenOpt 0.27 (numerical optimization framework), FuncDesigner 0.17 (CAS with automatic differentiation, convenient modelling of linear/nonlinear functions, can use convenient modelling for some OpenOpt optimization problems and systems of

Re: Storing a Value in a Cookie

2009-12-16 Thread Chris Rebert
On Wed, Dec 16, 2009 at 1:13 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; From what I've studied and gotten working about cookies, it seems one can store only a certain few pieces of information--expiration, path, comment, domain, max-age, version and last visit--but how is it useful

Spot Metals Prices (slightly OT)

2009-12-16 Thread Victor Subervi
Hi; I need to update a client's site with spot metals prices. I could build a scraper to grab them off someone else' site (they only need to be accurate within 24 hours), but is there a better *free* source? TIA, Victor -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping paper, anyone ?

2009-12-16 Thread Peter Otten
simon wrote: Nice :) --- stars.py2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@ def __init__(self): self.calls = [] -__getattr__ = ScribeCall +def __getattr__(self, name): +return

Re: strptime not strict enough

2009-12-16 Thread Lie Ryan
On 12/15/2009 10:30 AM, Tobias Weber wrote: Hi, despite the directives for leading zero stime.strptime('09121', '%y%m%d') returns the first of December. Shouldn't it raise ValueError? Where do I get strict date parsing? A bit hackish perhaps, but maybe you can check for the date's length:

Re: Storing a Value in a Cookie

2009-12-16 Thread Victor Subervi
On Wed, Dec 16, 2009 at 4:42 AM, Chris Rebert c...@rebertia.com wrote: On Wed, Dec 16, 2009 at 1:13 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; From what I've studied and gotten working about cookies, it seems one can store only a certain few pieces of information--expiration,

Re: Calling Cookie Values

2009-12-16 Thread Victor Subervi
On Tue, Dec 15, 2009 at 4:01 PM, Grant Edwards inva...@invalid.invalidwrote: On Tue, Dec 15, 2009 at 2:36 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: You've just created a cookie, but are trying to get a value without having set it first!

Re: Dangerous behavior of list(generator)

2009-12-16 Thread Michele Simionato
On Dec 14, 11:05 pm, Carl Banks pavlovevide...@gmail.com wrote: But to answer your question, I think simple is better than complex rules the day.  Right now StopIteration stops an iteration, simple as that.  Any fix would add complexity. +1 --

Dec 20 Global Python All Free SW HW Culture meeting - BerkeleyTIP

2009-12-16 Thread john_re
A great December Solstice to you yours. :) JOIN the Global All Free SW, HW, Culture meeting via VOIP Dec 20 Sunday, 12N-3PM (Pacific = UTC-8) = 3P-6P Eastern = 8P-11P UTC [Jan 2009 meetings: 2nd, 17th - mark your calendar] http://sites.google.com/site/berkeleytip/schedule == WATCH some

Re: iterators and views of lists

2009-12-16 Thread Bearophile
Brendan Miller: Currently people slice and dice with well... slices, but those are copying, so if you want to operate over part of a range you make a copy, perform the operation, then copy the results back in. I was thinking you'd want something like random access iterators in c++, or

Re: iterators and views of lists

2009-12-16 Thread Steven D'Aprano
On Tue, 15 Dec 2009 23:48:04 -0800, Brendan Miller wrote: On Tue, Dec 15, 2009 at 9:09 PM, Terry Reedy tjre...@udel.edu wrote: On 12/15/2009 10:39 PM, Brendan Miller wrote: I'm wondering if anyone has done work towards creating more powerful iterators for python, or creating some more

Re: iterators and views of lists

2009-12-16 Thread Paul Rudin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: I'm sympathetic to your request for list views. I've often wanted some way to cleanly and neatly do this: for item in seq[1:]: process(item) without making an unnecessary copy of almost all of seq. I don't know how it's

platform module problem when frozen?

2009-12-16 Thread Gabriel Rossetti
Hello everyone, I am having problems with the platform module when being run from a frozen program (py2exe). It imports it fine, but it gives me the following error : 'module' object does not contain attribute 'platform' when I do this : platform.platfom() Does platform have a problem with

Re: ftplib retrlines timeout

2009-12-16 Thread Brendan
On Dec 15, 6:17 pm, Jennifer owenzhang.chic...@gmail.com wrote: I am writing a program that has a requirement for  a timeout of retrlines after the connection established. I just wonder if timeout of ftplib.FTP('.xxx.com',username,password,timeout) will work for retrlines method after the

Re: pyZui - anyone know about this?

2009-12-16 Thread Daniel Fetchinson
PyZUI 0.1 has been released: http://da.vidr.cc/projects/pyzui/ Cool, thanks very much! I'm using python 2.6 these days and noticed that you use the sha module which makes py2.6 spit out a deprecation warning: /home/fetchinson/pyzui/pyzui/tilestore.py:22: DeprecationWarning: the sha module is

Re: iterators and views of lists

2009-12-16 Thread Anh Hai Trinh
On Dec 16, 10:39 am, Brendan Miller catph...@catphive.net wrote: I was trying to reimplement some of the c++ library of generic algorithms in c++ in python, but I was finding that this is problematic to do this in a generic way because there isn't any equivalent of c++'s forward iterators,

py3.x urllib.request - HTTPCookieProcessor and header adding

2009-12-16 Thread gervaz
Hi all, I need to fetch some html pages and it is required to have cookies enabled. So, I'm using opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor ()) urllib.request.install_opener(opener) as a global instance. Is there a way to always use a default header like:

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Victor Subervi
On Tue, Dec 15, 2009 at 6:57 PM, r0g aioe@technicalbloke.com wrote: Gabriel Genellina wrote: En Tue, 15 Dec 2009 12:30:23 -0300, Victor Subervi victorsube...@gmail.com escribió: I've googled, found where cookies are supposed to be, the folders and files don't exist. I've opened

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Victor Subervi
On Tue, Dec 15, 2009 at 6:29 PM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Tue, 15 Dec 2009 13:03:07 -0300, Gabriel Genellina wrote: En Tue, 15 Dec 2009 12:30:23 -0300, Victor Subervi victorsube...@gmail.com escribió: I've googled, found where cookies are supposed

Re: pyZui - anyone know about this?

2009-12-16 Thread r0g
David Roberts wrote: PyZUI 0.1 has been released: http://da.vidr.cc/projects/pyzui/ Cool, thanks :) Roger. -- http://mail.python.org/mailman/listinfo/python-list

Re: iterators and views of lists

2009-12-16 Thread Peter Otten
Paul Rudin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: I'm sympathetic to your request for list views. I've often wanted some way to cleanly and neatly do this: for item in seq[1:]: process(item) without making an unnecessary copy of almost all of seq.

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
Peter Otten wrote: simon wrote: Nice :) --- stars.py2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@ def __init__(self): self.calls = [] -__getattr__ = ScribeCall +def __getattr__(self, name):

Raw string substitution problem

2009-12-16 Thread Ed Keith
I am having a problem when substituting a raw string. When I do the following: re.sub('abc', r'a\nb\nc', '123abcdefg') I get 123a b cdefg what I want is r'123a\nb\ncdefg' How do I get what I want? Thanks, -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com --

Re: iterators and views of lists

2009-12-16 Thread Carl Banks
On Dec 15, 11:48 pm, Brendan Miller catph...@catphive.net wrote: I was thinking you'd want something like random access iterators in c++, or pointers in c, to write typical in place algorithmic code. To me, something like non-copying slices (maybe you'd call it a list view?) would seem

Re: iterators and views of lists

2009-12-16 Thread Daniel Stutzbach
On Wed, Dec 16, 2009 at 7:33 AM, Peter Otten __pete...@web.de wrote: islice() could be changed to special-case lists and tuples, but that feels a bit unclean. How about special-casing objects that implement collections.Sequence? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises,

Re: iterators and views of lists

2009-12-16 Thread Daniel Stutzbach
On Wed, Dec 16, 2009 at 5:39 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: for item in seq[1:]: process(item) without making an unnecessary copy of almost all of seq. I use the following idiom: for i in range(1, len(seq)): process(seq[i]) Alternately, if I'm using

Re: Problems with gettext and msgfmt

2009-12-16 Thread JKPeck
On Dec 15, 9:12 pm, JKPeck jkp...@gmail.com wrote: I'm using Python 2.6 on Windows and having trouble with the charset in gettext.  It seems to be so broken that I must be missing something. When I run msgfmt.py, as far as I can see it writes no charset information into the mo file.  The

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: Simon Forman wrote: [...] As far as the OP rant goes, my $0.02: bad programmers will write bad code in any language, with any tool or system or environment they're given.

Re: Raw string substitution problem

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 11:09:32 -0300, Ed Keith e_...@yahoo.com escribió: I am having a problem when substituting a raw string. When I do the following: re.sub('abc', r'a\nb\nc', '123abcdefg') I get 123a b cdefg what I want is r'123a\nb\ncdefg' From

Re: Raw string substitution problem

2009-12-16 Thread Chris Hulan
On Dec 16, 9:09 am, Ed Keith e_...@yahoo.com wrote: I am having a problem when substituting a raw string. When I do the following: re.sub('abc', r'a\nb\nc', '123abcdefg') I get 123a b cdefg what I want is r'123a\nb\ncdefg' How do I get what I want? Thanks,     -EdK Ed

Re: power of explicit self?

2009-12-16 Thread Gabriel Genellina
Fire Crow m...@firecrow.com: Nowhere, I'd say. An *implicit* self would have to be implemented somewhere in the compiler -- but an explicit self doesn't. It's homogeneous, always name-dot-attribute; the name 'self' is not special at all. This is I find very interesting, If I understand

Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 16, 9:00 pm, Peter Otten __pete...@web.de wrote: simon wrote: Nice :) --- stars.py    2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@      def __init__(self):          self.calls = [] -    __getattr__ = ScribeCall

Re: Wrapping paper, anyone ?

2009-12-16 Thread simon
On Dec 17, 12:36 am, r0g aioe@technicalbloke.com wrote: Peter Otten wrote: simon wrote: Nice :) --- stars.py    2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py      2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@      def __init__(self):          self.calls = []

Re: power of explicit self?

2009-12-16 Thread Grant Edwards
On 2009-12-16, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: Fire Crow m...@firecrow.com: Nowhere, I'd say. An *implicit* self would have to be implemented somewhere in the compiler -- but an explicit self doesn't. It's homogeneous, always name-dot-attribute; the name 'self' is not

Re: platform module problem when frozen?

2009-12-16 Thread Dave Angel
Gabriel Rossetti wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello everyone, I am having problems with the platform module when being run from a frozen program (py2exe). It imports it fine, but it gives me the following error : 'module' object does not contain attribute

basic grammer error..

2009-12-16 Thread codefly
class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong?? --

Re: Wrapping paper, anyone ?

2009-12-16 Thread Peter Otten
simon wrote: On Dec 16, 9:00 pm, Peter Otten __pete...@web.de wrote: simon wrote: Nice :) --- stars.py2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@ def __init__(self): self.calls = [] -__getattr__ = ScribeCall

Re: basic grammer error..

2009-12-16 Thread Diez B. Roggisch
codefly wrote: class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread r0g
J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: snip Hear, hear! That's all very well, but some languages and techniques encourage the programmer to write bad code. That's just BS. Bad code

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
simon wrote: On Dec 17, 12:36 am, r0g aioe@technicalbloke.com wrote: Peter Otten wrote: simon wrote: Nice :) --- stars.py2009-12-16 10:52:49.553505036 +0100 +++ stars_fixed.py 2009-12-16 10:53:32.545786454 +0100 @@ -48,7 +48,9 @@ def __init__(self): self.calls =

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Dave Angel
Victor Subervi wrote: On Tue, Dec 15, 2009 at 6:57 PM, r0g aioe@technicalbloke.com wrote: snip Cookies in FF for Windows are stored in an sqlite database in here... ~\Application Data\Mozilla\Firefox\Profiles\%XYZ%\firefox_profile\ Man, I searched C drive (the only drive) on

Re: basic grammer error..

2009-12-16 Thread codefly
On 12월17일, 오전12시23분, Diez B. Roggisch de...@nospam.web.de wrote: codefly wrote: class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i hours: print 'i wait %s hours' %(i) i = i+1 if i ==

Re: power of explicit self?

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 11:56:17 -0300, Grant Edwards inva...@invalid.invalid escribió: On 2009-12-16, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: Fire Crow m...@firecrow.com: Nowhere, I'd say. An *implicit* self would have to be implemented somewhere in the compiler -- but an explicit

i re-write it

2009-12-16 Thread codefly
error message is here.. when i type import code2 Traceback (most recent call last): File stdin, line 1, in module File code2.py, line 11 ~ ^ SyntaxError: invalid syntax and source code is here class codefly: def WaitFreecatz(self, hours): hours =

Re: Subclassing RegexObject

2009-12-16 Thread Peter Otten
Tobias Weber wrote: how do I subclass or at least add a method to something returned by re.compile()? Let's see: import re r = re.compile(yadda) class S(type(r)): pass ... Traceback (most recent call last): File stdin, line 1, in module TypeError: Error when calling the metaclass bases

Re: i re-write it

2009-12-16 Thread Diez B. Roggisch
codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last): File stdin, line 1, in module File code2.py, line 11 ~ ^ SyntaxError: invalid syntax and source code is here No, it isn't. The above error says line

Re: i re-write it

2009-12-16 Thread codefly
On Dec 17, 12:43 am, Diez B. Roggisch de...@nospam.web.de wrote: codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last):   File stdin, line 1, in module   File code2.py, line 11     ~                        ^ SyntaxError: invalid syntax

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread David Robinow
On Wed, Dec 16, 2009 at 10:33 AM, Dave Angel da...@ieee.org wrote: You can also find the appdata directory by looking at the environment variable USERPROFILE, switching to that directory, and descending directly into application data by using the tab key. ... Lots of good advice. I'd just

Re: (OT) Where Are Cookies Stored?

2009-12-16 Thread Victor Subervi
On Wed, Dec 16, 2009 at 11:33 AM, Dave Angel da...@ieee.org wrote: Victor Subervi wrote: On Tue, Dec 15, 2009 at 6:57 PM, r0g aioe@technicalbloke.com wrote: snip Cookies in FF for Windows are stored in an sqlite database in here... ~\Application

Re: i re-write it

2009-12-16 Thread codefly
On Dec 17, 12:43 am, Diez B. Roggisch de...@nospam.web.de wrote: codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last):   File stdin, line 1, in module   File code2.py, line 11     ~                        ^ SyntaxError: invalid syntax

another problem..

2009-12-16 Thread codefly
now.. another problem.. when i type me = code2() the error is here.. Traceback (most recent call last): File stdin, line 1, in module TypeError: 'module' object is not callable -- http://mail.python.org/mailman/listinfo/python-list

I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread eric_dex...@msn.com
#this should be a cross platform example of os.startfile ( startfile ) #for windows and linux. this is the first version and #linux, mac, other os's commands for exceptions to the #rule would be appreciated. at some point this will be #in the dex tracker project. import os import subprocess

Python Imaging Library status

2009-12-16 Thread paulo.jpi...@gmail.com
Hi guys, is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. Thanks in Advance, Paulo -- http://mail.python.org/mailman/listinfo/python-list

Re: basic grammer error..

2009-12-16 Thread Dave Angel
codefly wrote: class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong??

Re: i re-write it

2009-12-16 Thread Diez B. Roggisch
codefly wrote: On Dec 17, 12:43 am, Diez B. Roggisch de...@nospam.web.de wrote: codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last): File stdin, line 1, in module File code2.py, line 11 ~ ^ SyntaxError: invalid syntax and source

Re: Wrapping paper, anyone ?

2009-12-16 Thread bartc
simon pianomaes...@gmail.com wrote in message news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... #!/usr/bin/env python from math import * from random import * import cairo from cairo import Context What's cairo? --

Re: basic grammer error..

2009-12-16 Thread Bruno Desthuilliers
codefly a écrit : class codefly: def WaitFreecatz(self, hours): hours = self.hours i = 1 while i hours: print 'i wait %s hours' %(i) i = i+1 if i == hours: print '\nhe never comes' run error// what's wrong??

Re: I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread Paul Boddie
On 16 Des, 17:03, eric_dex...@msn.com eric_dex...@msn.com wrote: #this should be a cross platform example of os.startfile ( startfile ) #for windows and linux.  this is the first version and #linux, mac, other os's commands for exceptions to the #rule would be appreciated.  at some point this

Re: i re-write it

2009-12-16 Thread Bruno Desthuilliers
codefly a écrit : now.. another problem.. when i type me = code2() where ? and what is 'code2' in this context ? Sorry, my crystal ball is out for repair... the error is here.. Traceback (most recent call last): File stdin, line 1, in module TypeError: 'module' object is not callable

Re: another problem..

2009-12-16 Thread Dave Angel
codefly wrote: now.. another problem.. when i type me = code2() the error is here.. Traceback (most recent call last): File stdin, line 1, in module TypeError: 'module' object is not callable By creating a new thread for each new question, you're forcing yourself to repeat the code and

Re: i re-write it

2009-12-16 Thread Dave Angel
codefly wrote: On Dec 17, 12:43 am, Diez B. Roggisch de...@nospam.web.de wrote: codefly wrote: error message is here.. when i type import code2 Traceback (most recent call last): File stdin, line 1, in module File code2.py, line 11 ~ ^

Re: Wrapping paper, anyone ?

2009-12-16 Thread r0g
bartc wrote: simon pianomaes...@gmail.com wrote in message news:a50b1c21-287b-498d-a8c3-51a3a2f94...@k9g2000vbl.googlegroups.com... #!/usr/bin/env python from math import * from random import * import cairo from cairo import Context What's cairo? A vector graphics library.

regex help

2009-12-16 Thread Gabriel Rossetti
Hello everyone, I'm going nuts with some regex, could someone please show me what I'm doing wrong? I have an XMPP msg : message xmlns='jabber:client' to='n...@host.com' mynode xmlns='myprotocol:core' version='1.0' type='mytype' parameters param1123/param1

Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: From: Gabriel Genellina gagsl-...@yahoo.com.ar Subject: Re: Raw string substitution problem To: python-list@python.org Date: Wednesday, December 16, 2009, 9:35 AM En Wed, 16 Dec 2009 11:09:32 -0300, Ed Keith

Re: regex help

2009-12-16 Thread r0g
Gabriel Rossetti wrote: Hello everyone, I'm going nuts with some regex, could someone please show me what I'm doing wrong? I have an XMPP msg : snip Does someone know what is wrong with my expression? Thank you, Gabriel Gabriel, trying to debug a long regex in situ can be a

Re: Python tricks with applescript in OS-X

2009-12-16 Thread Juanre
Thanks for the pointers to appscript, and for the comments on the page. I have changed the examples at http://juanreyero.com/article/python/os-x-python.html to reflect them. Cheers, Juan -- http://juanreyero.com -- http://mail.python.org/mailman/listinfo/python-list

Re: another problem..

2009-12-16 Thread Grant Edwards
On 2009-12-16, codefly coron...@gmail.com wrote: now.. another problem.. Sorry to be so blunt, but your main problem is that you don't know how to ask questions. Fix that, and everything else will become much easier: 1) Read this: http://catb.org/~esr/faqs/smart-questions.html 2) Read it

Re: regex help

2009-12-16 Thread Intchanter / Daniel Fackrell
On Dec 16, 10:22 am, r0g aioe@technicalbloke.com wrote: Gabriel Rossetti wrote: Hello everyone, I'm going nuts with some regex, could someone please show me what I'm doing wrong? I have an XMPP msg : snip Does someone know what is wrong with my expression? Thank you, Gabriel

Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread pdlemper
I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console I/O. Called Apple tech support. The technician had never heard

Re: iterators and views of lists

2009-12-16 Thread Francesco Bochicchio
On Dec 16, 1:58 pm, Anh Hai Trinh anh.hai.tr...@gmail.com wrote: You might be interested in this library http://pypi.python.org/pypi/ stream. You can easily create arbitrary slice, for example   i = mylist takei(primes()) will return an iterator over the items of mylist with a prime

Re: Raw string substitution problem

2009-12-16 Thread Peter Otten
Ed Keith wrote: --- On Wed, 12/16/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: From: Gabriel Genellina gagsl-...@yahoo.com.ar Subject: Re: Raw string substitution problem To: python-list@python.org Date: Wednesday, December 16, 2009, 9:35 AM En Wed, 16 Dec 2009 11:09:32 -0300, Ed

python and command shell on Windows

2009-12-16 Thread josu
Hi I am trying to execute a windows command based on a shell by mean of python. I have proven subprocess test=subprocess.Popen (['shell_command'],shell=True,stdin=PIPE,stdout=PIPE) Initally, all seems ok, but, after seconds the python shell is frozen. Does someone know alternative ways valid

Re: Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread Philip Semanchuk
On Dec 16, 2009, at 12:41 PM, pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console

Re: Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread Rami Chowdhury
On Wed, Dec 16, 2009 at 09:41, pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for

Re: Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread r0g
pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console I/O. Called Apple tech

Re: Python Imaging Library status

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 13:07:30 -0300, paulo.jpi...@gmail.com paulo.jpi...@gmail.com escribió: is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. Version 1.1.7 is in beta. Here you

Re: Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread Mark Dickinson
On Dec 16, 5:41 pm, pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console I/O.

Re: Apple Mac OS X 10.6 support compatability with Python 3 ?

2009-12-16 Thread Mensanator
On Dec 16, 11:41 am, pdlem...@earthlink.net wrote: I've been given a MAC AIR laptop with OS X 10.6 Snow Leopard. On my desktop I dual boot with XP - Ubuntu and have Python on both. Unfortunately all my Python programs are written on Windows XP and I heavily rely on WConio for console I/O.

Re: Python Imaging Library status

2009-12-16 Thread Emile van Sebille
On 12/16/2009 8:07 AM paulo.jpi...@gmail.com said... Hi guys, is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it updated for Python 2.6 or 3.x versions. PIL for Python 2.6 is available for download from

Re: iterators and views of lists

2009-12-16 Thread Brendan Miller
On Wed, Dec 16, 2009 at 4:16 AM, Paul Rudin paul.nos...@rudin.co.uk wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: I'm sympathetic to your request for list views. I've often wanted some way to cleanly and neatly do this: for item in seq[1:]:     process(item) without

Python training in Florida, January 19-21

2009-12-16 Thread Mark Lutz
Don't miss your chance to attend our upcoming Florida Python training class next month. This 3-day public class is being held January 19-21, in Sarasota, Florida. It is open to both individual and group enrollments. For more details on the class, as well as registration instructions, please

Fwd: Re: Logging question

2009-12-16 Thread Vinay Sajip at Red Dove
Original Message Subject:Re: Logging question Date: Tue, 15 Dec 2009 18:28:54 + From: Vinay Sajip at Red Dove vinay_sa...@red-dove.com To: Yaroslav Molochko ono...@gmail.com On 15/12/2009 14:29, Yaroslav Molochko wrote: Hello Vinay Sajip, my name is

Re: ftplib retrlines timeout

2009-12-16 Thread BJ Swope
I've had experiences with some python mail servers that time out connections if data from the socket is not sent to the application within the timeout parameter. I have seen a python app on FreeBSD that would timeout a connection after 600 seconds if freebsd did not receive at least 32 kb of data

Re: Raw string substitution problem

2009-12-16 Thread Gabriel Genellina
En Wed, 16 Dec 2009 14:51:08 -0300, Peter Otten __pete...@web.de escribió: Ed Keith wrote: --- On Wed, 12/16/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: Ed Keith e_...@yahoo.com escribió: I am having a problem when substituting a raw string. When I do the following:

Re: Python Imaging Library status

2009-12-16 Thread paulo.jpi...@gmail.com
On 16 Dez., 19:21, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Wed, 16 Dec 2009 13:07:30 -0300, paulo.jpi...@gmail.com   paulo.jpi...@gmail.com escribió: is the famous PIL now a dead project? Latest available download is from 2006 and I still don't see any signs of having it

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
r0g aioe@technicalbloke.com writes: J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: snip Hear, hear! That's all very well, but some languages and techniques encourage the programmer to write

Re: Raw string substitution problem

2009-12-16 Thread Peter Otten
Gabriel Genellina wrote: En Wed, 16 Dec 2009 14:51:08 -0300, Peter Otten __pete...@web.de escribió: Ed Keith wrote: --- On Wed, 12/16/09, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: Ed Keith e_...@yahoo.com escribió: I am having a problem when substituting a raw string. When I

How to create a self-destructing Tkinter dialog box?

2009-12-16 Thread mrstevegross
Ok, I would like to put together a Python/Tkinter dialog box that displays a simple message and self-destructs after N seconds. Is there a simple way to do this? Thanks, --Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: iterators and views of lists

2009-12-16 Thread Anh Hai Trinh
On Dec 16, 2:48 pm, Brendan Miller catph...@catphive.net wrote: No, that's what I'm getting at... Most of the existing mutating algorithms in python (sort, reverse) operate over entire collections, not partial collections delimited by indexes... which would be really awkward anyway. Ok it

Re: Raw string substitution problem

2009-12-16 Thread Ed Keith
--- On Wed, 12/16/09, Peter Otten __pete...@web.de wrote: Another possibility: print re.sub('abc', lambda m: r'a\nb\n.c\a', '123abcdefg') 123a\nb\n.c\adefg I'm not sure whether that is clever, ugly, or just plain strange! I think I'll stick with: m = re.match('^(.*)abc(.*)$',

Re: python and command shell on Windows

2009-12-16 Thread eric_dex...@msn.com
On Dec 16, 11:58 am, josu josuj...@gmail.com wrote: Hi I am trying to execute a windows command based on a shell by mean of python. I have proven subprocess test=subprocess.Popen (['shell_command'],shell=True,stdin=PIPE,stdout=PIPE) Initally, all seems ok, but, after seconds the python

Re: I have a cross platform os.startfile but I need to asociate files with xdg-open in linux how do I do that??

2009-12-16 Thread eric_dex...@msn.com
On Dec 16, 10:36 am, Paul Boddie p...@boddie.org.uk wrote: On 16 Des, 17:03, eric_dex...@msn.com eric_dex...@msn.com wrote: #this should be a cross platform example of os.startfile ( startfile ) #for windows and linux.  this is the first version and #linux, mac, other os's commands for

Re: Question to logging

2009-12-16 Thread Vinay Sajip at Red Dove
On 16/12/2009 12:49, stefan.messerl...@postfinance.ch wrote: I have the following error and no clue, how to solve that. Up to python version 2.5 the following script worked without an error, but since python 2.6. I get the following error: #!/usr/bin/env python # -*- coding: ISO-8859-1 -*-

  1   2   >