Re: learnpython.org - an online interactive Python tutorial

2011-04-25 Thread harrismh777
Dave Angel wrote: time echo scale = 1010; 16 * a(1/5) - 4 * a(1/239) |bc -lq Wouldn't it be shorter to say: time echo scale = 1010; 4 * a(1) |bc -lq Well, you can check it out by doing the math... (its fun...) ... you will notice that 'time' is called first, which on *nix systems

Re: learnpython.org - an online interactive Python tutorial

2011-04-25 Thread harrismh777
Steven D'Aprano wrote: It seems to me that weak typing is a Do What I Mean function, and DWIM is a notoriously bad anti-pattern that causes far more trouble than it is worth. I'm even a little suspicious of numeric coercions between integer and float. (But only a little.) I'm wondering about

Re: Vectors

2011-04-25 Thread Algis Kabaila
On Monday 25 April 2011 12:59:38 rusi wrote: On Apr 25, 4:49 am, Robert Kern robert.k...@gmail.com wrote: On 4/22/11 7:32 PM, Algis Kabaila wrote: On Saturday 23 April 2011 06:57:23 sturlamolden wrote: On Apr 20, 9:47 am, Algis Kabailaakaba...@pcug.org.au wrote: Are there any

Re: Vectors

2011-04-25 Thread Jonathan Hartley
On Apr 20, 2:43 pm, Andreas Tawn andreas.t...@ubisoft.com wrote: Algis Kabaila akaba...@pcug.org.au writes: Are there any modules for vector algebra (three dimensional vectors, vector addition, subtraction, multiplication [scalar and vector]. Could you give me a reference to such

Re: Function __defaults__

2011-04-25 Thread Colin J. Williams
On 24-Apr-11 13:07 PM, Ken Seehart wrote: On 4/24/2011 2:58 AM, Steven D'Aprano wrote: Consider this in Python 3.1: def f(a=42): ... return a ... f() 42 f.__defaults__ = (23,) f() 23 Is this an accident of implementation, or can I trust that changing function defaults in this fashion

Re: Function __defaults__

2011-04-25 Thread Ken Seehart
On 4/25/2011 4:59 AM, Colin J. Williams wrote: On 24-Apr-11 13:07 PM, Ken Seehart wrote: On 4/24/2011 2:58 AM, Steven D'Aprano wrote: Consider this in Python 3.1: def f(a=42): ... return a ... f() 42 f.__defaults__ = (23,) f() 23 Is this an accident of implementation, or can I trust

Changing baud rate doesn't allow second command

2011-04-25 Thread rjmccorkle
hi - I need to open a serial port in 9600 and send a command followed by closing it, open serial port again and send a second command at 115200. I have both commands working separately from the python command line but it won't work in the script. Any idea why? import serial from time import

Re: Changing baud rate doesn't allow second command

2011-04-25 Thread Roy Smith
In article 224f6621-2fc4-4827-8a19-3a12371f3...@l14g2000pre.googlegroups.com, rjmccorkle robert.mccor...@gmail.com wrote: hi - I need to open a serial port in 9600 and send a command followed by closing it, open serial port again and send a second command at 115200. I have both commands

Re: Changing baud rate doesn't allow second command

2011-04-25 Thread Thomas Rachel
Am 25.04.2011 14:46, schrieb rjmccorkle: hi - I need to open a serial port in 9600 and send a command followed by closing it, open serial port again and send a second command at 115200. I have both commands working separately from the python command line but it won't work in the script. Any

MIDI message sending and receiving, MID file manipulation

2011-04-25 Thread Passiday
Hello, I'd like to experiment with Python, connecting my Linux PC with MIDI device (standard synthesiser keyboard). I am pretty new to the Python world, so the questions that crop up, I assume, could be pretty basic to someone who had spent some time with it. So, here comes: 1) Is everything

Re: Function __defaults__

2011-04-25 Thread Colin J. Williams
On 25-Apr-11 08:30 AM, Ken Seehart wrote: On 4/25/2011 4:59 AM, Colin J. Williams wrote: On 24-Apr-11 13:07 PM, Ken Seehart wrote: On 4/24/2011 2:58 AM, Steven D'Aprano wrote: Consider this in Python 3.1: def f(a=42): ... return a ... f() 42 f.__defaults__ = (23,) f() 23 Is this an

Re: Argument of the bool function

2011-04-25 Thread Thomas Rachel
Am 10.04.2011 18:21, schrieb Mel: Chris Angelico wrote: Who would use keyword arguments with a function that takes only one arg anyway? It's hard to imagine. Maybe somebody trying to generalize function calls (trying to interpret some other language using a python program?) # e.g. input

Re: dict.setdefault()

2011-04-25 Thread Thomas Rachel
Am 12.04.2011 04:58, schrieb rantingrick: That's sounds good MRAB! After you mentioned this i had an epiphany... why not just add an extra argument to dict.update? dict.update(D, clobberexistingkeys=False) This is AFAICS inconsistent to the possibility to do dict.update(a, k1=v1, k2=v2).

Re: Changing baud rate doesn't allow second command

2011-04-25 Thread rjmccorkle
On Apr 25, 7:06 am, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5- a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 25.04.2011 14:46, schrieb rjmccorkle: hi - I need to open a serial port in 9600 and send a command followed by closing it, open serial port again and send a second command at

Re: learnpython.org - an online interactive Python tutorial

2011-04-25 Thread Terry Reedy
On 4/25/2011 2:20 AM, harrismh777 wrote: Steven D'Aprano wrote: It seems to me that weak typing is a Do What I Mean function, and DWIM is a notoriously bad anti-pattern that causes far more trouble than it is worth. I'm even a little suspicious of numeric coercions between integer and float.

Re: Changing baud rate doesn't allow second command

2011-04-25 Thread Thomas Rachel
Am 25.04.2011 16:41, schrieb rjmccorkle: The code is fine but it seems it won't switch baud rates using pyserial. I have to initiate the first msg in 9600 to change the setting of the gps And then send the second command in 115200 because it's in configuration mode on the unit. Ok. I can

Re: Input() in Python3

2011-04-25 Thread Mel
Westley Martínez wrote: On Fri, Apr 22, 2011 at 10:08:20AM -0400, Mel wrote: [ ... ] But sys.exit() doesn't return a string. My fave is Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import sys a =

Re: Argument of the bool function

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 12:29 AM, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: for function in actions:     results.append(function()) Can this become: results = [function() for function in actions] Chris Angelico --

Re: About threads in python

2011-04-25 Thread Hans Georg Schaathun
On Fri, 22 Apr 2011 12:19:56 -0700 (PDT), sturlamolden sturlamol...@yahoo.no wrote: : To optimise computational code, notice that Python itself : gives you a 200x performance penalty. That is much more : important than not using all 4 cores on a quadcore processor. : In this case, start by

sockets: bind to external interface

2011-04-25 Thread Hans Georg Schaathun
Is there a simple way to find the external interface and bind a socket to it, when the hostname returned by socket.gethostname() maps to localhost? What seems to be the standard ubuntu configuration lists the local hostname with 127.0.0.1 in /etc/hosts. (I checked this on two ubuntu boxen, on

Re: sockets: bind to external interface

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun h...@schaathun.net wrote: Has anyone found a simple solution that can be administered without root privileges?  I mean simpler than passing the ip address manually :-) You can run 'ifconfig' without being root, so there must be a way. At

Re: sockets: bind to external interface

2011-04-25 Thread Jean-Paul Calderone
On Apr 25, 3:49 pm, Chris Angelico ros...@gmail.com wrote: On Tue, Apr 26, 2011 at 5:37 AM, Hans Georg Schaathun h...@schaathun.net wrote: Has anyone found a simple solution that can be administered without root privileges?  I mean simpler than passing the ip address manually :-) You

