scatterhist and resizing figures

2009-01-26 Thread perfreem
i am using scatterhist to plot some data. i find that when i plot the data and matlab shows it in the figure window, stretching the figure window (with the mouse) to enlarge it actually changes the properties of the figure. for example, making it bigger sometimes reveals more tick marks - like the

Re: Newby: how to transform text into lines of text

2009-01-26 Thread Andreas Waldenburger
On 26 Jan 2009 22:12:43 GMT Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Mon, 26 Jan 2009 16:10:11 +0100, Andreas Waldenburger wrote: On 26 Jan 2009 14:51:33 GMT Marc 'BlackJack' Rintsch bj_...@gmx.net wrote: On Mon, 26 Jan 2009 12:22:18 +, Sion Arrowsmith wrote:

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread John Machin
On Jan 27, 8:38 am, Jean-Paul Calderone exar...@divmod.com wrote: On Mon, 26 Jan 2009 13:26:56 -0800 (PST), jefm jef.mangelsch...@gmail.com wrote: As Benjamin Kaplin said, Windows terminals use the old cp1252 character set, which cannot display the euro sign. You'll either have to run it in

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread Martin v. Löwis
I was hoping to find something that allows me to print any Unicode character on the console. You will have to debug the Python interpreter to find out what's going wrong in code page 65001. Nobody has ever resolved that mystery, although it's been known for some time. If you merely want to see

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread Martin v. Löwis
IOW, the bridge might think it's in cp1252 mode, but nobody told the engine room, which is still churning out cp850. I think you must use a different font in the console, too, such as Lucida Sans Unicode. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: USB in python

2009-01-26 Thread Дамјан Георгиевски
Sorry, by USB device, I meant a device that is powered/activated by a bunch of wires that I want to control using a computer and since I had a spare USB jack lying around, I used that instead. But so far I haven't tried it, nor will try it if it wont work properly. Yes, it is not a proper USB

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread John Machin
On Jan 27, 10:00 am, Martin v. Löwis mar...@v.loewis.de wrote: IOW, the bridge might think it's in cp1252 mode, but nobody told the engine room, which is still churning out cp850. I think you must use a different font in the console, too, such as Lucida Sans Unicode. True. I was just about

Iterating through a file significantly slower when file has big buffer

2009-01-26 Thread python
I'm working with very large text files and am always looking for ways to optimize the performance of our scripts. While reviewing our code, I wondered if changing the size of our file buffers to a very large buffer size might speed up our file I/O. Intuitively, I thought that bigger buffers might

optparse with numpy.array?

2009-01-26 Thread Johan Ekh
Hi all, I'm trying to use optparse to process command line parameters given to my program. It works as I expect for the types supported by optparse, i.e. int, float, string etc. but how can I pass a numpy.array or a list to my program? I have been searching for it but cannot find a good solution.

CORRECTION: Re: Iterating through a file significantly slower when file has big buffer

2009-01-26 Thread python
Added the following lines missing from my original post: strategy1 = timer( 'Default buffer' ) strategy1.start() Code below is now complete. Malcolm SOURCE: import time # timer class class timer( object ): def __init__( self, message='' ): self.message = message def start( self

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread John Machin
On Jan 27, 9:42 am, Martin v. Löwis mar...@v.loewis.de wrote: I was hoping to find something that allows me to print any Unicode character on the console. You will have to debug the Python interpreter to find out what's going wrong in code page 65001. Nobody has ever resolved that mystery,

Re: optparse with numpy.array?

2009-01-26 Thread Robert Kern
On 2009-01-26 17:44, Johan Ekh wrote: Hi all, I'm trying to use optparse to process command line parameters given to my program. It works as I expect for the types supported by optparse, i.e. int, float, string etc. but how can I pass a numpy.array or a list to my program?

Re: Dynamic methods and lambda functions

2009-01-26 Thread Mark Wooding
Steve Holden st...@holdenweb.com writes: Mark Wooding wrote: * Assignment stores a new (reference to a) value in the variable. * Binding modifies the mapping between names and variables. I realise I have omitted what was doubtless intended to be explanatory detail, but I am having

print formating for matrix/table

2009-01-26 Thread Vincent Davis
I have a list of listsa matrix in that all sub lists are the same length. I there a nice why to prin these so that the columns and rows line up nicely? I have looked around for a good way to do this and haven't found one I am like. It seems that all involve repeating a print for each line. I

