tox-0.7: fixes, python3-compat, site-packages

2010-07-14 Thread holger krekel
Hi all, thanks to feedback and help from Michael Foord, Sridhar Ratnakumar, Kumar McMillan, Ronny Pfannschmidt and Ralf Schmitt i just released tox-0.7 which includes a couple of fixes, improved Python3 virtualenv support (on non-windows platforms), and a new sitepackages config option that

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote: Define Macro wrote: On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote: I am trying to compare LISP/Scheme/Python for their expressiveness. For this, I propose a vanilla C interpreter. I have seen a book which writes C

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread geremy condra
On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote: On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote: Define Macro wrote: On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote: I am trying to compare LISP/Scheme/Python for their expressiveness. For this, I

Python track at German Zope conference

2010-07-14 Thread Martin v. Loewis
[Das ist im Wesentlichen eine Kopie einer Nachricht, die Dinu an die Python-DE-Liste geschickt hat.] From September 15 to September 17, 2010, the German Zope conference (organized by DZUG) takes place in Dresden. It has tracks for Python, Zope, and Plone. Dinu Gherman and me are organizing the

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread Paul Rubin
bolega gnuist...@gmail.com writes: I am trying to compare LISP/Scheme/Python for their expressiveness... Are there already answers anywhere ? How would a gury approach such a project ? These two articles http://page.mi.fu-berlin.de/~prechelt/Biblio/jccpprt_computer2000.pdf

Simple hack to get $500 to your home.

2010-07-14 Thread easy money
Simple hack to get $500 to your home at http://cashbygetpaypal.tk Due to high security risks,i have hidden the cheque link in an image. in that website on top side above search box, click on image and enter your name and address where you want to receive your cheque. please don,t tell to anyone.

Re: floatref

2010-07-14 Thread Roald de Vries
On Jul 14, 2010, at 1:26 AM, Gary Herron wrote: On 07/13/2010 03:02 PM, Roald de Vries wrote: Hi Gary, On Jul 13, 2010, at 8:54 PM, Gary Herron wrote: On 07/13/2010 10:26 AM, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need

Re: floatref

2010-07-14 Thread Roald de Vries
On Jul 14, 2010, at 3:53 AM, Steven D'Aprano wrote: On Tue, 13 Jul 2010 19:26:34 +0200, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float reference object. Does anybody know if

Re: tarfile and progress information

2010-07-14 Thread Lars Gustäbel
On Wed, Jul 07, 2010 at 11:23:22AM -0400, Nathan Huesken wrote: I am packing large files with tarfile. Is there any way I can get progress information while packing? There is no builtin way in tarfile, but there are several possible solutions: 1. Replace the tarfile.copyfileobj() function that

Re: floatref

2010-07-14 Thread Roald de Vries
On Jul 14, 2010, at 3:53 AM, Steven D'Aprano wrote: On Tue, 13 Jul 2010 19:26:34 +0200, Roald de Vries wrote: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float reference object. Does anybody know if

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-14 Thread Hrvoje Niksic
Alf P. Steinbach /Usenet alf.p.steinbach+use...@gmail.com writes: Also, things like the 'owned' option is just asking for trouble. Isn't owned=true (or equivalent) a necessity when initializing from a PyObject* returned by a function declared to return a new reference? How does your API deal

eGenix at EuroPython 2010

2010-07-14 Thread eGenix Team: M.-A. Lemburg
eGenix at EuroPython 2010 Meet up with eGenix at this year's EuroPython Conference in Birmingham, UK. The EuroPython Conference is the one of the

Re: floatref

2010-07-14 Thread Christian Heimes
I know, I just wondered if there is a *standard* solution. Yeah, you have to reset your brain and switch to Python mode. *scnr* Seriously, your inquiry sounds like you are trying to code C in Python. I'm using Python for more than seven years and I've never felt the need for a mutable float ref

Re: ValueError: invalid literal for float(): -1.#IND (pickle.py)

