Re: Is there a better way to code variable number of return arguments?

2009-10-09 Thread Hendrik van Rooyen
On Thursday, 8 October 2009 18:41:31 Dr. Phillip M. Feldman wrote: I currently have a function that uses a list internally but then returns the list items as separate return values as follows: if len(result)==1: return result[0] if len(result)==2: return result[0], result[1] (and so on).

Re: Reading hex to int from a binary string

2009-10-09 Thread Luc
On Oct 9, 3:12 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Thu, 8 Oct 2009 14:52:33 -0700 (PDT), Luc luc.traonmi...@gmail.com declaimed the following in gmane.comp.python.general: On Oct 8, 11:13 pm, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: Hi all, I

Google, Bing search api wrappers for python

2009-10-09 Thread Vitaly Babiy
Does any one know of a good wrappers for both of these search engines? There seem to a few but, wondering what people experience with them. Vitaly Babiy -- http://mail.python.org/mailman/listinfo/python-list

Reading hex to int from a binary string

2009-10-09 Thread Luc
Hi all, I read data from a binary stream, so I get hex values as characters (in a string) with escaped x, like \x05\x88, instead of 0x05. I am looking for a clean way to add these two values and turn them into an integer, knowing that calling int() with base 16 throws an invalid literal

Help configuring Lamson. Multiple domains on one box