Re: print formating for matrix/table

2009-01-26 Thread Robert Kern
On 2009-01-26 18:18, Vincent Davis wrote: I have a list of listsa matrix in that all sub lists are the same length. I there a nice why to prin these so that the columns and rows line up nicely? I have looked around for a good way to do this and haven't found one I am like. It seems that all

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread Benjamin Kaplan
On Mon, Jan 26, 2009 at 5:42 PM, Martin v. Löwis mar...@v.loewis.dewrote: I was hoping to find something that allows me to print any Unicode character on the console. You will have to debug the Python interpreter to find out what's going wrong in code page 65001. Nobody has ever resolved

optparse question

2009-01-26 Thread Pat
Up until today, I never needed to pass any arguments to a Python program. I did all the requisite reading and found that I should use optparse instead of getopt. I read the documentation and since the words simple and easy often appeared in the examples and documentation, I just knew that

Re: optparse question

2009-01-26 Thread James Mills
On Tue, Jan 27, 2009 at 11:02 AM, Pat p...@junk.net wrote: (...) What does it take to pass single parameter to a program? http://docs.python.org/library/optparse.html stated that programs always have options. Is that so? What about dir /s? Sample code:

Re: optparse question

2009-01-26 Thread Robert Kern
On 2009-01-26 19:02, Pat wrote: Up until today, I never needed to pass any arguments to a Python program. I did all the requisite reading and found that I should use optparse instead of getopt. I read the documentation and since the words simple and easy often appeared in the examples and

Re: Dynamic methods and lambda functions

2009-01-26 Thread Steve Holden
Mark Wooding wrote: Steve Holden st...@holdenweb.com writes: Mark Wooding wrote: * Assignment stores a new (reference to a) value in the variable. * Binding modifies the mapping between names and variables. I realise I have omitted what was doubtless intended to be explanatory

Re: print formating for matrix/table

2009-01-26 Thread Vincent Davis
I do have numpy but am using lists as did not need any functions of array. Well maybe print now. I am new to python and don't really know the details about the difference between lists and arrays. I do know that there are different/additional functions available for arrays.Anyway is this the best

Re: print formating for matrix/table

2009-01-26 Thread Steve Holden
Vincent Davis wrote: I have a list of listsa matrix in that all sub lists are the same length. I there a nice why to prin these so that the columns and rows line up nicely? I have looked around for a good way to do this and haven't found one I am like. It seems that all involve repeating

Re: USB in python

2009-01-26 Thread Astan Chee
Brian Allen Vanderburg II wrote: This is the FT245 chip which is basically USB-to-Parallel. Chips: http://www.ftdichip.com/Products/FT245R.htm Kit/Board: http://www.ftdichip.com/Products/EvaluationKits/UM245R.htm The spec sheet for the board seems quite simple. It's pin out is similar to

Re: print formating for matrix/table

2009-01-26 Thread Robert Kern
On 2009-01-26 19:55, Steve Holden wrote: Vincent Davis wrote: I have a list of listsa matrix in that all sub lists are the same length. I there a nice why to prin these so that the columns and rows line up nicely? I have looked around for a good way to do this and haven't found one I am

Re: print formating for matrix/table

2009-01-26 Thread Robert Kern
On 2009-01-26 19:53, Vincent Davis wrote: I do have numpy but am using lists as did not need any functions of array. Well maybe print now. I am new to python and don't really know the details about the difference between lists and arrays. I do know that there are different/additional functions

Re: optparse question

2009-01-26 Thread Matimus
I did all the requisite reading and found that I should use optparse instead of getopt.   I read the documentation and since the words simple and easy often appeared in the examples and documentation, I just knew that it would be a snap to implement. I don't know where you got that. 'getopt'

Pipe stdout stderr to a TkLabel widget

2009-01-26 Thread rantingrick
I am wondering how i might pipe stdout stderr to a Tkinter Label widget. here are a few ways to set the text #-- Create a label --# label = Label(master, text='Default Text') label.pack() # -- two ways to change the text --# label['text'] = 'New Text' label.configure(text='New Text') #-- or

Re: optparse question

2009-01-26 Thread John Machin
On Jan 27, 12:02 pm, Pat p...@junk.net wrote: Up until today, I never needed to pass any arguments to a Python program. I did all the requisite reading and found that I should use optparse instead of getopt.   I read the documentation and since the words simple and easy often appeared in the

