betterbatch 0.9.7 released - Functions, negative conditions, Setup/Installer and test fixes

2010-03-07 Thread mark . m . mcmahon
Hi, The 0.9.7 release of BetterBatch is now available. BetterBatch is designed as a middle ground between batch files and more powerful languages (Python, shell scripting, etc). The project is hosted on code.google.com: http://code.google.com/p/betterbatch/ Download from

[ANN] Next Meeting of pyCologne, March, 10th

2010-03-07 Thread Thomas Lenarz
Hello, The next meeting of pyCologne will take place Wednesday, March, 10th starting about 6.30 pm - 6.45 pm at Room 0.14, Benutzerrechenzentrum (RRZK-B) University of Cologne, Berrenrather Str. 136, 50937 Köln, Germany Agenda: -Presentacion: Experience with Pinax (Web-Site-Platform) (Klaus

Re: best practices: is collections.defaultdict my friend or not?

2010-03-07 Thread Mark Lawrence
Pete Emerson wrote: On Mar 5, 6:10 pm, Andreas Waldenburger use...@geekmail.invalid wrote: On Fri, 5 Mar 2010 17:22:14 -0800 (PST) Pete Emerson pemer...@gmail.com wrote: [snip] data['one'] = {} data['one']['two'] = 'three' print data {'one': {'two': 'three'}} And through some research,

Problem with regular expression

2010-03-07 Thread Joan Miller
I would to convert the first string to upper case. But this regular expression is not matching the first string between quotes. re.sub('(?Pid\w+)': [^{], \gidFOO, str) # string to non-matching 'foo': { # strings to matching 'bar': 'bar2' 'bar': None 'bar': 0 'bar': True So, i.e., from the

Re: Conditional based on whether or not a module is being used

2010-03-07 Thread Steve Holden
Vinay Sajip wrote: [...] Well, the logging package is available in Python and ready for use and pretty much battle tested, so why not use that? Are you planning to use third-party libraries in your Python work, or write everything yourself? If you are planning to use third party libraries, how

Re: Problem with regular expression

2010-03-07 Thread News123
Hi Joan, Joan Miller wrote: I would to convert the first string to upper case. But this regular expression is not matching the first string between quotes. re.sub('(?Pid\w+)': [^{], \gidFOO, str) # string to non-matching 'foo': { # strings to matching 'bar': 'bar2' 'bar': None

Re: Problem with regular expression

2010-03-07 Thread Steve Holden
Joan Miller wrote: I would to convert the first string to upper case. But this regular expression is not matching the first string between quotes. re.sub('(?Pid\w+)': [^{], \gidFOO, str) # string to non-matching 'foo': { # strings to matching 'bar': 'bar2' 'bar': None 'bar': 0

Re: Asynchronous HTTP client

2010-03-07 Thread exarkun
On 06:53 am, ping.nsr@gmail.com wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/', callback_func) # immediately continues, and callback_func is called with response as arg

Re: Asynchronous HTTP client

2010-03-07 Thread Lie Ryan
On 03/07/2010 05:53 PM, Ping wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/', callback_func) # immediately continues, and callback_func is called with response as arg

time_struct

2010-03-07 Thread moerchendiser2k3
Hi, can anyone tell me how to return a time_struct from the timemodule in my own C-Module? Is that possible? I can just find one function in timefuncs.h, but it doesnt return any PyObject. Thanks in advance. moerchendiser2k3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with regular expression

2010-03-07 Thread Paul McGuire
On Mar 7, 4:32 am, Joan Miller pelok...@gmail.com wrote: I would to convert the first string to upper case. But this regular expression is not matching the first string between quotes. Is using pyparsing overkill? Probably. But your time is valuable, and pyparsing let's you knock this out in

Re: Asynchronous HTTP client

2010-03-07 Thread pingooo
2010/3/7 exar...@twistedmatrix.com On 06:53 am, ping.nsr@gmail.com wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/', callback_func) # immediately continues, and

Re: compiler with python

2010-03-07 Thread Stefan Behnel
mohamed issolah, 06.03.2010 14:07: I want to create a compiler which transform a code like pascal code (that what I do in C) to quad In C, I use BISON and FLEX tools. Hi, please stop starting new threads for the same topic. Instead, reply to responses you get. Stefan --

Re: Asynchronous HTTP client

2010-03-07 Thread exarkun
On 02:40 pm, ping.nsr@gmail.com wrote: 2010/3/7 exar...@twistedmatrix.com On 06:53 am, ping.nsr@gmail.com wrote: Hi, I'm trying to find a way to create an asynchronous HTTP client so I can get responses from web servers in a way like async_http_open('http://example.com/',

a simple def how-to

2010-03-07 Thread vsoler
Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like... ranges=['book','house','table','read'] for i in ranges:

Re: compiler with python

2010-03-07 Thread Mark Lawrence
Alf and Steven Howe, please don't top post, it makes it all but impossible to follow a thread. Darn!:) Mark Lawrence. Alf P. Steinbach wrote: Since Mohamed is talking about compilation I think it's more likely he's talking about an intermediate program represention based on quad tuples like

Re: a simple def how-to

2010-03-07 Thread Andreas Waldenburger
On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler vicente.so...@gmail.com wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something

Re: a simple def how-to

2010-03-07 Thread John Posner
On 3/7/2010 10:05 AM, vsoler wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like...

Re: a simple def how-to

2010-03-07 Thread vsoler
On 7 mar, 16:23, Andreas Waldenburger use...@geekmail.invalid wrote: On Sun, 7 Mar 2010 07:05:26 -0800 (PST) vsoler vicente.so...@gmail.com wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table')

Re: a simple def how-to

2010-03-07 Thread vsoler
On 7 mar, 16:23, John Posner jjpos...@optimum.net wrote: On 3/7/2010 10:05 AM, vsoler wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would

Re: a simple def how-to

2010-03-07 Thread John Posner
On 3/7/2010 10:59 AM, vsoler wrote: Thank you for your help. Perhaps the solution you are suggesting is not exactly what I was looking for, but helped anyway. Oops, I was thinking list, not dict. Too fast, and not enough coffee! -John -- http://mail.python.org/mailman/listinfo/python-list

Duplicate keys in dict?

2010-03-07 Thread vsoler
Hello, My code snippet reads data from excel ranges. First row and first column are column headers and row headers respectively. After reding the range I build a dict. 'A'..'B' 'ab'35 'cd'72

Re: a simple def how-to

2010-03-07 Thread Steven D'Aprano
On Sun, 07 Mar 2010 07:05:26 -0800, vsoler wrote: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like...

Re: Duplicate keys in dict?

2010-03-07 Thread News123
vsoler wrote: Hello, My code snippet reads data from excel ranges. First row and first column are column headers and row headers respectively. After reding the range I build a dict. 'A'..'B' 'ab'35

Re: Duplicate keys in dict?

2010-03-07 Thread Steven D'Aprano
On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote: Hello, My code snippet reads data from excel ranges. First row and first column are column headers and row headers respectively. After reding the range I build a dict. 'A'..'B'

Re: Duplicate keys in dict?

2010-03-07 Thread vsoler
On 7 mar, 17:53, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote: Hello, My code snippet reads data from excel ranges. First row and first column are column headers and row headers respectively. After reding the range I build

Re: a simple def how-to

2010-03-07 Thread Stefan Behnel
vsoler, 07.03.2010 16:05: Hello, My script starts like this: book=readFromExcelRange('book') house=readFromExcelRange('house') table=readFromExcelRange('table') read=readFromExcelRange('read') ... But I would like to have something equivalent, like... ranges=['book','house','table','read']

importerror: module Gnuplot missing

2010-03-07 Thread gujax
Hi, I need help. I am trying to follow examples from a book Python Scripting for Computational Science and the examples are all plotted using Gnuplot. When I run the programs I get error saying importerror Gnuplot module missing. I have installed Gnuplot in C:\My Programs\gnuplot directory

Calculating very large exponents in python

2010-03-07 Thread Fahad Ahmad
Dear All, i am writing my crytographic scheme in python, i am just a new user to it. I have written the complete code, the only point i am stuck it is that i am using 256 exponentiation which is normal in crytography but python just hangs on it. g**x [where both g and x are 256 bit numbers

Re: Duplicate keys in dict?

2010-03-07 Thread Tim Chase
vsoler wrote: On 7 mar, 17:53, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 07 Mar 2010 08:23:13 -0800, vsoler wrote: Hello, My code snippet reads data from excel ranges. First row and first column are column headers and row headers respectively. After reding the range

Re: Calculating very large exponents in python

2010-03-07 Thread geremy condra
On Sun, Mar 7, 2010 at 1:55 PM, Fahad Ahmad miracles...@hotmail.com wrote: Dear All, i am writing my crytographic scheme in python, i am just a new user to it. I have written the complete code, the only point i am stuck it is that i am using 256 exponentiation which is normal in crytography

Bluetooth

2010-03-07 Thread PythonAB
Hello, I'm writing a script that has to connect a bluetooth device with a 3D application. On my search for a bluetooth module i ran into this: http://www.python.org/download/releases/2.4/notes/ where it says: The socket module now supports Bluetooth sockets, if the system has

negative counts in collections.Counter?

2010-03-07 Thread Vlastimil Brom
Hi all, I'd like to ask about the possibility of negative counts in collections.Counter (using Python 3.1); I believe, my usecase is rather trivial, basically I have the word frequencies of two texts and I want do compare them (e.g. to see what was added and removed between different versions of a

killing own process in windows

2010-03-07 Thread News123
Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() So I'd just like to terminate my own program. Examples of non killable (not killable with CTRL-C) programs: - A program, that started

stopping a multiprocessing.managers.BaseManager nicely (looks like a hack)

2010-03-07 Thread News123
Hi, I have following program from multiprocessing.managers import BaseManager def myfunc(): return 3 class MyManager(BaseManager): pass MyManager.register('myfunc',callable = myfunc) m = MyManager(address=('127.0.0.1', 5),authkey='abracadabra') server = m.get_server()

Re: killing own process in windows

2010-03-07 Thread Martin P. Hellwig
On 03/07/10 21:08, News123 wrote: Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() So I'd just like to terminate my own program. Examples of non killable (not killable with CTRL-C)

Re: stopping a multiprocessing.managers.BaseManager nicely (looks like a hack)

2010-03-07 Thread News123
My fix has certain problems: News123 wrote: Hi, I have following program from multiprocessing.managers import BaseManager def myfunc(): return 3 class MyManager(BaseManager): pass MyManager.register('myfunc',callable = myfunc) m = MyManager(address=('127.0.0.1',

Re: killing own process in windows

2010-03-07 Thread News123
Hi Martin. Hellwig wrote: On 03/07/10 21:08, News123 wrote: Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() So I'd just like to terminate my own program. Examples of non

Re: negative counts in collections.Counter?

2010-03-07 Thread Arnaud Delobelle
Vlastimil Brom vlastimil.b...@gmail.com writes: Hi all, I'd like to ask about the possibility of negative counts in collections.Counter (using Python 3.1); I believe, my usecase is rather trivial, basically I have the word frequencies of two texts and I want do compare them (e.g. to see what

Re: killing own process in windows

2010-03-07 Thread Martin P. Hellwig
On 03/07/10 21:54, News123 wrote: Hi Martin. Hellwig wrote: On 03/07/10 21:08, News123 wrote: Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() So I'd just like to terminate my own

Re: killing own process in windows

2010-03-07 Thread Christian Heimes
News123 wrote: Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() You have to terminate the XMP-RPC server or the manager first. Check the docs! You can terminate a Python process

Re: killing own process in windows

2010-03-07 Thread News123
Hi Cristian, Christian Heimes wrote: News123 wrote: Hi, How can I kill my own process? Some multithreaded programs, that I have are unable to stop when ctrl-C is pressed. Some can't be stopped with sys.exit() You have to terminate the XMP-RPC server or the manager first. Check the

Re: time_struct

2010-03-07 Thread moerchendiser2k3
any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Window crash/freeze after python test.py in \Gnuplot

2010-03-07 Thread gujax
Hi, My computer OS is Win ME, and I am running a Py2.5 version. Gnuplot is v4.2, Gnuplot_py is v1.8. However, whenever I give a command python test.py to test Gnuplot_py, I sometimes get message #Gnuplot.for enjoyment #press return to open a window .. clear terminal #test

Re: NoSQL Movement?

2010-03-07 Thread floaiza
I don't think there is any doubt about the value of relational databases, particularly on the Internet. The issue in my mind is how to leverage all the information that resides in the deep web using strictly the relational database paradigm. Because that paradigm imposes a tight and rigid

running a program on many processors

2010-03-07 Thread Paweł Banyś
Hello, I have already read about Python and multiprocessing which allows using many processors. The idea is to split a program into separate tasks and run each of them on a separate processor. However I want to run a Python program doing a single simple task on many processors so that their

Re: running a program on many processors

2010-03-07 Thread Diez B. Roggisch
Am 08.03.10 01:18, schrieb Paweł Banyś: Hello, I have already read about Python and multiprocessing which allows using many processors. The idea is to split a program into separate tasks and run each of them on a separate processor. However I want to run a Python program doing a single simple

Re: running a program on many processors

2010-03-07 Thread Gib Bogle
Paweł Banyś wrote: ... How can it be achieved? Very carefully. -- http://mail.python.org/mailman/listinfo/python-list

Re: running a program on many processors

2010-03-07 Thread Steven D'Aprano
On Mon, 08 Mar 2010 01:18:13 +0100, Paweł Banyś wrote: Hello, I have already read about Python and multiprocessing which allows using many processors. The idea is to split a program into separate tasks and run each of them on a separate processor. However I want to run a Python program

Re: best practices: is collections.defaultdict my friend or not?

2010-03-07 Thread Steven D'Aprano
On Sun, 07 Mar 2010 09:33:22 +, Mark Lawrence wrote: I was a little frightened of doing import this (Hey, kid, run rm - rf / and see what happens!), but did, and the words are wise. Pete After reading the words of wisdom try import this a second time and watch what happens, it's

Re: negative counts in collections.Counter?

2010-03-07 Thread Steven D'Aprano
On Sun, 07 Mar 2010 22:21:27 +, Arnaud Delobelle wrote: Vlastimil Brom vlastimil.b...@gmail.com writes: Hi all, I'd like to ask about the possibility of negative counts in collections.Counter (using Python 3.1); I believe, my usecase is rather trivial, basically I have the word

Re: A scopeguard for Python

2010-03-07 Thread Gabriel Genellina
En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach al...@start.no escribió: Sorry, as with the places noted above, I can't understand what you're trying to say here. Regarding your posts, neither can I. All the time. Sorry, deciphering your posts would force me to spend much more time

Re: running a program on many processors

2010-03-07 Thread Martin P. Hellwig
On 03/08/10 00:18, Paweł Banyś wrote: Hello, I have already read about Python and multiprocessing which allows using many processors. The idea is to split a program into separate tasks and run each of them on a separate processor. However I want to run a Python program doing a single simple

write to remote ile

2010-03-07 Thread monkeys paw
I can xfer a file from a remote server using: import urllib2 as u x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl') for line in x: print line How can i write a file to the remote server? I tried: x = u.url.open('http://joemoney.net/somefile.txt', 'w') but that does not work --

Re: write to remote ile

2010-03-07 Thread Martin P. Hellwig
On 03/08/10 02:10, monkeys paw wrote: I can xfer a file from a remote server using: import urllib2 as u x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl') for line in x: print line How can i write a file to the remote server? I tried: x =

Call for papers: SETP-10, USA, July 2010

2010-03-07 Thread James Heralds
It would be highly appreciated if you could share this announcement with your colleagues, students and individuals whose research is in software engineering, software testing, software quality assurance, software design and related areas. Call for papers: SETP-10, USA, July 2010 The 2010

Best practice way to detect internet connectivity under Python 2.6/Windows

2010-03-07 Thread python
Is the best pratice way to detect internet connectivity under Windows (using Python 2.6) simply to attempt to access a known internet website using urllib or urlib2 wrapped in a try/except construct? Thank you, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Curiosity stirkes me on 'import this'.

2010-03-07 Thread Xavier Ho
I took a look at the 'this' module to see where the file is stored. This is probably old news to some people, but was new to me. print this.s Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. Fvzcyr vf orggre guna pbzcyrk. Pbzcyrk vf orggre guna

Re: write to remote ile

2010-03-07 Thread monkeys paw
On 3/7/2010 9:20 PM, Martin P. Hellwig wrote: On 03/08/10 02:10, monkeys paw wrote: I can xfer a file from a remote server using: import urllib2 as u x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl') for line in x: print line How can i write a file to the remote server? I tried:

Re: write to remote ile

2010-03-07 Thread Martin P. Hellwig
On 03/08/10 02:51, monkeys paw wrote: On 3/7/2010 9:20 PM, Martin P. Hellwig wrote: On 03/08/10 02:10, monkeys paw wrote: I can xfer a file from a remote server using: import urllib2 as u x=u.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl') for line in x: print line How can i write a

Reverse engineering CRC?

2010-03-07 Thread Gregory Ewing
Given some known data/crc pairs, how feasible is it to figure out the polynomial being used to generate the crc? In the case I'm looking at, it appears that the crc size may be at least 24 bits, so just trying all possible polynomials probably isn't doable. An article I found hints at the

[ANNC] pynguin-0.2 (python turtle graphics application)

2010-03-07 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release

Re: Reverse engineering CRC?

2010-03-07 Thread Steven D'Aprano
On Mon, 08 Mar 2010 16:09:12 +1300, Gregory Ewing wrote: Given some known data/crc pairs, how feasible is it to figure out the polynomial being used to generate the crc? Google is your friend: http://www.woodmann.com/fravia/crctut1.htm -- Steven --

Evaluating Income Property

2010-03-07 Thread satish groups
Income property is becoming more attractive to investors looking for a better return on their money. With today's low interest rates, income- producing properties such as apartments and duplexes can produce exciting returns. As with any type of property, the value of income property is what

The C language like the Python, by the Python and for the Python --- PythoidC

2010-03-07 Thread CHEN Guang
Hi, if you are interested in C-Python mixed programming, please take a look at: http://pythoidc.googlecode.com PythoidC is the C language like the Python, by the Python and for the Python import c c.include(c.h.stdio) c.include(c.h.stdlib) '''Annotation is free!''' int fib(int n):

Re: negative counts in collections.Counter?

2010-03-07 Thread Raymond Hettinger
On Mar 7, 5:46 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Given that Counter supports negative counts, it looks to me that the behaviour of __add__ and __sub__ is fundamentally flawed. You should raise a bug report (feature enhancement) on the bug tracker. It isn't a bug.

Re: The C language like the Python, by the Python and for the Python --- PythoidC

2010-03-07 Thread Stefan Behnel
CHEN Guang, 08.03.2010 06:08: Hi, if you are interested in C-Python mixed programming, please take a look at: http://pythoidc.googlecode.com PythoidC is the C language like the Python, by the Python and for the Python It looks a bit dangerous to me to parse C header files only with regular

RE: Calculating very large exponents in python

2010-03-07 Thread Fahad Ahmad
Thanks Geremy, That has been an absolute bump... GOD i cant sit on my chair, it has worked even on 512 bit number and with no time.. superb i would say. lastly, i am using the code below to calculate Largest Prime factor of a number: print

Re: A scopeguard for Python

2010-03-07 Thread Alf P. Steinbach
* Gabriel Genellina: En Thu, 04 Mar 2010 20:52:04 -0300, Alf P. Steinbach al...@start.no escribió: Sorry, as with the places noted above, I can't understand what you're trying to say here. Regarding your posts, neither can I. All the time. Sorry, deciphering your posts would force me to

Re: running a program on many processors

2010-03-07 Thread Stefan Behnel
Martin P. Hellwig, 08.03.2010 03:08: I did read, two years or so ago, that AMD was looking in to something that does just what you say on a cpu level, that is present itself as one logical cpu but underneath there are multiple physical ones. I wouldn't hold my breath though waiting for it.

Re: Calculating very large exponents in python

2010-03-07 Thread Taskinoor Hasan
First of all, you simply can't use this straight approach of primality testing for very very big numbers. There are a number of algorithms, both deterministic and random. Please Google for them (and don't forget to check Wikipedia too). Study the random algorithms to check whether they can be

[issue7998] MacPython 2.7a3 posix_spawn error for build using --with-framework-name

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Fix in r78755 (2.7) and r78756 (3.2) (the issue doesn't affect 2.6 or 3.1 because those have another implementation of the python/pythonw command) -- resolution: - fixed stage: - committed/rejected status: open - closed

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Barry and Benjamin: IMHO this should be fixed before 2.6.5 and 3.1.2 are released, the patch is safe and works (and is already in the trunk). -- nosy: +barry, benjamin.peterson priority: - release blocker

[issue8066] OS X installer: readline module breaks when targeting on 10.5 or 10.6

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Barry: this definitely needs to be applied before 2.6.5 is released, without the patch I cannot build the mac installers. The patch disables support for libedit when targetting 10.4, which is IMHO correct because as Ned notes libedit's

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've removed 2.5 and added 3.2 because there won't be further bugfix releases of 2.5 and the issue also affects 3.2. IMHO changing this behavior is not a bugfix and is therefore out of scope for 2.6.x, in particular because this change

[issue5262] PythonLauncher considered harmfull

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I propose to at least change the code in pythonlauncher to warn if it is the default association for python files, that is to reverse the test that it currently does. That way users can still set pythonlauncher as the launcher for a

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-07 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: It has been brought up several times that ET is special in the stdlib in that it is an externally maintained package. Correct me if I'm wrong, but the rules seem to be: features come outside, adaptation to Py3 can happen inside.

[issue8083] urllib proxy interface is too limited

2010-03-07 Thread Ronald Oussoren
New submission from Ronald Oussoren ronaldousso...@mac.com: The proxy support code in urllib is imho too specific and cannot easily support dynamic proxy configuration using a proxy.pac file. That is, the code assumes that there is at most one proxy per protocol, while this is not quite true

[issue8002] on OSX the file creation date not available in os.stat

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've done some research: the st_birthtime field is available when the python executable is build using MACOSX_DEPLOYMENT_TARGET=10.5 (or later), not for 10.4. Adding support for st_birthtime for MACOSX_DEPLOYMENT_TARGET=10.4 is

[issue7072] isspace(0xa0) is true on Mac OS X

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I've attached a patch that fixes the issue and enables all test_locale tests on OSX 10.6. (I will test if the tests can also be enabled on 10.5 when applying the patch). -- keywords: +needs review, patch resolution: -

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch to restore the old usage of __int__ to convert non-integer arguments; it also produces a DeprecationWarning whenever __int__ is used in this way. For consistency and simplicity, __int__ will be tried for *any* non-integer

[issue8084] pep-0370 on osx duplicates existing functionality

2010-03-07 Thread Ronald Oussoren
New submission from Ronald Oussoren ronaldousso...@mac.com: The implementation of pep-0370 treats OSX like any other unix platform. This is problemantic for two reasons: first of all OSX already had a per-user directory before pep-0370 was implement: ~/Library/Python/X.Y, which means there

[issue8084] pep-0370 on osx duplicates existing functionality

2010-03-07 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: The attached patch is untested an implements the proposed behavior for framework builds, unix builds would keep the unix-style behavior (and would lose access to ~/Library/Python). The patch is slightly complicated by adding support

[issue8002] on OSX the file creation date not available in os.stat

2010-03-07 Thread Floris van Manen
Floris van Manen v...@klankschap.nl added the comment: On Mar 7, 2010, at 13:08, Ronald Oussoren wrote: IMO it adding this support is not worth the effort or the additional code complexity. I do agree. We have to look forwards ... F -- ___

[issue8085] PyObject_GC_VarNew should be PyObject_GC_NewVar

2010-03-07 Thread Florian Weimer
New submission from Florian Weimer f...@deneb.enyo.de: The manual mentions the wrong C function (Var and New are transposed). -- assignee: georg.brandl components: Documentation messages: 100580 nosy: fw, georg.brandl severity: normal status: open title: PyObject_GC_VarNew should be

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Updated patch, with slightly saner warnings checks. -- Added file: http://bugs.python.org/file16484/issue1530559__int__2.patch ___ Python tracker rep...@bugs.python.org

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As Florent said, it is a rule of py3k to avoid implicit encoding/decoding. The fact that it could have made sense for 2.x as well is not relevant, since the change was only done in py3k (and for good reason: we normally try not to break

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Georg can correct me if I'm wrong, but I believe we generally only rewrap lines when we change the text for some other reason. My observation was that Georg re-wraps doc text to 79 chars, so that's what I've been doing. PEP 8 really

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: David is correct, rewrapping while editing is intrusive enough. The docs should be wrapped at 79/80 characters. The reason that most files have longer lines is that the latex to rest converter tool had a flaw in the wrapping code that I didn't

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: rewrap lines when we change the text for some other reason. Doesn’t that make harder to review the real changes when they are mixed with rewrapping? PEP 8 really only applies to source files, the docs are (at least currently) Georg's

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: rewrap lines when we change the text for some other reason. Doesn’t that make harder to review the real changes when they are mixed with rewrapping? That's true. I wouldn't do it in patches I mean someone else to review. But many times it's

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: No, I meant demense (I even looked up the spelling). The word is related to domain, but has a somewhat more precise shading of meaning :) A lord's chief manor place, with that part of the lands belonging thereto which has not

[issue5341] A selection of spelling errors and typos throughout source

2010-03-07 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the new word. (I checked with my local dictd but not on the Intertubes, should have). Having designated active maintainers for modules and areas is indeed great. Cheers -- ___ Python

[issue8067] OS X Installer: build errors on 10.6 when targeting 10.4 and earlier

2010-03-07 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/3/7 Ronald Oussoren rep...@bugs.python.org: Ronald Oussoren ronaldousso...@mac.com added the comment: Barry and Benjamin: IMHO this should be fixed before 2.6.5 and 3.1.2 are released, the patch is safe and works (and is already

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Restored use of __int__ for all integer conversion codes in r78762. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1530559 ___

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Recent checkins messed up Meador Inge's __index__ patch; here's a regenerated version. -- Added file: http://bugs.python.org/file16485/issue-1530559__index__.patch ___ Python tracker

[issue7143] get_payload(decode=True) eats last newline in base64 encoded payload

2010-03-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Your patch looks good, thank you. I just realized that Barry isn't nosy on this issue. I've checked, and the code in question dates back to email version 1.0...code of that long standing that exists specifically to implement the

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-03-07 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r78766. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7173 ___

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-07 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Comments and thoughts on the __index__ patch: (1) Thank you for a remarkably complete patch! (2) For 2.x, I'm a bit uncomfortable with introducing the extra Python layer on top of the C layer. Partly I'm worried about accidentally breaking

[issue8086] ssl.get_server_certificate new line missing

2010-03-07 Thread Chris
New submission from Chris chris...@gmail.com: I'm using ssl.get_server_certificate function. It returns a pem string. For each server I try, I get the string, but it is missing a newline \n before the -END CERTIFICATE- text. Any subsequent use of the string makes openssl throw up with

  1   2   >