Re: sockets: bind to external interface

2011-04-25 Thread Hans Georg Schaathun
On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico ros...@gmail.com wrote: : You can run 'ifconfig' without being root, so there must be a way. At : very worst, parse ifconfig's output. Of course, but I am not sure that's simpler than the manual solution. Especially since there is more than

Re: sockets: bind to external interface

2011-04-25 Thread Hans Georg Schaathun
On Mon, 25 Apr 2011 21:14:51 +0100, Hans Georg Schaathun h...@schaathun.net wrote: : : The way you talk of the external interface, I'm assuming this : : computer has only one. Is there a reason for not simply binding to : : INADDR_ANY aka 0.0.0.0? : : Ah. That's what I really wanted.

Re: sockets: bind to external interface

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 6:14 AM, Hans Georg Schaathun h...@schaathun.net wrote: :  The way you talk of the external interface, I'm assuming this :  computer has only one. Is there a reason for not simply binding to :  INADDR_ANY aka 0.0.0.0? Ah.  That's what I really wanted.  Thanks a lot.  

Re: Changing baud rate doesn't allow second command

2011-04-25 Thread rjmccorkle
On Apr 25, 10:09 am, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5- a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 25.04.2011 16:41, schrieb rjmccorkle: The code is fine but it seems it won't switch baud rates using pyserial.  I have to initiate the first msg in 9600 to change the setting of