Re: print formating for matrix/table

2009-01-26 Thread Vincent Davis
I called it a matrix mostly because this is how I am visualizing it. They are full of numbers but only as representatives of students and schools. It looks like pprint will work after I read the instructions. At least I know where to look now. In the end I need to figure out how to save the data a

Re: Method returning an Iterable Object

2009-01-26 Thread Anjanesh Lekshminarayanan
But how come a raise StopIteration in the next() method doesnt need to be caught ? It works without breaking. class twoTimes: max = 10**10 def __init__(self, n): self.__n = n def next(self): if self.__n self.max: raise StopIteration self.__n *= 2

Re: ob_type in shared memory

2009-01-26 Thread Aaron Brady
Hi, Mark, Do you mind if I approach you off the group about this? Aaron On Jan 25, 9:47 pm, Mark Wooding m...@distorted.org.uk wrote: Aaron Brady castiro...@gmail.com writes: I am writing an extension using shared memory.  I need a data type that is able to reassign its 'ob_type' field

Re: Method returning an Iterable Object

2009-01-26 Thread James Mills
On Tue, Jan 27, 2009 at 1:16 PM, Anjanesh Lekshminarayanan m...@anjanesh.net wrote: But how come a raise StopIteration in the next() method doesnt need to be caught ? It works without breaking. Because this exception is specially dealt with when iterating over an iterator. The raise

shutil module (directory input)

2009-01-26 Thread klia
hello folks i am trying to tweak the current codes so that later when i call it from the terminal i can provide sourcefile and the destination file rather being fixed in the code.becuase now i have to specify the sourcefile and the destinationfile in codes and not left to be specified from the

Re: Method returning an Iterable Object