2009-10-09 Thread wattka
Is there anybody here that can help me out with some configuration issues concerning using the Lamson mail server(http:// lamsonproject.org/)? 1. I would like to use it as my main MTA 2. I would like it to mange 3 domains on one box Thanks -- http://mail.python.org/mailman/listinfo/python-list

save windows clipboard content temporarily and restore later

2009-10-09 Thread kakarukeys
Is there a way to: 1. save windows clipboard content temporarily in a variable 2. (the clipboard content is then overwritten by some other applications) 3. restore the saved data back into the clipboard. ? I've tried win32clipboard's GetClipboardData, SetClipboardData. The GetClipboardData

Re: mktime, how to handle dates before 01-01-1970 ?

2009-10-09 Thread Ben Finney
John Yeung gallium.arsen...@gmail.com writes: I think the choice of epoch is not a big deal, once you pick one far enough back. Ben Finney's suggestion to use 4004 BCE is not appreciably different (computationally) from JDN. (Though I will say that the Wikipedia link he provided doesn't

Re: save windows clipboard content temporarily and restore later

2009-10-09 Thread Neil Hodgson
kakarukeys: Restoring the data with that format could result in information loss, for example when HTML text is saved in ordinary text format. There is no format that could preserve 100% of any kind of clipboard content. Does anyone has a brilliant solution? Enumerate all the clipboard

Re: web sound recording with python

2009-10-09 Thread Michel Claveau - MVP
Hi! On windows, you can record sound who play on the local sound-card. It is not really Python scripting, but Python can launch it. @+ -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter -- the best way to make a realtime loop

2009-10-09 Thread eb303
On Oct 8, 7:15 pm, J Wolfe vorticitywo...@gmail.com wrote: Thank you both for your replies. I had something similar to this: def incr(): var.set(1 + var.get()) root.after(1000, incr) except I had an extra set of parenthesis... def incr(): var.set(1 + var.get()) root.after(1000,

Re: Most active coroutine library project?

2009-10-09 Thread Denis
On Sep 23, 10:58 pm, Brian Hammond or.else.it.gets.the.h...@gmail.com wrote: On Aug 25, 12:51 am, Denis denis.bile...@gmail.com wrote: You can also atgevent http://pypi.python.org/pypi/gevent Please, please document this!  There are a lot of people who would love to use this but give up

Re: Reading hex to int from a binary string

2009-10-09 Thread Diez B. Roggisch
Luc schrieb: On Oct 8, 11:13 pm, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: Hi all, I read data from a binary stream, so I get hex values as characters (in a string) with escaped x, like \x05\x88, instead of 0x05. I am looking for a clean way to add these two values and turn

Plotting multiple datasets with gnuplot

2009-10-09 Thread Rob Garrett
Hi, I'm trying to get gnuplot to display multiple data series on a single plot using gnuplot in python. I've searched around and haven't found a solution to how to do this when I have a variable-length list of plots to add. For example, the following code will work: plotData1 =

Tree Structure

2009-10-09 Thread Girish
Hello, Is there any python class to display the drive and folder structure as a tree(As you see in the windows explorer window)?? Thanks, Girish.. -- http://mail.python.org/mailman/listinfo/python-list

mxDateTime history (Re: mktime, how to handle dates before 01-01-1970 ?)

2009-10-09 Thread M.-A. Lemburg
John Yeung wrote: On Oct 6, 4:10 pm, Stef Mientki stef.mien...@gmail.com wrote: thanks guys, mx works a bit better Another popular Python date library is dateutil: http://labix.org/python-dateutil It gives a certain amount of credit to mxDateTime (praising it but not being

Re: Plotting multiple datasets with gnuplot

2009-10-09 Thread Gabriel Genellina
En Fri, 09 Oct 2009 06:36:45 -0300, Rob Garrett rgagarr...@gmail.com escribió: I'm trying to get gnuplot to display multiple data series on a single plot using gnuplot in python. I've searched around and haven't found a solution to how to do this when I have a variable-length list of plots

Re: Tree Structure

2009-10-09 Thread r
On Oct 9, 5:02 am, Girish girish@gmail.com wrote: Is there any python class to display the drive and folder structure as a tree(As you see in the windows explorer window)?? You could use a recursive function to print it out of course or you will need to use a GUI kit. wxPython has a tree

Re: mxDateTime history (Re: mktime, how to handle dates before 01-01-1970 ?)

2009-10-09 Thread Tim Chase
Month arithmetic is a bit of a mess, since it's not clear how to map e.g. Jan 31 + one month. Jan 31 + one month usually means add one to the month value and then keep backing off the day if you get an exception making the date, so you'd get Feb 31, exception, Feb 30, exception, Feb 29,

Re: save windows clipboard content temporarily and restore later

2009-10-09 Thread kakarukeys
On Oct 9, 11:30 am, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: kakarukeys: Restoring the data with that format could result in information loss, for example when HTML text is saved in ordinary text format. There is no format that could preserve 100% of any kind of clipboard content.

Re: Nested Menus

2009-10-09 Thread Victor Subervi
Hmm. I didn't bother to look at the comparison post. The indenting looks right to me. I reread my post and I believe my question is straight-forward. The crux of the issue is my sentence at the bottom. I believe that details what my objective is. Not sure what I should do here. I hope you can

Re: Python CherryPy TurboGears 2 project support needed [in Belgium]

2009-10-09 Thread Diez B. Roggisch
b...@creue-consulting schrieb: Dear comp.lang.python users, Firstly, this a is a Job post for a on-site Freelance Python Job in Belgium, I know this is frowned upon by some, so I am very sorry if it is not well received, but as it is such a great job, I have been encouraged to post this to the

Re: cx_Freeze.freezer.ConfigError: no initscript named Console

2009-10-09 Thread ici
On Oct 1, 2:19 pm, John j...@nospam.net wrote: cx_freeze v4.01 Python 2.6 Ubuntu Jaunty Following the example of 'cx-freeze hello.py', I'm getting the error message below. I put all of the error keywords into google and found no hits. Some people in various posts have said to use Python

Re: Nested Menus

2009-10-09 Thread Stephen Hansen
On Fri, Oct 9, 2009 at 7:13 AM, Victor Subervi victorsube...@gmail.comwrote: Hmm. I didn't bother to look at the comparison post. The indenting looks right to me. I reread my post and I believe my question is straight-forward. The crux of the issue is my sentence at the bottom. I believe that

Re: Python CherryPy TurboGears 2 project support needed [in Belgium]

2009-10-09 Thread b...@creue-consulting
Diez, Thanks for pointing this out. It maybe that we are talking about TG 1.1 in that case. I will double check with the TA. Sorry for any confusion! - I'll let you know. Thanks again. Cheers, Ben On Oct 9, 3:36 pm, Diez B. Roggisch de...@nospam.web.de wrote: b...@creue-consulting schrieb:

Re: Reading hex to int from a binary string

2009-10-09 Thread Luc
On Oct 9, 10:45 am, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: On Oct 8, 11:13 pm, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: Hi all, I read data from a binary stream, so I get hex values as characters (in a string) with escaped x, like \x05\x88, instead

Re: Nested Menus

2009-10-09 Thread Victor Subervi
Well, as sometimes happens, the response to Dennis' response caught my attention (out of context) and I didn't notice Dennis' response! Thanks for bringing it to my attention. I will look at it tonight, and follow-up tomorrow after I've had a chance to digest it and work with it. (And thank you

Zip Question

2009-10-09 Thread Victor Subervi
Hi; I have the following code: elif table[0] == 't': # This is a store subtype table bits = string.split(table, '0') sst.append(bits[2]) sstp.append(bits[1]) subtypes = dict(zip(sstp, sst)) When I print these out to screen, I get this: sst: ['doctors', 'patient'] sstp:

Re: Zip Question

2009-10-09 Thread Stephen Hansen
On Fri, Oct 9, 2009 at 10:02 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have the following code: elif table[0] == 't': # This is a store subtype table bits = string.split(table, '0') sst.append(bits[2]) sstp.append(bits[1]) subtypes = dict(zip(sstp,

Re: Zip Question

2009-10-09 Thread Chris Kaynor
On Fri, Oct 9, 2009 at 10:10 AM, Stephen Hansen apt.shan...@gmail.comwrote: On Fri, Oct 9, 2009 at 10:02 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have the following code: elif table[0] == 't': # This is a store subtype table bits = string.split(table, '0')

Re: Zip Question

2009-10-09 Thread Victor Subervi
You're right...how strange. Here's the whole code: tables = [] bst = [] bdt = [] spt = [] sst = [] sstp = [] cursor.execute('show tables;') all = cursor.fetchall() for a in all: tables.append(a[0]) for table in tables: if table[0] == 'b': # This is a basic table

Re: Zip Question

2009-10-09 Thread Stephen Hansen
Changing the line: subtypes = dict(zip(sstp, sst)) to: subtypes = dict(zip(sst, sstp)) as I believe Stephen misread it to be causes the zip operation to return: [('doctors', 'prescriptions'), ('patient', 'prescriptions')] and thus the dict will contain: {'patient': 'prescriptions',

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-09 Thread Joshua Kugler
ryniek90 wrote: So maybe someone, someday decide to put in Python an alternative, really great implementation of scanf() ? My idea of a great scanf() function would be a clever combination of re.match(), int(), and float(). j -- http://mail.python.org/mailman/listinfo/python-list

Re: Zip Question

2009-10-09 Thread Victor Subervi
So, because the results in sstp were duplicates ( ['prescriptions', 'prescriptions'] ) it only returned one result in the dict(zip()) statement. Weird. Bug or feature? ;) Thanks, V On Fri, Oct 9, 2009 at 12:37 PM, Stephen Hansen apt.shan...@gmail.comwrote: Changing the line: subtypes =

Re: Zip Question

2009-10-09 Thread Stephen Hansen
On Fri, Oct 9, 2009 at 11:04 AM, Victor Subervi victorsube...@gmail.comwrote: So, because the results in sstp were duplicates ( ['prescriptions', 'prescriptions'] ) it only returned one result in the dict(zip()) statement. Weird. Bug or feature? ;) Thanks, V Feature. zip() returned two

Python 2.5 execfile() works only once, why ?

2009-10-09 Thread Stef Mientki
hello, I'm working on a kind of IDE, to build and distribute Python programs. One of the parts is editing a build file for py2exe and running the modified script. In the script editor I've an accelerator key, to launch these tasks: - save modified script file - run modified script file -

Re: No threading.start_new_thread(), useful addition?

2009-10-09 Thread Laszlo Nagy
I personally find it much cleaner this way. Also, why should any code care in which thread it is executed? Why should I have to derive a class from some other only because I want to run one of its functions in a separate thread? I think you are right! Especially that you can (and probably

Re: Persistent Distributed Objects

2009-10-09 Thread Laszlo Nagy
I've seen evidence about this being done wrt what looks like insanely complex stuff on this list but I'm wondering if there is something to do this with any number of nodes and just farm out random classes/objects to them? Designing and opreating distributed systems is a complex thing.

Re: Python 2.5 execfile() works only once, why ?

2009-10-09 Thread Carl Banks
On Oct 9, 11:15 am, Stef Mientki stef.mien...@gmail.com wrote: hello, I'm working on a kind of IDE, to build and distribute Python programs. One of the parts is editing a build file for py2exe and running the modified script. In  the script editor I've an accelerator key, to launch these

Re: No threading.start_new_thread(), useful addition?

2009-10-09 Thread Carl Banks
On Oct 8, 5:03 am, Ulrich Eckhardt eckha...@satorlaser.com wrote: sturlamolden wrote: On 8 Okt, 09:17, Ulrich Eckhardt eckha...@satorlaser.com wrote: I'm looking at the 'threading' module and see that other than the 'thread' module it doesn't have a simple function to start a new thread.

Re: No threading.start_new_thread(), useful addition?

2009-10-09 Thread Christian Heimes
Laszlo Nagy wrote: IMHO it is much cleaner to implement this as a decorator. Pro: transparent passing of positional and keyword arguments, keeps function documentation. You are entitled to your opinion but I STRONGLY recommend against your decorator. You MUST NOT start threads a a side

easy install

2009-10-09 Thread Ethan Furman
A puzzlement: I used easy_install the other day to get xlutils on my system. It automatically installed xlrd and xlwt as well. This is cool. What's not so cool are my tracebacks. E.g. Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type help,

Re: easy install

2009-10-09 Thread David Robinow
On Fri, Oct 9, 2009 at 5:02 PM, Ethan Furman et...@stoneleaf.us wrote: A puzzlement: I used easy_install the other day to get xlutils on my system.  It automatically installed xlrd and xlwt as well.  This is cool.  What's not so cool are my tracebacks.  E.g. Python 2.5.4 (r254:67916, Dec 23

Re: Reading hex to int from a binary string

2009-10-09 Thread Diez B. Roggisch
Luc schrieb: On Oct 9, 10:45 am, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: On Oct 8, 11:13 pm, Diez B. Roggisch de...@nospam.web.de wrote: Luc schrieb: Hi all, I read data from a binary stream, so I get hex values as characters (in a string) with escaped x, like \x05\x88,

Re: smtplib.SMTPServerDisconnected: please run connect() first

2009-10-09 Thread kj
In mailman.1096.1255129309.2807.python-l...@python.org Ethan Furman et...@stoneleaf.us writes: The line preceeding it, s = smtplib.SMTP() needs to have an e-mail server specified. E.g. s = smtplib.SMTP('localhost') # from the 2.5 docs Perfect. Thanks! kynn --

Re: No threading.start_new_thread(), useful addition?

2009-10-09 Thread Ethan Furman
Christian Heimes wrote: Laszlo Nagy wrote: IMHO it is much cleaner to implement this as a decorator. Pro: transparent passing of positional and keyword arguments, keeps function documentation. You are entitled to your opinion but I STRONGLY recommend against your decorator. You MUST NOT

Re: Need feedback on subprocess-using function

2009-10-09 Thread gb345
In pan.2009.10.07.03.27.32.844...@nowhere.com Nobody nob...@nowhere.com writes: You could always lift the code from Popen._communicate(), which uses threads for Windows and select() for POSIX. Thanks. A lot of useful advice in your replies. G. --

Poll on Eval in Python

2009-10-09 Thread Kazimir Majorinc
I am Lisp programmer and I write an article on issues as macros, fexprs and eval. I want to compare opinions of programmers of various programming languages on eval. If you want to contribute your opinion on eval in Python (or you want to look at result), the adress is:

Re: Reading hex to int from a binary string

2009-10-09 Thread Jack Norton
Luc wrote: Hi all, I read data from a binary stream, so I get hex values as characters (in a string) with escaped x, like \x05\x88, instead of 0x05. I am looking for a clean way to add these two values and turn them into an integer, knowing that calling int() with base 16 throws an invalid

Re: Persistent Distributed Objects

2009-10-09 Thread bouncy...@gmail.com
Sorry about being interpreted as being vague. `et me try to narrow it down. program a creates objects b c d which each need to use 1 disk space 2 ram 3 processor time. I would like to create a heckpoint which would save the work of the object to be later used and then delete it from memory

How to find number of line that is currently executing?

2009-10-09 Thread Dr. Phillip M. Feldman
I would like to put a statement on line N of my program that prints the line number that is currently executing. This may sound fairly trivial, but I don't want to hard code the line number because N will change if lines are inserted or deleted above that point. Any advice will be appreciated. --

Re: How to find number of line that is currently executing?

2009-10-09 Thread Chris Rebert
On Fri, Oct 9, 2009 at 8:46 PM, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: I would like to put a statement on line N of my program that prints the line number that is currently executing. This may sound fairly trivial, but I don't want to hard code the line number because N will change

Are there any modules for IRC, that work with Python 3.1?

2009-10-09 Thread TerryP
Does anyone know of any modules for dealing with the IRC protocol, that will work with Python 3.1? It doens't have to be super great, just less time consuming then playing with sockets directly (and obv. stable). The only module in my systems package manager is irclib for Python 2.6. I can live

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
New submission from Jan David Mol jjd...@gmail.com: The shlex module does not function as expected in the presence of comments when newlines are not whitespace. An example (attached): from shlex import shlex lexer = shlex(a \n b) print ,.join(lexer) a,b lexer = shlex(a # comment \n b)

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Andy Balaam
Andy Balaam m...@artificialworlds.net added the comment: I am also seeing this with Python 2.5.2 on Ubuntu. -- nosy: +andybalaam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
Jan David Mol jjd...@gmail.com added the comment: Attached is a patch which fixes this for me. It basically does a fall-through using '\n' when encountering a comment. So that may be a bit of a hack (who says '\n' is the only newline char in there, and not '\r'?) but I'll leave the more

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Andy Balaam
Andy Balaam m...@artificialworlds.net added the comment: Just in case it wasn't obvious - the workaround is to create a new parser (with xml.parsers.expat.ParserCreate()) for every XML file you want to parse. -- ___ Python tracker

[issue7090] encoding uncode objects greater than FFFF

2009-10-09 Thread Mahmoud
New submission from Mahmoud sagh...@med.mui.ac.ir: Odd behaviour with str.encode or codecs.Codec.encode or simailar functions, when dealing with uncode objects above with 2.6 u'\u10380'.encode('utf') '\xe1\x80\xb80' with 3.x '\u10380'.encode('utf') '\xe1\x80\xb80' correct output must

[issue7090] encoding uncode objects greater than FFFF

2009-10-09 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If you want to specify codepoints greater than U+ you have to use u'\U': x = u'\u10380' x.encode('utf-8') '\xe1\x80\xb80' x[0] u'\u1038' x[1] u'0' y = u'\U00010380' y.encode('utf-8') '\xf0\x90\x8e\x80' -- nosy:

[issue7089] shlex behaves unexpected if newlines are not whitespace

2009-10-09 Thread Jan David Mol
Changes by Jan David Mol jjd...@gmail.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7089 ___ ___

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'm not familiar with expat, but we can see what is happening more clearly with attached adhok patch. Traceback (most recent call last): File expat-error.py, line 14, in module p.ParseFile(file) xml.parsers.expat.ExpatError:

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread Darren Worrall
Darren Worrall d...@darrenworrall.co.uk added the comment: Indeed, I'm certainly not constructing messages like that, but occasionally have to process them :) RE: the python versions, I'll remember that in future, thanks. -- ___ Python tracker

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Which syslog daemon are you using? There are some issues pending with syslog-ng and Python logging (see issue6444) and in general syslog over TCP is not necessarily all that reliable, see

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The patch is good; a test would be appreciated. The difference now is that in case of true low-memory conditions, ExpatError(no memory) is raised instead of MemoryError. This is acceptable IMO. It seems ParseFile() doesn't support

[issue1208730] expat binding for XML_ParserReset

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This (old) patch needs some work: - unit tests are neeeded. - it it not enough to return NULL when XML_ParserReset() returns an error; a python exception must be raised. - This function may not be used on a parser created using

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: No, this is not duplicate of issue5179. That issue described handle was leaked when exception occurred. But this issue is not *leak*. See following code. import subprocess, os, sys file = open(filename, w) try: proc =

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Probably we can fix this issue by calling Close() of sp_handle_type somewhere in Lib/subprocess.py, but I have no patch now. -- ___ Python tracker rep...@bugs.python.org

[issue5672] Implement a way to change the python process name

2009-10-09 Thread Martin Marcher
Changes by Martin Marcher mar...@marcher.name: -- nosy: +martin.marcher ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5672 ___ ___

[issue7091] Distutils build ignores the --compiler command line option

2009-10-09 Thread jmb
New submission from jmb jeber...@free.fr: I tried building an extension on windows with the following command: python setup.py build --compiler=mingw32 and got an error: Unable to find vcvarsall.bat. The way I understand it, that error shows that it tried to use the MSVC compiler instead of

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Well, I tried to write test like this. 1. Check if xml.parsers.expat.error is raised. 2. Compare *code* attribute of error object with xml.parsers.expat.errors.XML_ERROR_FINISHED But I noticed XML_ERROR_FINISHED is not integer but

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Looks like an implementation bug to me; far too late to change it, though. In your test, you could use pyexpat.ErrorString(e.code) == pyexpat.errors.XML_ERROR_FINISHED And the docs could mention this trick. --

[issue4428] make io.BufferedWriter observe max_buffer_size limits

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: max_buffer_size is no longer used, so this issue is obsolete ;) -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4428

[issue4555] Smelly exports

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In trunk: _add_one_to_index_C _add_one_to_index_F asdl_int_seq_new asdl_seq_new init_ast init_codecs initerrno initgc initimp initposix initpwd initsignal init_sre init_symtable initthread initxxsubtype initzipimport In py3k:

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is the patch. I'm not confident with my English comment though. -- Added file: http://bugs.python.org/file15090/pyexpat.patch ___ Python tracker rep...@bugs.python.org

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file15089/pyexpat_addhok.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: If the test suite is run with -3, many deprecation warnings are reported. Quite a few are generated by code in the tests themselves, but many are from constructs in the stdlib which are different or no longer supported in 3.x. Even

[issue7029] Improve pybench

2009-10-09 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Fixed the bug with timer = timer in trunk in revision 75293 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7029 ___

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2009-10-09 Thread Simon Cross
Simon Cross hodges...@gmail.com added the comment: The attached patch adds a simple implementation of time.timegm that calls calendar.timegm. It includes a short test to show that time.timegm(time.gmtime(ts)) == ts for various timestamps. I implemented a pure C version by pulling in the

[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: I backported xmlrpclib from Python trunk to Python 2.5 to get connected socket (HTTP/1.1), which implies to backport also httplib, ssl and socket. It works well. It's *much* faster, eg. 960 ms = 70 ms with HTTPS over a VPN. I just

[issue7093] xmlrpclib.ServerProxy() doesn't support unicode uri

2009-10-09 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Hum, it looks that the issue is not on ServerProxy.__host, but on ServerProxy.__handler. That's why my test uses http://host:port/RPC2; instead of http://host:port;. In the second case, the handler is set to the default value: /RPC2

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I don't think it's so important that tests not raises -3 warnings, but that the stdlib doesn't. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Jr Aquino
Jr Aquino jr.aqu...@citrixonline.com added the comment: Thank you for responding so quickly Vinay. I am using a multitude of syslog daemons, from syslog, syslog-ng, rsyslog, and several different proprietary SIEM/SEM Log archiving appliances. I work in the security sector. (Yes I have read

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Do you know the new context manager feature of assertRaises? it makes it easier to check for exceptions. I join a new patch that uses it. -- Added file: http://bugs.python.org/file15094/pyexpat-2.patch

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I knew existence of that new feature, but didn't know how to use it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6676 ___

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-10-09 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Hmm, looks useful. I think your patch is good. Only one problem is that we cannot use this new feature in python2.6. If we use my patch in that branch, I think there is no problem. --

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I agree with Benjamin. We shouldn't release 2.7 w/ any of the standard library itself generating a Py3kWarning, but that should not apply to the test suite. I have made this a release blocker until we can create separate issues for the modules

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-09 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: FWIW I tried to filter out the test-related warnings using the following command line, but it didn't work (nothing was filtered out): $ ./python -3 -W 'ignore::DeprecationWarning:test:0' -m test.regrtest -- nosy: +pitrou

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: Python's old-style formatting supports the use of an alternative form (specified by including a '#' in the format) for 'e', 'f' and 'g' formatting: Python 3.2a0 (py3k:75275:75276, Oct 7 2009, 20:26:36) [GCC 4.0.1 (Apple Inc. build

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'm adding 2.7. Since 2.7 and 3.2 share the same code base, I'd rather add it to both if we're going to do it at all. -- assignee: - eric.smith versions: +Python 2.7 ___ Python tracker

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Just for reference, the effect of the alternative style is explained succinctly in the C99 standard (well, the N1256 draft, anyway): For a, A, e, E, f, F, g, and G conversions, the result of converting a floating-point number always

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: @Jr Aquino: can you please test the attached alternative patch with all the various syslog daemons in Unix domain, UDP and TCP socket combinations, and post your results here? Thanks. P.S. Also available colourised at

[issue7077] SysLogHandler can't handle Unicode

2009-10-09 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7077 ___ ___

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7082 ___ ___

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-09 Thread Jr Aquino
Jr Aquino jr.aqu...@citrixonline.com added the comment: Vinay, tested on all syslog daemons/servers. Works perfectly. Thank you very much. I appreciate your time greatly. -- status: pending - open ___ Python tracker rep...@bugs.python.org

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread schlesin
New submission from schlesin schle...@cshl.edu: The documentation for the Multiprocessing.Array says: multiprocessing.Array(typecode_or_type, size_or_initializer, *, lock=True)¶ ... If lock is False then access to the returned object will not be automatically protected by a lock, so it will

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - jnoller nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Jesse Noller
Jesse Noller jnol...@gmail.com added the comment: schlesin - what platform are you on, and what version of 2.6? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095 ___

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread schlesin
schlesin schle...@cshl.edu added the comment: Happens both on Python 2.6 (r26:66714, Jul 25 2009, 11:30:23) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 and Python 2.6.1 (r261:67515, Dec 6 2008, 16:42:21) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin --

[issue7060] test_multiprocessing dictionary changed size errors and hang

2009-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Benjamin tried reverting the weakref patch, but that didn't fix it. Turns out the problem is the other patch in that merge, that adds saving of the exception to AssertRaises. Adding Kristjan as that was his patch. (The tests pass with

[issue7082] Patch for get_filename in email.message when content-disposition is missing

2009-10-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Applied to trunk in r75301, py3k in r75307, and 3.1 in r75308. Leaving open until I can backport it to 2.6. Thanks, Darren. -- resolution: - fixed stage: commit review - committed/rejected

[issue7095] Multiprocessing.Array(lock=False) fails

2009-10-09 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: Fixed in r68708 - upgrading to 2.6.2 should solve this. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7095

  1   2   >