Python login script

2011-04-25 Thread nusrath ahmed
I have written a python script that should log me in to a website. For the time being I want to login to gmail.com. My script pulls up the gmail webpage but does not input the login id and the password in the fields and does not log me in. I assume I am missing on something in my script. Can

windows 7 x64 shutdown

2011-04-25 Thread rjmccorkle
does anyone know a solution to shutting down windows 7 x64 via python script? the win32 obviously doesn't work... something similar? -- http://mail.python.org/mailman/listinfo/python-list

Re: sockets: bind to external interface

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 6:24 AM, Hans Georg Schaathun h...@schaathun.net wrote: Hmmm.  socket.INADDR_ANY is an integer and bind insists on a string for the hostname (Python 2.6).  Is there any use for the integer constant?  0.0.0.0 does exactly what I wanted though.  Thanks again. Apologies -

Re: Python login script

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 7:15 AM, nusrath ahmed nusrathah...@yahoo.com wrote: I have written a python script that should log me in to a website. For the time being I want to login to gmail.com. My script pulls up the gmail webpage but does not input the login id and the password in the fields

Re: sockets: bind to external interface

2011-04-25 Thread Thomas Rachel
Am 25.04.2011 22:14 schrieb Hans Georg Schaathun: On Tue, 26 Apr 2011 05:49:07 +1000, Chris Angelico ros...@gmail.com wrote: : The way you talk of the external interface, I'm assuming this : computer has only one. Is there a reason for not simply binding to : INADDR_ANY aka 0.0.0.0?

Re: sockets: bind to external interface

2011-04-25 Thread Thomas Rachel
Am 25.04.2011 22:30, schrieb Chris Angelico: If you don't care what port you use, you don't need to bind at all. That may be why it's not mentioned - the classic TCP socket server involves bind/listen/accept, and the classic TCP client has just connect; bind/connect is a lot less common. That

Re: Argument of the bool function

2011-04-25 Thread Thomas Rachel
Am 25.04.2011 16:29, schrieb Thomas Rachel: or maybe even better (taking care for closures): function = bool value = 'the well at the end of the world' ## ... actions.append(lambda val=value: function(val)) ## ... for function in actions: results.append(function()) Or yet even better: class

Re: sockets: bind to external interface

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 7:18 AM, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 25.04.2011 22:30, schrieb Chris Angelico: If you don't care what port you use, you don't need to bind at all. That may be why it's not mentioned - the classic TCP socket

Re: Python login script

2011-04-25 Thread Jayme Proni Filho
Look this code! Perhaps, It can help you with login. http://segfault.in/2010/12/sending-gmail-from-python/ 2011/4/25 Chris Angelico ros...@gmail.com On Tue, Apr 26, 2011 at 7:38 AM, Jayme Proni Filho listas.programa...@gmail.com wrote: I can be wrong but I think you can not login in gmail

Re: strange use of %s

2011-04-25 Thread John Nagle
On 4/18/2011 1:44 AM, Tim Golden wrote: On 18/04/2011 09:29, Tracubik wrote: Hi all, i'm reading a python tutorial in Ubuntu's Full Circle Magazine and i've found this strange use of %s: sql = SELECT pkid,name,source,servings FROM Recipes WHERE name like '%%%s% %' %response response is a

Re: Input() in Python3