2009-01-26 Thread Terry Reedy
Anjanesh Lekshminarayanan wrote: But how come a raise StopIteration in the next() method doesnt need to be caught ? It works without breaking. The for-loop looks for and catches StopIteration. It is an essential part of what defines a finite iterator. (Note, in 3.0, next is renamed __next__

Re: shutil module (directory input)

2009-01-26 Thread James Mills
On Tue, Jan 27, 2009 at 1:48 PM, klia alwaseem307s...@yahoo.com wrote: i am trying to tweak the current codes so that later when i call it from the terminal i can provide sourcefile and the destination file rather being fixed in the code.becuase now i have to specify the sourcefile and the

Re: ob_type in shared memory

2009-01-26 Thread Aaron Brady
On Jan 26, 9:20 pm, Aaron Brady castiro...@gmail.com wrote: Hi, Mark, snip On Jan 25, 9:47 pm, Mark Wooding m...@distorted.org.uk wrote: Aaron Brady castiro...@gmail.com writes: I am writing an extension using shared memory.  I need a data type that is able to reassign its 'ob_type'

Re: optparse with numpy.array?

2009-01-26 Thread Johan Ekh
Thank you Robert, but what if I just want to create an array interactively, e.g. like m = array([1.0, 2.0, 3.0]), and pass it to my program? I tried extending optparse with a new type as explained in the link you gave me but I was not able to get it to work. Is it really neccessary follow that

Re: optparse with numpy.array?

2009-01-26 Thread James Mills
On Tue, Jan 27, 2009 at 3:45 PM, Johan Ekh ekh.jo...@gmail.com wrote: Thank you Robert, but what if I just want to create an array interactively, e.g. like m = array([1.0, 2.0, 3.0]), and pass it to my program? I tried extending optparse with a new type as explained in the link you gave me

Re: optparse with numpy.array?

2009-01-26 Thread Johan Ekh
Thank you James, but I just can't optparse to accept an array, only integers, floats ans strings. My code looks like this from optparse import OptionParser parser = OptionParser() parser.add_option('-t', '--dt', action='store', type='float', dest='dt_i', default=0.1, help='time increment where

Re: optparse with numpy.array?

2009-01-26 Thread James Mills
On Tue, Jan 27, 2009 at 4:01 PM, Johan Ekh ekh.jo...@gmail.com wrote: Thank you James, but I just can't optparse to accept an array, only integers, floats ans strings. My code looks like this from optparse import OptionParser parser = OptionParser() parser.add_option('-t', '--dt',

Re: optparse with numpy.array?

2009-01-26 Thread Robert Kern
On 2009-01-27 00:01, Johan Ekh wrote: Thank you James, but I just can't optparse to accept an array, only integers, floats ans strings. My code looks like this from optparse import OptionParser parser = OptionParser() parser.add_option('-t', '--dt', action='store', type='float', dest='dt_i',

Re: unable to print Unicode characters in Python 3

2009-01-26 Thread Martin v. Löwis
Well, the first step would be to tell Python that there is a code page 65001. On Python 2.6, I get a LookupError for an unknown encoding after doing chcp 65001. I checked the list of aliases in Python 3 and there was no entry for cp65001. I see. What happens if you add it to

How do I say two classes up in the inheritance chain in python?

2009-01-26 Thread Daniel Fetchinson
I have two classes that both inherit from two other classes which both inherit from a single class. The two children have two almost identical methods: class grandparent( object ): def meth( self ): # do something class parent1( grandparent ): def meth( self ): # do

[issue4707] round(25, 1) should return an integer, not a float

2009-01-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Clearer title. -- title: round() shows undocumented behaviour - round(25, 1) should return an integer, not a float ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4707

[issue4707] round(25, 1) should return an integer, not a float

2009-01-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Some minor modifications to the last patch: - fix round docstring: it now reads round(number[, ndigits]) - number instead of round(number[, ndigits]) - floating-point number - add Misc/NEWS entry - add extra tests for round(x, n) with

[issue5068] tarfile loops forever on broken input

2009-01-26 Thread Maciek Fijalkowski
New submission from Maciek Fijalkowski fi...@genesilico.pl: I have troubles actually finding such a file, but I encountered it at least once (file is gone by now though). The lines in question are for bz2 compression: in _BZ2Proxy.read: try: raw =

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2009-01-26 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5057 ___ ___ Python-bugs-list

[issue4676] python3 closes + home keys

2009-01-26 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: Just got a chance to test this on a Windows desktop with a proper keyboard. (My laptop does weird things with num-lock and scroll-lock.) I got it to crash once, but I have no idea what was special about that time. Otherwise I can reproduce

[issue5068] tarfile loops forever on broken input

2009-01-26 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5068 ___

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2009-01-26 Thread Paolo 'Blaisorblade' Giarrusso
Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment: Probably #if the definitions of Py_LIKELY and Py_UNLIKELY instead of __builtin_expect so new compilers can easily add their own definitions. This was done in the first version, but with the currently supported compilers

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Steven D'Aprano
Changes by Steven D'Aprano st...@pearwood.info: -- components: +Library (Lib) type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067 ___

[issue1722344] Thread shutdown exception in Thread.notify()

2009-01-26 Thread Qiangning Hong
Changes by Qiangning Hong hon...@gmail.com: -- nosy: +hongqn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1722344 ___ ___ Python-bugs-list

[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2009-01-26 Thread Mike Watkins
Changes by Mike Watkins pyt...@mikewatkins.ca: -- title: http.client.HTTPMessage.getallmatchingheaders() - http.client.HTTPMessage.getallmatchingheaders() always returns [] ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053

[issue5069] Use sets instead of list in posixpath._resolve_link

2009-01-26 Thread Χρήστος Γεωργίου (Christos Georgiou)
New submission from Χρήστος Γεωργίου (Christos Georgiou) t...@users.sourceforge.net: The paths_seen object is a list; a set is more appropriate, since its main use is a lookup as in path in paths_seen -- components: Library (Lib) files: posixpath.diff keywords: patch messages: 80570

[issue4753] Faster opcode dispatch on gcc

2009-01-26 Thread Paolo 'Blaisorblade' Giarrusso
Paolo 'Blaisorblade' Giarrusso p.giarru...@gmail.com added the comment: -fno-gcse is controversial. Even if it might avoid jumps sharing, the impact of that option has to be measured, since common subexpression elimination allows omitting some recalculations, so disabling global CSE might have a

[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2009-01-26 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: Dumb question, but why is distutils wrapping the command args in quotes anyway? I'm not even sure why lists are being used (rather than a string) for the options, except that lists are a bit more Pythony and can be used to semantically divide

[issue4753] Faster opcode dispatch on gcc

2009-01-26 Thread Kevin Watters
Changes by Kevin Watters kevinwatt...@gmail.com: -- nosy: +kevinwatters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___

[issue5070] Distutils should create install dir if needed

2009-01-26 Thread Andy Buckley
New submission from Andy Buckley a...@insectnation.org: If you attempt to call python setup.py install --prefix=/foo, and /foo/lib/pythonX.Y/site-packages does not exist, the installation will fail, requiring that the directory be made by hand. Since there is no easy way to know in advance

[issue5070] Distutils should create install dir if needed

2009-01-26 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: This isn't accurate. distutils *will* create the directory if it does not exist. Perhaps you have setuptools installed? setuptools disables this behavior of distutils and forces you to create the directory manually. -- nosy:

[issue4705] python3.0 -u: unbuffered stdout

2009-01-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It's not about changing it, stdin has always been buffered in py3k. Sorry: I should have been clearer. It's the change from 2.x to 3.x that interests me. So 'python3.0 -u' has buffered stdin, while 'python2.6 -u' does not; I'm

[issue5071] Distutils should not fail if install dir is not in PYTHONPATH

2009-01-26 Thread Andy Buckley
New submission from Andy Buckley a...@insectnation.org: At present, distutils exits with an error return code if the directory that modules are being installed into is not in PYTHONPATH. Since the install path is not easily obtained (it at least requires running Python to work out the version

[issue5071] Distutils should not fail if install dir is not in PYTHONPATH

2009-01-26 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: See my comment on issue5070. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5071 ___

[issue4474] PyUnicode_FromWideChar incorrect for characters outside the BMP (unix only)

2009-01-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @marketdickinson, @lemburg: ping! I updated the patch, does it look better? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4474 ___

[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-01-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ping! Can anyone review my patch? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4626 ___ ___

[issue4010] configure options don't trickle down to distutils

2009-01-26 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: Attached patch changes distutils to pass CPPFLAGS to compiler. -- nosy: +tarek Added file: http://bugs.python.org/file12868/issue4010.diff ___ Python tracker rep...@bugs.python.org

[issue4010] configure options don't trickle down to distutils

2009-01-26 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- assignee: - tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list

[issue1885] [distutils] - error when processing the --formats=tar option

2009-01-26 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: done (in r68969 for py3k branch) -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1885 ___

[issue5070] Distutils should create install dir if needed

2009-01-26 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5070 ___ ___ Python-bugs-list mailing

[issue5071] Distutils should not fail if install dir is not in PYTHONPATH

2009-01-26 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5071 ___ ___ Python-bugs-list mailing

[issue5070] Distutils should create install dir if needed

2009-01-26 Thread Andy Buckley
Andy Buckley a...@insectnation.org added the comment: Thanks for the rapid feedback: yes, I am using setuptools and didn't realise it would be responsible for this override. Is setuptools feedback done completely independently from this tracker? ___ Python

[issue1529142] Allowing multiple instances of IDLE with sub-processes

2009-01-26 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: A thought occurs to me: would this patch make it harder to cope with awkward firewalls that block the connection? Are they more or less likely to intervene when passing a port of 0 and letting it pick a port automatically? And if they do

[issue5070] Distutils should create install dir if needed

2009-01-26 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Yea. setuptools is often discussed on distutils-sig: http://www.python.org/community/sigs/current/distutils-sig/ And has an issue tracker of its own: http://bugs.python.org/setuptools/ http://bugs.python.org/setuptools/issue54

[issue5061] Inadequate documentation of the built-in function open

2009-01-26 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: (prospective, not perspective programmer) Spelling out the possibilities as suggested in Message80563 makes better sense to me than writing in words the logic handling the mode argument of the io.open function. (Perhaps there is a

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Collin Winter
Changes by Collin Winter coll...@gmail.com: -- nosy: +collinwinter ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___ ___ Python-bugs-list

[issue5072] urllib.open sends full URL after GET command instead of local path

2009-01-26 Thread Olemis Lang
New submission from Olemis Lang ole...@gmail.com: Hello ... The first thing I have to say is that I searched the open issues and I found nothing similar to what I am going to report hereinafter. If this ticket is duplicate , I apologize ... Yesterday I was testing how to access the wiki

[issue5068] tarfile loops forever on broken input

2009-01-26 Thread Lars Gustäbel
Lars Gustäbel l...@gustaebel.de added the comment: Thanks for the report. The problem is in fact easy to reproduce. _BZ2Proxy hangs if it is passed a file object with either no data or with a partial bzipped file. For example try: tarfile.open(mode=r:bz2, fileobj=StringIO.StringIO()) I will

[issue5072] urllib.open sends full URL after GET command instead of local path

2009-01-26 Thread Olemis Lang
Olemis Lang ole...@gmail.com added the comment: Ooops ... sorry, remove the print statement. The patch is as follows : {{{ #!diff --- /usr/lib/python2.5/urllib.py2008-07-31 13:40:40.0 -0500 +++ /media/urllib_unix.py 2009-01-26 09:48:54.0 -0500 @@ -270,6 +270,7 @@

[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error

2009-01-26 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: time.time() returns floating point, so sometimes folloing assertion in LockingTestCase#test03_lock_timeout fails due to floating point calculation error. self.assertTrue((end_time-start_time) = 0.1 end_time-start_time becomes

[issue4705] python3.0 -u: unbuffered stdout

2009-01-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So 'python3.0 -u' has buffered stdin, while 'python2.6 -u' does not; I'm wondering: was this an intentional design change? Or was it just an accident/by-product of the rewritten io? I'm not sure (I didn't write the new io in the first place)

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Reminder, make sure we can still break out of a while 1: pass. -- nosy: +rhettinger versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org

[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error

2009-01-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Looks good to me! If it were me I'd probably just code the test directly as self.assertTrue((end_time-start_time) = 0.0999) to avoid having to look for epsilon when reading. Do you want to commit it or shall I? -- nosy:

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Reminder, make sure we can still break out of a while 1: pass. Yes, the patch takes care of that. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459

[issue4705] python3.0 -u: unbuffered stdout

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - pitrou resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4705 ___

[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error

2009-01-26 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Could you commit please? :-) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5073 ___ ___

[issue5066] IDLE documentation for Unix obsolete/incorrect

2009-01-26 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: LOL. That doc was apparently last revised in 2000 for the IDLE released with 1.5.2 (see screenshot). Other needed updates I see are: 'Shell' and 'Options' have been added to the menu line; we now have unicode text; screenshots look different

[issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error

2009-01-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Fixed in r68978 (trunk) and r68979 (2.6). bsddb is no longer part of the standard Python distribution for 3.x, so the patch doesn't apply there. Thank you! -- resolution: accepted - fixed status: open - closed

[issue4705] python3.0 -u: unbuffered stdout

2009-01-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed and applied a small fix to the test so that it passes in debug mode (r68977, r68981, r68982). Thanks! -- resolution: accepted - fixed status: open - closed ___ Python tracker

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patches don't apply cleanly anymore, I'll regenerate a new one. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file10147/loops8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9871/loops7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9863/loops5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9832/loops4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue2459] speedup for / while / if with better bytecode

2009-01-26 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file9829/loops3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2459 ___

[issue4285] Use a named tuple for sys.version_info

2009-01-26 Thread Ross Light
Ross Light rlig...@gmail.com added the comment: Tests added and new patch uploaded. Anything else, anyone? Added file: http://bugs.python.org/file12870/patch-4285d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4285

[issue5072] urllib.open sends full URL after GET command instead of local path

2009-01-26 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I could not reproduce this issue neither with Python 2.6 nor 2.5.2 If I print host and selector near line 313, I get 'localhost:8000' and '/trac-dev', the expected results. Do you have an HTTP proxy? running at the *same* port? (!)

[issue4673] Distutils should provide an uninstall command

2009-01-26 Thread philobyte
philobyte peter.a.si...@gmail.com added the comment: python setup.py uninstall should do all the same processing as 'install' but whenever it gets to the point of copying a file to a system destination, it should instead unlink the destination. besides the obvious use, here is another one:

[issue5069] Use sets instead of list in posixpath._resolve_link

2009-01-26 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: Simple and correct. -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5069 ___

[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2009-01-26 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: I think unified diffs are preferred. Isn't there an existing test for this method? -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5053

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: This patch provides a better error message for this case:: json.loads({'test': test}) but still doesn't help in this one:: json.loads({test: 'test'}) 'test' looks like garbage to JSON (it *is* garbage!), exactly the same as::

[issue5067] Error msg from using wrong quotes in JSON is unhelpful

2009-01-26 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- keywords: +patch Added file: http://bugs.python.org/file12871/json-messages.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5067

<    1   2   3   >