2010-07-14 Thread Alexander Eisenhuth
Mark Dickinson schrieb: BTW: I'm tied to version 2.5 of python Have you tried using pickle protocol 1 or 2, instead of pickle protocol 0? That may well solve your problem. (Those protocols write out the binary form of a float directly, instead of reading and writing a string

Re: any issues with long running python apps?

2010-07-14 Thread Maria R
I can second the stated opinion that Python per se is stable enough. We deliver production systems running 24/7 with uptimes counted in several months and from what I can see, compared to the OP's app, ours is vastly more complex. The only Python-related issue we have encountered so far, wrt to

Re: Cpp + Python: static data dynamic initialization in *nix shared lib?

2010-07-14 Thread Alf P. Steinbach /Usenet
* Hrvoje Niksic, on 14.07.2010 10:17: Alf P. Steinbach /Usenetalf.p.steinbach+use...@gmail.com writes: Also, things like the 'owned' option is just asking for trouble. Isn't owned=true (or equivalent) a necessity when initializing from a PyObject* returned by a function declared to return a

Re: Errno 9] Bad file descriptor

2010-07-14 Thread joblack
| | Starting point: | ... |         self.status['text'] = 'Processing ...' |         try: |             cli_main(argv) |         except Exception, e: |             self.status['text'] = 'Error: ' + str(e) |             return | ... | cli_main: | |     keypath, inpath, outpath =

Re: nicer way to remove prefix of a string if it exists

2010-07-14 Thread Tim Chase
On 07/13/2010 09:22 PM, Shashwat Anand wrote: You could write: rsl = f[len(prefix):] if f.startswith(prefix) else f Or you can just do split and join, .join(f.split(prefix, 1)) will do. This suggestion breaks if the prefix occurs within the string rather than at the beginning: f

MAKE UPTO $5000 MONTHLY! $2000 INYOUR FIRST 30 DAYS!

2010-07-14 Thread jameser
MAKE UPTO $5000 MONTHLY! $2000 INYOUR FIRST 30 DAYS! Generate $50 to $100 whenever you have a couple of hours free time to spare. You could make $50 or more in the next 2 hours. Starting right Now!Today! Earn from your free website Awesome earnings get paid for your honest work Join as a free

Re: adodb.NewADOConnection('postgres') returns None

2010-07-14 Thread micayael
On Jul 13, 5:35 pm, Thomas Jollans tho...@jollans.com wrote: On 07/13/2010 09:55 PM, micayael wrote: Hi. I'm trying to use adodb for postgres. I had instaled in ubuntu 9.10 the adodb and psycopg2 module (sudo apt-get install python-adodb python-psycopg2) but when I put this import

Re: eGenix at EuroPython 2010

2010-07-14 Thread Daniel Fetchinson
EuroPython 2009 - Making 50 Mio. EUR per year using Python http://www.egenix.com/go23/ This link returns a 404. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Identify the Color of an Image

2010-07-14 Thread Monyl
Hi, 1. How can I find the color of an image present the webpage? 2. How to identify the font type of the selected text present in the content of the web page It would be much helpfull, if anyone responds to it ASAP Thanks Mohmyda -- http://mail.python.org/mailman/listinfo/python-list

Re: Check if a command is valid

2010-07-14 Thread Kenny Meyer
On Jul 13, 4:14 pm, Hans Mulder han...@xs4all.nl wrote: Chris Rebert wrote: `where` seems to be a zsh built-in: $ # I'm in UR bash $ nonexistent -bash: nonexistent: command not found $ where bash -bash: where: command not found And not everyone has zsh installed, so... I don't

Re: Why doesn't python's list append() method return the list itself?

2010-07-14 Thread Nathan Rice
The better question is, do I ever use them? Thinking back over the code I've written in the last couple of years, I would say probably two or three times (mostly in unit tests). I've had to code around string's sequence behavior DOZENS of times. Is it nifty that strings can be sliced like that?

ctypes' c_longdouble: underflow error (bug?)