2011-04-25 Thread Jayme Proni Filho
Hey! Try to use like this: http://sprunge.us/RcYb change values for understanding code. Good ideas guys! --- Jayme Proni Filho Skype: jaymeproni Twitter: @jaymeproni Phone: +55 - 17 - 3631 - 6576 Mobile: +55 -

Re: strange use of %s

2011-04-25 Thread Chris Angelico
On Tue, Apr 26, 2011 at 8:01 AM, John Nagle na...@animats.com wrote: Don't worry about having MySQL do the CONCAT.  That happens once during query parsing here, because all the arguments to CONCAT are defined in the statement. Good point. Although the abstraction is still a little leaky in

Re: windows 7 x64 shutdown

2011-04-25 Thread Irmen de Jong
On 25-4-2011 23:15, rjmccorkle wrote: does anyone know a solution to shutting down windows 7 x64 via python script? the win32 obviously doesn't work... something similar? http://goo.gl/5tVPj (a recipe on activestate, First hit on Google for 'python ctypes shutdown') Works fine on my win7 x64

Re: Argument of the bool function

2011-04-25 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes: results = [function() for function in actions] results = map(apply, actions) -- http://mail.python.org/mailman/listinfo/python-list

Re: Argument of the bool function

2011-04-25 Thread Ian Kelly
On Mon, Apr 25, 2011 at 3:28 PM, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 25.04.2011 16:29, schrieb Thomas Rachel: or maybe even better (taking care for closures): function = bool value = 'the well at the end of the world' ## ...

Simple map/reduce utility function for data analysis

2011-04-25 Thread Raymond Hettinger
Here's a handy utility function for you guys to play with: http://code.activestate.com/recipes/577676/ Raymond twitter: @raymondh -- http://mail.python.org/mailman/listinfo/python-list

Re: MIDI message sending and receiving, MID file manipulation

2011-04-25 Thread Rhodri James
On Mon, 25 Apr 2011 14:17:50 +0100, Passiday passi...@gmail.com wrote: Hello, I'd like to experiment with Python, connecting my Linux PC with MIDI device (standard synthesiser keyboard). I am pretty new to the Python world, so the questions that crop up, I assume, could be pretty basic to

Re: learnpython.org - an online interactive Python tutorial

2011-04-25 Thread Gregory Ewing
harrismh777 wrote: maybe the way to be really consistent (especially with the Zen of Python, explicit is better than implicit) that int -- float -- complex (imaginary) should not occur either ! Applying parts of the Zen selectively can be dangerous. Practicality also beats purity. I've used

Re: Argument of the bool function

2011-04-25 Thread Steven D'Aprano
On Mon, 25 Apr 2011 16:26:37 -0700, Paul Rubin wrote: Chris Angelico ros...@gmail.com writes: results = [function() for function in actions] results = map(apply, actions) Sadly not in Python 3, where map is lazy and you need to add a call to list to make it equivalent to the list comp.

Re: Simple map/reduce utility function for data analysis

2011-04-25 Thread Paul Rubin
Raymond Hettinger pyt...@rcn.com writes: Here's a handy utility function for you guys to play with: http://code.activestate.com/recipes/577676/ Cute, but why not use collections.defaultdict for the return dict? Untested: d = defaultdict(list) for key,value in

Re: Simple map/reduce utility function for data analysis

2011-04-25 Thread Steven D'Aprano
On Mon, 25 Apr 2011 16:48:42 -0700, Raymond Hettinger wrote: Here's a handy utility function for you guys to play with: http://code.activestate.com/recipes/577676/ Nice. That's similar to itertools.groupby except that it consolidates all the equal key results into one list, instead of

De-tupleizing a list

2011-04-25 Thread Gnarlodious
I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list returning a list like this?: ['0A', '1B', '2C', '3D',... -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: De-tupleizing a list

2011-04-25 Thread CM
On Apr 25, 11:28 pm, Gnarlodious gnarlodi...@gmail.com wrote: I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list returning a list like this?: ['0A', '1B', '2C', '3D',... -- Gnarlie For just

Re: De-tupleizing a list

2011-04-25 Thread Littlefield, Tyler
What is the most Pythonic way to loop through the list returning a list like this?: here's how I'd do it: i [(1, 'a'), (2, 'b'), (3, 'c')] for item in i: ... a+=list(item) ... ... a [1, 'a', 2, 'b', 3, 'c'] -- http://mail.python.org/mailman/listinfo/python-list

Re: De-tupleizing a list

2011-04-25 Thread Gnarlodious
On Apr 25, 9:42 pm, CM wrote: flat_list = [item[0] for item in returned_list] HA! So easy. Thanks. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: De-tupleizing a list

2011-04-25 Thread Philip Semanchuk
On Apr 25, 2011, at 11:28 PM, Gnarlodious wrote: I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list returning a list like this?: ['0A', '1B', '2C', '3D',... This works for me - result

Re: De-tupleizing a list

2011-04-25 Thread Paul Rubin
Gnarlodious gnarlodi...@gmail.com writes: I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list returning a list like this?: ['0A', '1B', '2C', '3D',... Try: tlist = [('0A',), ('1B',),

Re: De-tupleizing a list

2011-04-25 Thread John Connor
itertools can help you do this too: import itertools tl = [('0A',), ('1B',), ('2C',), ('3D',)] itertools.chain.from_iterable(tl) itertools.chain object at 0x11f7ad0 list(itertools.chain.from_iterable(tl)) ['0A', '1B', '2C', '3D'] Checkout

Re: De-tupleizing a list

2011-04-25 Thread Steven D'Aprano
On Mon, 25 Apr 2011 20:28:22 -0700, Gnarlodious wrote: I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list returning a list like this?: ['0A', '1B', '2C', '3D',... Others have pointed you

Re: De-tupleizing a list

2011-04-25 Thread rusi
On Apr 26, 9:59 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 25 Apr 2011 20:28:22 -0700, Gnarlodious wrote: I have an SQLite query that returns a list of tuples: [('0A',), ('1B',), ('2C',), ('3D',),... What is the most Pythonic way to loop through the list

Re: sockets: bind to external interface

2011-04-25 Thread Hans Georg Schaathun
On Mon, 25 Apr 2011 23:18:05 +0200, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: : That is right, but I cannot see where he mentions the direction of the : socket. My fist thought was that he tries to have a server socket... Quite right. I thought

[issue8040] It would be nice if documentation pages linked to other versions of the same document

2011-04-25 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8040 ___ ___ Python-bugs-list

[issue9523] Improve dbm modules

2011-04-25 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: Sorry, previous patch(issue_9523_4.diff) missed a file(Lib/test/dbm_tests.py) Here is an intact one. -- Added file: http://bugs.python.org/file21769/issue_9523_5.diff ___ Python tracker

[issue11908] Weird `slice.stop or sys.maxint`

2011-04-25 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: `step` argument for xrange() could not be 0. But `s.stop or sys.maxint` is really a problem, in the case of `s.stop == 0`. So the given `Equivalent to` python code in the doc is not precisely equivalent to the c implementation. The doc needs a fix.

[issue11912] Python shouldn't use the mprotect() system call

2011-04-25 Thread Nils Breunese
Nils Breunese n...@breun.nl added the comment: I contacted the author of iotop and he told me iotop does not use mprotect (but it does use dlopen). Guess I'll have to do some more digging to find what is exactly doing the call to mprotect. -- ___

[issue11908] Weird `slice.stop or sys.maxint`

2011-04-25 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I've got from here. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11908 ___

[issue11849] glibc allocator doesn't release all free()ed memory

2011-04-25 Thread kaifeng
kaifeng cafe...@gmail.com added the comment: Sorry for the later update. Valgrind shows there is no memory leak (see attached valgrind.log). The following code, while True: XML(gen_xml()) has an increasing memory usage in the first 5~8 iterations, and waves around a constant level

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-25 Thread ysj.ray
ysj.ray ysj@gmail.com added the comment: Guess the problem is with time.mktime() and time.localtime(). Could you debug into the Internaldate2Tuple() function and see at which step the time value(a time_struct or a float which represents seconds) is wrong? -- nosy: +ysj.ray

[issue11662] Redirect vulnerability in urllib/urllib2

2011-04-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11662 ___ ___ Python-bugs-list mailing list

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2011-04-25 Thread Jonathan Hartley
Changes by Jonathan Hartley tart...@tartley.com: -- nosy: +jonathan.hartley ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3561 ___ ___

[issue11917] Test Error

2011-04-25 Thread Hamid
New submission from Hamid abbaszade...@gmail.com: == CPython 3.2 (r32:88445, Apr 24 2011, 14:27:42) [GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] == Linux-2.6.32-71.el6.x86_64-x86_64-with-redhat-6.0-Santiago little-endian == /usr/local/src/Python-3.2/build/test_python_2976 Testing with flags:

[issue11856] Optimize parsing of JSON numbers

2011-04-25 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Patch seems OK. Please, commit. -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11856 ___

[issue11877] Change os.fsync() to support physical backing store syncs

2011-04-25 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: I'll attach 11877.4.diff: - Docu change (i hope to be better) - Kept NetBSD after looking into http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/vfs_syscalls.c?rev=1.423content-type=text/x-cvsweb-markuponly_with_tag=MAIN

[issue11917] Test Error

2011-04-25 Thread Hamid
Changes by Hamid abbaszade...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11917 ___ ___ Python-bugs-list

[issue11849] glibc allocator doesn't release all free()ed memory

2011-04-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: The MALLOC_MMAP_THRESHOLD improvement is less visible here: Are you running on 64-bit ? If yes, it could be that you're exhausting M_MMAP_MAX (malloc falls back to brk when there are too many mmap mappings). You could try with

[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault

2011-04-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Correctly merging #9319 into 3.3? No, this issue was fixed differently in Python 3.3. I see that you reverted (bb62908896fe) this merge (except the test, which is a good idea). -- ___

[issue11882] test_imaplib failed on x86 ubuntu

2011-04-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Yeah, I looked at the source of calendar.gmtime, and it turns out it ignores the isdst flag, which it also seems should be irrelevant anyway, looking at the test code again. I tried setting my /etc/localtime to

[issue11917] Test Error

2011-04-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: For the record: yes this is the way regrtest works when a test named on the command line doesn't exist. Not pretty, I'll grant you. Maybe someone will propose a patch/feature request to improve the error message some day. --

[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-25 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: Because we don't have any OS/2 and VMS maintainer for Python 3, I propose to drop OS/2 and VMS support in Python 3.3: OSes unsupported in 3.3, code removed in 3.4 (see the PEP 11 for the process). -- components:

[issue8326] Cannot import name SemLock on Ubuntu

2011-04-25 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Is this still a problem for people? Ubuntu 11.04's python2.7 has been fixed: @neurotica[~:1000]% type python2.7 python2.7 is /usr/bin/python2.7 @neurotica[~:1001]% python2.7 -c 'from _multiprocessing import SemLock' @neurotica[~:1002]% The

[issue10616] Change PyObject_AsCharBuffer() error message

2011-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: +1 to Victor's proposal (expected bytes, bytearray or buffer compatible object). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10616

[issue11919] test_imp failures

2011-04-25 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.2/builds/215/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/1223/steps/test/logs/stdio

[issue11849] glibc allocator doesn't release all free()ed memory

2011-04-25 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The MALLOC_MMAP_THRESHOLD improvement is less visible here: Are you running on 64-bit ? Yes. If yes, it could be that you're exhausting M_MMAP_MAX (malloc falls back to brk when there are too many mmap mappings). You could try with

[issue11917] Test Error

2011-04-25 Thread Hamid
Hamid abbaszade...@gmail.com added the comment: Dear sir; I will try to compile python-3.2 in REDHAT EL 6.0. There are a lot of failure in make test. How can I fix them? for example test_import, test_httpserver, Thanks Abbaszadeh On Mon, Apr 25, 2011 at 6:36 PM, R. David Murray

[issue10616] Change PyObject_AsCharBuffer() error message

2011-04-25 Thread Sijin Joseph
Sijin Joseph sijinjos...@gmail.com added the comment: Looking at object.h the buffer interface is defined as /* buffer interface */ typedef struct bufferinfo { void *buf; PyObject *obj;/* owned reference */ Py_ssize_t len; Py_ssize_t itemsize; /* This is Py_ssize_t so

[issue11917] Test Error

2011-04-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Your best resources would probably be the python mailing list (python-list, see http://mail.python.org) which is also comp.lang.python, or the #python irc channel on freenode. -- ___ Python

[issue11849] glibc allocator doesn't release all free()ed memory

2011-04-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: It isn't better. Requests above 256B are directly handled by malloc, so MALLOC_MMAP_THRESHOLD_ should in fact be set to 256 (with 1024 I guess that on 64-bit every mid-sized dictionnary gets allocated with brk). --

[issue11920] ctypes: Strange bitfield structure sizing issue

2011-04-25 Thread Steve Thompson
New submission from Steve Thompson steve.f.thomp...@gmail.com: Consider the following: import ctypes class struct1( ctypes.Structure ): _pack_ = 1 _fields_ = [ ( first, ctypes.c_uint8, 1 ), ( second, ctypes.c_uint8, 1 ),

[issue11921] distutils2 should be able to compile an Extension based on the Python implementation version

2011-04-25 Thread dholth
New submission from dholth dho...@fastmail.fm: It might be useful to be able to declare optional Extensions that for example won't attempt to compile on Jython or any implementation of Python for which the extension (a) doesn't work or (b) would be slower than the Python fallback. I suppose

[issue2736] datetime needs an epoch method

2011-04-25 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset b55eac85e39c by Alexander Belopolsky in branch 'default': Issue #2736: Documented how to compute seconds since epoch. http://hg.python.org/cpython/rev/b55eac85e39c -- nosy: +python-dev

[issue2736] datetime needs an epoch method

2011-04-25 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- components: +Documentation -Library (Lib) resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11918 ___ ___ Python-bugs-list mailing list

[issue11856] Optimize parsing of JSON numbers

2011-04-25 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset d60f9d9983bb by Antoine Pitrou in branch 'default': Issue #11856: Speed up parsing of JSON numbers. http://hg.python.org/cpython/rev/d60f9d9983bb -- nosy: +python-dev ___ Python tracker

[issue11856] Optimize parsing of JSON numbers

2011-04-25 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11856 ___

[issue11918] Drop OS/2 and VMS support in Python 3.3

2011-04-25 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11918 ___ ___

[issue11834] wrong module installation dir on Windows

2011-04-25 Thread Bryce Verdier
Bryce Verdier bryceverd...@gmail.com added the comment: Here is a patch for the documentation. I'm not quite sure about the scripts and data part. Tested with Paramiko and a new install of 2.7 to see what would happen and that was the result. -- keywords: +patch nosy: +louiscipher

[issue11922] Add General Index to Windows .chm help file Contents

2011-04-25 Thread Terry J. Reedy
New submission from Terry J. Reedy tjre...@udel.edu: The Windows distribution comes with the docs in a very nice Windows help file .chm form. When displayed, they is a left side bar with a Contents tab. The top entry is 'Python vx.y documentation' followed by 'Python Module Index' and 'What's

[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph
Sijin Joseph sijinjos...@gmail.com added the comment: Patch attached. -- keywords: +patch nosy: +sijinjoseph Added file: http://bugs.python.org/file21774/11901.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11901

[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph
Changes by Sijin Joseph sijinjos...@gmail.com: Removed file: http://bugs.python.org/file21774/11901.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11901 ___

[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph
Sijin Joseph sijinjos...@gmail.com added the comment: Fixed minor typo. -- Added file: http://bugs.python.org/file21775/11901.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11901 ___

[issue11908] Weird `slice.stop or sys.maxint`

2011-04-25 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.5, Python 2.6, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11908 ___

[issue11920] ctypes: Strange bitfield structure sizing issue

2011-04-25 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt type: - behavior versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11920

[issue11846] Remove non-guaranteed implementation details from docs.

2011-04-25 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The range of interned ints was once much smaller, but it was expanded upwards to 256 so that the bytes extracted from bytes and bytearray objects, as when indexing or iterating, would *all* be pre-allocated objects. I should presume that

[issue11920] ctypes: Strange bitfield structure sizing issue

2011-04-25 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The output is: 3 2 on windows. It is 2 2 on the linux 64bit I tried. This is consistent with what the usual compilers do on these platforms: MSVC on windows, and gcc on linux. The specification of the C language specifies that If an

  1   2   >