2010-07-14 Thread kj
I have a C library function hg that returns a long double, so when I import it using C types I specify this return type like this: MYLIB.hg.restype = ctypes.c_longdouble But certain non-zero values returned by hg appear as zero Python-side. If I modify hg so that it prints out its value right

Re: nicer way to remove prefix of a string if it exists

2010-07-14 Thread Paul McGuire
On Jul 13, 6:49 pm, News123 news1...@free.fr wrote: I wondered about a potentially nicer way of removing a prefix of a string if it exists. Here is an iterator solution: from itertools import izip def trim_prefix(prefix, s): i1,i2 = iter(prefix),iter(s) if all(c1==c2 for c1,c2 in

Re: Issue with logging.config

2010-07-14 Thread Joe Hughes
Peter, Thanks for the information. I sent an email to the maintainer and got some information that helped me continue with this. My solution was to change line 785 of handlers.py to self.socket.sendto(bytes(msg, 'ascii'), self.address) After I made the change, I got exactly what I

stdiodemo (twisted-python) and enable command history

2010-07-14 Thread kak...@gmail.com
Hello again to all, While playing and extending stdiodemo.py, a came up with a thought of adding command line history. Is this possible? Any hints? Thanks Antonis K. -- http://mail.python.org/mailman/listinfo/python-list

list.insert

2010-07-14 Thread Eric J. Van der Velden
Hi, I understand this: l=[1,2,3] l[1:2]=[8,9] l [1,8,9,3] But how do you do this with list.insert? Thanks, Eric J. -- http://mail.python.org/mailman/listinfo/python-list

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-14 Thread Kenneth Tilton
Steven D'Aprano wrote: On Tue, 13 Jul 2010 23:24:12 -0400, Kenneth Tilton wrote: The moral? If you look for the spam, you'll find it. And if you *don't* look for spam, you can be sure that some goose will reply to it and get it past your filters. Thanks for that Kenneth, if that is your

python3: help with subprocess

2010-07-14 Thread Alan
Hi there, Module commands is gone in python3, so I am trying subprocess. So please I would appreciate if someone can tell me how to do this better: before I had: cmd = 'uname -a' out = commands.getoutput(cmd) 'Darwin amadeus.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT

Re: list.insert

2010-07-14 Thread Emile van Sebille
On 7/14/2010 7:54 AM Eric J. Van der Velden said... Hi, I understand this: l=[1,2,3] l[1:2]=[8,9] l [1,8,9,3] But how do you do this with list.insert? l = [1,2,3,4] l[1:2]= dummy = [l.insert(1,x) for x in reversed([8,9])] Emile --

Re: Issue with logging.config

2010-07-14 Thread Vinay Sajip
On Jul 14, 3:21 pm, Joe Hughes jwhug...@hughesconcepts.com wrote:         Thanks for the information.  I sent an email to the maintainer and got some information that helped me continue with this.  My solution was to change line 785 of handlers.py to self.socket.sendto(bytes(msg, 'ascii'),

Re: python app development

2010-07-14 Thread mo reina
On Jul 3, 9:59 pm, Terry Reedy tjre...@udel.edu wrote: On 7/3/2010 1:48 PM,mo reinawrote: an anyone recommend a resource (book,tutorial,etc.) that focuses on application development in python? something similar to Practical Django Projects, but for stand alone applications instead of web

Re: Easy questions from a python beginner

2010-07-14 Thread Ethan Furman
Alf P. Steinbach /Usenet wrote: * MRAB, on 12.07.2010 00:37: Alf P. Steinbach /Usenet wrote: Of course there are variables, that's why the docs call them variables. In Java a variable is declared and exists even before the first assignment to it. In Python a 'variable' isn't declared and

Re: python3: help with subprocess

2010-07-14 Thread Ben Kaplan
On Jul 14, 2010, at 8:38 AM, Alan wrote: Hi there, Module commands is gone in python3, so I am trying subprocess. So please I would appreciate if someone can tell me how to do this better: before I had: cmd = 'uname -a' out = commands.getoutput(cmd) 'Darwin amadeus.local 10.4.0

Re: python3: help with subprocess

2010-07-14 Thread Gary Herron
On 07/14/2010 08:38 AM, Alan wrote: Hi there, Module commands is gone in python3, so I am trying subprocess. So please I would appreciate if someone can tell me how to do this better: before I had: cmd = 'uname -a' out = commands.getoutput(cmd) 'Darwin amadeus.local 10.4.0 Darwin Kernel

Re: Identify the Color of an Image

2010-07-14 Thread John Nagle
On 7/14/2010 5:37 AM, Monyl wrote: Hi, 1. How can I find the color of an image present the webpage? 2. How to identify the font type of the selected text present in the content of the web page It would be much helpfull, if anyone responds to it ASAP Thanks Mohmyda Selected text?

multiline input and readline

2010-07-14 Thread Michele Simionato
Googling for ways to use the readline library with multiline input I found out the following stackoverflow answer: http://stackoverflow.com/questions/161495/is-there-a-nice-way-of-handling-multi-line-input-with-gnu-readline The solution is to use the rl_bind_key function, but it does not look

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-14 Thread John Bokma
Kenneth Tilton kentil...@gmail.com writes: fup2 poster Let me see if I have this right. Your technique for reducing unwanted traffic is to openly insult one of the participants? Heh, or just ploinking them (done). Or making them cry like a little baby:

Re: python3: help with subprocess

2010-07-14 Thread Dave Angel
Alan wrote: Hi there, Module commands is gone in python3, so I am trying subprocess. So please I would appreciate if someone can tell me how to do this better: before I had: cmd = 'uname -a' out = commands.getoutput(cmd) 'Darwin amadeus.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23

Re: ctypes' c_longdouble: underflow error (bug?)

2010-07-14 Thread Thomas Jollans
On 07/14/2010 03:24 PM, kj wrote: I have a C library function hg that returns a long double, so when I import it using C types I specify this return type like this: MYLIB.hg.restype = ctypes.c_longdouble But certain non-zero values returned by hg appear as zero Python-side. If I

Re: Issue with logging.config

2010-07-14 Thread Peter Otten
Vinay Sajip wrote: On Jul 14, 3:21 pm, Joe Hughes jwhug...@hughesconcepts.com wrote: Thanks for the information. I sent an email to the maintainer and got some information that helped me continue with this. My solution was to change line 785 of handlers.py to self.socket.sendto(bytes(msg,

Some success with the Plot problem :D

2010-07-14 Thread Ritchy lelis
Hello guys On Following the development of my ADC (Analog-to-Digital converter Residue function transference) i already got some progress with the plot problem and (much thanks to colleagues who help me in this forum and not only) i would like to show you all the progress that has already got and

Re: Easy questions from a python beginner

2010-07-14 Thread Steven D'Aprano
On Wed, 14 Jul 2010 09:06:34 -0700, Ethan Furman wrote: Alf P. Steinbach /Usenet wrote: [...] Clearly when the exception is raised, referring to the variable, the variable exists. You are the only one spouting nonsense. Have you tried this? -- def foo(): ... print locals() ...

Re: death of newsgroups (Microsoft closing their newsgroups)

2010-07-14 Thread Ricardo Aráoz
On 14/07/2010 12:19 p.m., Kenneth Tilton wrote: Steven D'Aprano wrote: On Tue, 13 Jul 2010 23:24:12 -0400, Kenneth Tilton wrote: The moral? If you look for the spam, you'll find it. And if you *don't* look for spam, you can be sure that some goose will reply to it and get it past your

Re: Easy questions from a python beginner

2010-07-14 Thread John Posner
On 7/14/2010 12:06 PM, Ethan Furman wrote: ... Have you tried this? -- def foo(): ... print locals() ... blah = 'interesting' ... print locals() ... -- foo() {} {'blah': 'interesting'} As can be clearly seen, blah does not exist before the assignment -- the *name* blah has not been *bound* to

High Performance solutions are needed to do things like urlretrieve

2010-07-14 Thread David
urlretrieve works fine. However, when file size get very large. It goes on forever, and even fails. For instance, one of download .zip file is of 363,096KB. Particularly, when trying to get, with urlretrieve, a zipped folder of a very large size, it could take up to 20 to 30 minutes. Often

Re: High Performance solutions are needed to do things like urlretrieve

2010-07-14 Thread Thomas Jollans
On 07/14/2010 07:49 PM, David wrote: urlretrieve works fine. However, when file size get very large. It goes on forever, and even fails. For instance, one of download .zip file is of 363,096KB. Particularly, when trying to get, with urlretrieve, a zipped folder of a very large size,

Re: adodb.NewADOConnection('postgres') returns None

2010-07-14 Thread Thomas Jollans
On 07/14/2010 02:14 PM, micayael wrote: On Jul 13, 5:35 pm, Thomas Jollans tho...@jollans.com wrote: On 07/13/2010 09:55 PM, micayael wrote: Hi. I'm trying to use adodb for postgres. I had instaled in ubuntu 9.10 the adodb and psycopg2 module (sudo apt-get install python-adodb

Re: Issue with logging.config

2010-07-14 Thread Joe Hughes
This is why I did what I did, because I couldn't figure it out either. I did find issue 5421 at python.org which is where I got the idea for the code change. Joe On Jul 14, 2010, at 12:35 PM, Peter Otten wrote: Vinay Sajip wrote: On Jul 14, 3:21 pm, Joe Hughes jwhug...@hughesconcepts.com

Re: High Performance solutions are needed to do things like urlretrieve

2010-07-14 Thread MRAB
David wrote: urlretrieve works fine. However, when file size get very large. It goes on forever, and even fails. For instance, one of download .zip file is of 363,096KB. Particularly, when trying to get, with urlretrieve, a zipped folder of a very large size, it could take up to 20 to 30

Re: list.insert

2010-07-14 Thread Chris Rebert
On Wed, Jul 14, 2010 at 7:54 AM, Eric J. Van der Velden ericjvandervel...@gmail.com wrote: Hi, I understand this: l=[1,2,3] l[1:2]=[8,9] l [1,8,9,3] But how do you do this with list.insert? You can't clobber existing items in the list using just .insert(), so the closest you could get

Re: Easy questions from a python beginner

2010-07-14 Thread Grant Edwards
On 2010-07-11, wheres pythonmonks wherespythonmo...@gmail.com wrote: I have some easy issues (Python 2.6) As of a few minutes ago, this thread had 48 postings on my news server. To paraphrase somebody famous: There are no such things as easy questions. There are, however, easy

Re: Errno 9] Bad file descriptor

2010-07-14 Thread Thomas Jollans
On 07/14/2010 01:21 PM, joblack wrote: | | Starting point: | ... | self.status['text'] = 'Processing ...' | try: | cli_main(argv) | except Exception, e: | self.status['text'] = 'Error: ' + str(e) | return | ... | cli_main: |

Re: adodb.NewADOConnection('postgres') returns None

2010-07-14 Thread Mladen Gogala
On Wed, 14 Jul 2010 20:04:59 +0200, Thomas Jollans wrote: It certainly looks that way. It may be possible to install an old psycopg module by hand - I'd expect that to work as well. Not on Ubuntu 9.10: checking PostgreSQL type catalog... /usr/include/postgresql/catalog/ pg_type.h checking

Re: adodb.NewADOConnection('postgres') returns None

2010-07-14 Thread Mladen Gogala
On Wed, 14 Jul 2010 05:14:08 -0700, micayael wrote: Thanks Thomas. :-( then adodb today dosn't work with postgres (at least on ubuntu) right? No, ADOdb doesn't work with the newer versions of Postgres. ADOdb doesn't work with Psycopg2 and the guy who maintains it did not reply to my email.

Is Python portable/Can I install it on an USB Stick?

2010-07-14 Thread Thomas Tundor
Is Python portable? Can I install it on an USB Stick? Or is Python installing (at least on WinXP) services or register some DLLs or write something into Registry? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python portable/Can I install it on an USB Stick?

2010-07-14 Thread Philip Semanchuk
On Jul 14, 2010, at 3:28 PM, Thomas Tundor wrote: Is Python portable? Can I install it on an USB Stick? Or is Python installing (at least on WinXP) services or register some DLLs or write something into Registry? http://www.portablepython.com/ --

Re: Is Python portable/Can I install it on an USB Stick?

2010-07-14 Thread Christian Heimes
Is Python portable? Can I install it on an USB Stick? Or is Python installing (at least on WinXP) services or register some DLLs or write something into Registry? Yes, a single user installation of Python is portable. An installation for every user is not portable since it installs some

Re: Check if a command is valid

2010-07-14 Thread Steven W. Orr
On 07/12/10 21:29, quoth Kenny Meyer: Hello, I have to figure out if a string is callable on a Linux system. I'm actually doing this: def is_valid_command(command): retcode = 100 # initialize if command: retcode = subprocess.call(command, shell=True)

Re: grailbrowser now running under python 2.5 (probably above too)

2010-07-14 Thread lkcl
On Jul 11, 5:44 am, rantingrick rantingr...@gmail.com wrote: On Jul 10, 10:59 pm, Luke Kenneth Casson Leighton luke.leigh...@gmail.com wrote: source at:http://github.com/lkcl/grailbrowser $ python grail.py (note the lack of python1.5 or python2.4) conversion of the 80 or so regex's to

Re: grailbrowser now running under python 2.5 (probably above too)

2010-07-14 Thread lkcl
On Jul 11, 10:39 pm, Martin P. Hellwig martin.hell...@dcuktec.org wrote: On 07/11/10 04:59, Luke Kenneth Casson Leighton wrote: source at: http://github.com/lkcl/grailbrowser $ python grail.py (note the lack of python1.5 or python2.4) conversion of the 80 or so regex's to re has been

Please Help

2010-07-14 Thread Hayathms
PLease anyone help me ,, program not running from tkinter import ttk from tkinter import * class Hami(ttk.Frame): def __init__(self,master=None):

Re: Check if a command is valid

2010-07-14 Thread Grant Edwards
On 2010-07-14, Steven W. Orr ste...@syslang.net wrote: On 07/12/10 21:29, quoth Kenny Meyer: I have to figure out if a string is callable on a Linux system. I'm actually doing this: def is_valid_command(command): retcode = 100 # initialize if command:

Re: Getting started with python on macintosh snow leopard with mysql - need help

2010-07-14 Thread Ned Deily
In article aanlktim1x7b7if4r4t-zhqcvzuq656mo7o9izurcv...@mail.gmail.com, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Jul 11, 2010 at 1:18 PM, dk dkelle...@gmail.com wrote: [...] when i try to compile mysql-python-1.2.3 i get the following error returned from python setup.py

Re: floatref

2010-07-14 Thread Tino Wildenhain
Am 13.07.2010 19:26, schrieb Roald de Vries: Hi all, I have two objects that should both be able to alter a shared float. So i need something like a mutable float object, or a float reference object. Does anybody know if something like that exists? I know it's not hard to build, but I

Re: Please Help

2010-07-14 Thread Gary Herron
On 07/14/2010 01:51 PM, Hayathms wrote: PLease anyone help me ,, program not running from tkinter import ttk from tkinter import * class Hami(ttk.Frame): def __init__(self,master=None):

Re: Issue with logging.config

2010-07-14 Thread Vinay Sajip
On Jul 14, 7:08 pm, Joe Hughes jwhug...@hughesconcepts.com wrote: This is why I did what I did, because I couldn't figure it out either.  I did find issue 5421 at python.org which is where I got the idea for the code change. Perhaps you should read the messages for issue 7077, linked to by

Splitting numeric litterals

2010-07-14 Thread candide
The escape sequence \ENTER allows to split a string over 2 consecutive lines. On the other hand, it seems impossible to split a numeric litteral across multiple lines, compare : 1000\ ... 000\ ... 000 '10' 1000\ ... 000\ File stdin, line 2 000\ ^ SyntaxError:

Re: Splitting numeric litterals

2010-07-14 Thread Steven D'Aprano
On Thu, 15 Jul 2010 03:30:24 +0200, candide wrote: The escape sequence \ENTER allows to split a string over 2 consecutive lines. On the other hand, it seems impossible to split a numeric litteral across multiple lines [...] Is this the general behaviour ? Yes. You can't put any whitespace

Re: Splitting numeric litterals

2010-07-14 Thread MRAB
candide wrote: The escape sequence \ENTER allows to split a string over 2 consecutive lines. On the other hand, it seems impossible to split a numeric litteral across multiple lines, compare : 1000\ ... 000\ ... 000 '10' 1000\ ... 000\ File stdin, line 2 000\ ^

Re: Splitting numeric litterals

2010-07-14 Thread candide
MRAB a écrit : want to split them over several lines. It is somewhat unusual to have a _numeric_ literal that's very very long! I agree. But consider RSA-155 for instance ... ;) For an integer literal you could use a string literal and convert it to an integer: int(1000\ 000\ 000)

Re: Easy questions from a python beginner

2010-07-14 Thread r
On Jul 14, 1:24 pm, Grant Edwards inva...@invalid.invalid wrote: As of a few minutes ago, this thread had 48 postings on my news server. To paraphrase somebody famous:     There are no such things as easy questions.  There are, however,     easy answers.  And they're wrong.         Ha!

Re: Identify the Color of an Image

2010-07-14 Thread Gary Herron
On 07/14/2010 05:37 AM, Monyl wrote: Hi, 1. How can I find the color of an image present the webpage? 2. How to identify the font type of the selected text present in the content of the web page It would be much helpfull, if anyone responds to it ASAP Thanks Mohmyda Please be

Re: Issue with logging.config

2010-07-14 Thread Joe Hughes
Hi Vinay, I think I figured out what you are talking about after reading RFC 5424. I think this means that this code syslog.info(Status - + mcu_dict[pinged.ip] + is + status[pinged.status]) needs to become something like this BOM = 0xEFBBBF msg = str(BOM) + Status - +

Re: M2Crypto-0.20.2, SWIG-2.0.0, and OpenSSL-1.0.0a build problem

2010-07-14 Thread Adam Mercer
Anyone have any ideas about this? Cheers Adam On Tue, Jul 13, 2010 at 16:18, Adam Mercer ramer...@gmail.com wrote: Hi I'm trying to build M2Crypto on Mac OS X 10.6.4 against python2.5 (python2.6 fails in the same way), with SWIG 2.0.0 and OpenSSL 1.0.0a and it is failing with the

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jul 13, 11:18 pm, geremy condra debat...@gmail.com wrote: On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote: On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote: Define Macro wrote: On Jun 13, 7:07 pm, bolega gnuist...@gmail.com wrote: I am trying to

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread bolega
On Jul 13, 11:35 pm, Paul Rubin no.em...@nospam.invalid wrote: bolega gnuist...@gmail.com writes: I am trying to compare LISP/Scheme/Python for their expressiveness... Are there already answers anywhere ? How would a gury approach such a project ? These two articles    

Re: C interpreter in Lisp/scheme/python

2010-07-14 Thread geremy condra
On Wed, Jul 14, 2010 at 10:17 PM, bolega gnuist...@gmail.com wrote: On Jul 13, 11:18 pm, geremy condra debat...@gmail.com wrote: On Tue, Jul 13, 2010 at 11:01 PM, bolega gnuist...@gmail.com wrote: On Jun 20, 9:31 pm, Richard Fateman fate...@cs.berkeley.edu wrote: Define Macro wrote: On

[issue5673] Add timeout option to subprocess.Popen

2010-07-14 Thread Reid Kleckner
Reid Kleckner r...@mit.edu added the comment: I went through the trouble of building and testing Python on Windows Vista, and with some small modifications I got the tests I added to pass. Here's an updated patch. I'm still not really sure how those threads work on Windows, so I'd rather

[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Retro
New submission from Retro vinet...@gmail.com: Fix the docs for every selected Python version. They all have the same typos. The typos appear in the documentation of the 'select' module. These are the methods that need typo fixes: select.kqueue() (Only supported on BSD.) Returns a kernel

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Ask Solem
Ask Solem a...@opera.com added the comment: There's one more thing if exitcode is not None: cleaned = True if exitcode != 0 and not worker._termination_requested: abnormal.append((worker.pid, exitcode)) Instead of restarting crashed worker

[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r82871. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9258 ___

[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Just for your information, there is no 3.3 version yet. This value is useful for bugs that won’t be fixed in 3.2 (a.k.a. the py3k trunk). -- nosy: +merwok ___ Python tracker rep...@bugs.python.org

[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Ah yes, and please don't add me to the nosy list on doc issues. d...@python is enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9258

[issue9235] missing import sys in Tools/gdb/libpython.py

2010-07-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r82874. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9235

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le mercredi 14 juillet 2010 à 01:45 +, Terry J. Reedy a écrit : 2. Add a parameter that defaults to using the heuristic but allows turning it off. Perhaps better, but code that used the new API would crash if run on 2.7.0 Yes, but this

[issue9217] 2to3 crashes with some doctests

2010-07-14 Thread Tiago Antao
Tiago Antao tiagoan...@gmail.com added the comment: I've re-opened this bug because of the late examples that I've included that still crash. I can open a new bug if you prefer with the late examples (just tell me and I will open a new bug). This is somewhat important for us: In order to be

[issue5673] Add timeout option to subprocess.Popen

2010-07-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brian.curtin versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___

[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: test_threaded_import is designed to check the import lock (and it does at least to some degree - I changed runpy's handling of the import lock because my original approach broke that test). Apparently, Lib/test/test_threaded_import only works

[issue7231] Windows installer does not add \Scripts folder to the path

2010-07-14 Thread sorin
sorin sorin.sbar...@gmail.com added the comment: Additional information that will enable the installer to update the path without requiring a relogin/restart: http://support.microsoft.com/kb/104011 -- ___ Python tracker rep...@bugs.python.org

[issue5842] Move test outside of urlparse module

2010-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Done in r82881 to 82883. Thanks orsenthil! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5842

[issue5842] Move test outside of urlparse module

2010-07-14 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FTR, r82884 too for 2.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5842 ___ ___

[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, here is a patch for test_threaded_import that makes it work for regrtest too. I've removed all global variables and converted it to unittest. -- keywords: +patch Added file: http://bugs.python.org/file17995/threadimp.patch

[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Ariel Ben-Yehuda
New submission from Ariel Ben-Yehuda ariel@gmail.com: Hello, I think there is a problem with Python 2.7: I installed it, and tried to compile GObject-Introspection 0.9.2. Here is the result: ... GISCAN GLib-2.0.gir Traceback (most recent call last): File ../tools/g-ir-scanner, line 36,

[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've committed the fix in r82885 (3.2) and r82886 (3.1). The reliance on random still looks a bit quirky to me, but at least the test now does what it should do, and has a cleaned up coding style. I'm leaving this issue open, for the other test

[issue4932] Little improvement on urlparse module, urlparse function.

2010-07-14 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: I reviewed the patch and we may not go with it. - There is recent improvements in parsing and the patch does not go well with it, especially the clear_cache removal. Also there is a mistake in the patch: -scheme, url =

[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9259 ___ ___ Python-bugs-list

[issue7384] curses crash on FreeBSD

2010-07-14 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: So you have garbage from stderr in readline_termcap_lib. Since that's useless anyway (no matter what locale is set), let's check the return value of os.system(). The attached patch skips readline linkage detection if ldd fails. In that

  1   2   >