[ANN] Zato 1.1 - ESB and app server in Python

2013-06-03 Thread Dariusz Suchojad
Hello, I'm very happy to let you know that Zato 1.1 has just been released. *What is Zato* -- Zato is a lightweight, yet complete, ESB (Enterprise Service Bus) and app server in Python designed for creating middleware applications and systems of systems. Zato is open-source

[ANN] Training: Advanced Python at EuroPython, Florence, July 6 - 7, 2013

2013-06-03 Thread Mike Müller
Advanced Python === What: Advanced Python - Who is afraid of metaclasses? When: July 6 - 7, 2013 Where: at EuroPython 2013, Florence, Italy Instructor: Mike Müller (eight years of Python training experience) Details: https://ep2013.europython.eu/conference/talks/advanced-python-2 You

ANN: PyTables 3.0

2013-06-03 Thread Antonio Valentino
=== Announcing PyTables 3.0.0 === We are happy to announce PyTables 3.0.0. PyTables 3.0.0 comes after about 5 years from the last major release (2.0) and 7 months since the last stable release (2.4.0). This is new major release and an important

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Νικόλαος Κούρας
Thankls Michael, are these two behave the same in your opinion? sys.stdout = os.fdopen(1, 'w', encoding='utf-8') which is what i have now opposed to this one import ocdecs sys.stdout = codecs.getwriter(utf-8)(sys.stdout.detach()) Which one should i keep and why? --

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Steven D'Aprano
On Sun, 02 Jun 2013 22:05:28 -0700, Νικόλαος Κούρας wrote: Why subprocess fails when it has to deal with a greek flename? and that an indirect call too It doesn't. The command you are calling fails, not subprocess. The code you show is this: /home/nikos/public_html/cgi-bin/metrites.py

Re: Python Heisenbugs? (was: Re: PyWart: The problem with print)

2013-06-03 Thread Devin Jeanpierre
On Mon, Jun 3, 2013 at 12:34 AM, Dan Sommers d...@tombstonezero.net wrote: On Mon, 03 Jun 2013 13:37:27 +1000, Tim Delaney wrote: With the increase in use of higher-level languages, these days Heisenbugs most often appear with multithreaded code that doesn't properly protect critical

Re: PyWart: The problem with print

2013-06-03 Thread Chris Angelico
On Mon, Jun 3, 2013 at 3:49 PM, Michael Torrie torr...@gmail.com wrote: On 06/02/2013 12:18 PM, Rick Johnson wrote: On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico wrote: On Mon, Jun 3, 2013 at 3:04 AM, Rick Johnson [...] Or use

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Chris Angelico
On Mon, Jun 3, 2013 at 4:46 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Then, when you try to read the file names in UTF-8, you hit an illegal byte, half of a surrogate pair perhaps, and everything blows up. Minor quibble: Surrogates are an artifact of UTF-16, so they're

Interactive interpreter hooks

2013-06-03 Thread Steven D'Aprano
The sys module defines two hooks that are used in the interactive interpreter: * sys.displayhook(value) gets called with the result of evaluating the line when you press ENTER; * sys.excepthook(type, value, traceback) gets called with the details of the exception when your line raises an

Re: PyWart: The problem with print

2013-06-03 Thread Alister
On Mon, 03 Jun 2013 17:17:12 +1000, Chris Angelico wrote: On Mon, Jun 3, 2013 at 3:49 PM, Michael Torrie torr...@gmail.com wrote: On 06/02/2013 12:18 PM, Rick Johnson wrote: On Sunday, June 2, 2013 12:49:02 PM UTC-5, Dan Sommers wrote: On Mon, 03 Jun 2013 03:20:52 +1000, Chris Angelico

Re: PyWart: The problem with print

2013-06-03 Thread Mark Lawrence
On 03/06/2013 04:10, Dan Sommers wrote: On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote: ... If you don't believe me, you've never hit a bug that 'magically' disappears when you add a debugging print statement ;-). Ah, yes. The Heisenbug. ;-) We used to run into those back in the

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Mark Lawrence
On 03/06/2013 07:11, Νικόλαος Κούρας wrote: Thankls Michael, are these two behave the same in your opinion? sys.stdout = os.fdopen(1, 'w', encoding='utf-8') which is what i have now opposed to this one import ocdecs sys.stdout = codecs.getwriter(utf-8)(sys.stdout.detach()) Which one should

Re: Interactive interpreter hooks

2013-06-03 Thread Fábio Santos
On 3 Jun 2013 09:04, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The sys module defines two hooks that are used in the interactive interpreter: * sys.displayhook(value) gets called with the result of evaluating the line when you press ENTER; * sys.excepthook(type, value,

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Chris Angelico
On Mon, Jun 3, 2013 at 7:00 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 03/06/2013 07:11, Νικόλαος Κούρας wrote: Thankls Michael, are these two behave the same in your opinion? sys.stdout = os.fdopen(1, 'w', encoding='utf-8') which is what i have now opposed to this one import

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Νικόλαος Κούρας
Τη Δευτέρα, 3 Ιουνίου 2013 9:46:46 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: If I am right, the solution is to fix the file names to ensure that they are all valid UTF-8 names. If you view the directory containing these files in a file browser that supports UTF-8, do you see any file

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Νικόλαος Κούρας
Here is the whole code of files.py in case someone wants to comment on somethign about how to properly encode/decode the filanames, which seems to be the problem. http://pastebin.com/qXasy5iU -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: The problem with print

2013-06-03 Thread Robert Kern
On 2013-06-03 05:20, Dan Sommers wrote: On Sun, 02 Jun 2013 23:23:42 -0400, Jason Swails wrote: ... (And yes, a good portion of our code is -still- in Fortran -- but at least it's F90+ :). I am a huge proponent of using the right tool for the job. There is nothing wrong with some

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-03 Thread Joshua Landau
On 3 June 2013 04:18, Chris Angelico ros...@gmail.com wrote: On Mon, Jun 3, 2013 at 12:30 PM, alex23 wuwe...@gmail.com wrote: On Jun 1, 10:24 am, Chris Angelico ros...@gmail.com wrote: Hmm. What other MUD commands have obvious Unix equivalents? say -- echo emote -- python -c attack -- sudo

Extract UTFGrid from MBTiles database

2013-06-03 Thread Carmen Campos Bordons
I would appreciate any help or comment. The idea is to create a server in python that serves maps on the internet. The maps have to be in MBTiles format, which is a SQLite database that store all the map tiles in a single file. Taking this as an example

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread rusi
On Jun 3, 2:12 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: You are right Steven, i just renames the file 'Euxi tou Ihsou.mp3' = 'Eõ÷Þ ôïõ Éçóïý.mp3' and… Is that how you renamed your file? In any case thats what I see!! [Dont whether to say: Its greek to me or its not greek to me!!] --

Re: PyWart: The problem with print

2013-06-03 Thread Dave Angel
On 06/03/2013 04:49 AM, Mark Lawrence wrote: On 03/06/2013 04:10, Dan Sommers wrote: On Sun, 02 Jun 2013 20:16:21 -0400, Jason Swails wrote: ... If you don't believe me, you've never hit a bug that 'magically' disappears when you add a debugging print statement ;-). Ah, yes. The Heisenbug.

Re: Interactive interpreter hooks

2013-06-03 Thread Terry Jan Reedy
On 6/3/2013 3:55 AM, Steven D'Aprano wrote: The sys module defines two hooks that are used in the interactive interpreter: * sys.displayhook(value) gets called with the result of evaluating the line when you press ENTER; * sys.excepthook(type, value, traceback) gets called with the details of

Re: Interactive interpreter hooks

2013-06-03 Thread Robert Kern
On 2013-06-03 08:55, Steven D'Aprano wrote: The sys module defines two hooks that are used in the interactive interpreter: * sys.displayhook(value) gets called with the result of evaluating the line when you press ENTER; * sys.excepthook(type, value, traceback) gets called with the details of

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread nagia . retsina
Τη Δευτέρα, 3 Ιουνίου 2013 3:54:30 μ.μ. UTC+3, ο χρήστης rusi έγραψε: Is that how you renamed your file? In any case thats what I see! [Dont whether to say: Its greek to me or its not greek to me!!] Now! that weird again. I rename sit using proper Greek letters but as it appears to you it

Re: How to get an integer from a sequence of bytes

2013-06-03 Thread Grant Edwards
On 2013-06-03, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen mok-kong.s...@t-online.de declaimed the following in gmane.comp.python.general: b'7' is the byte with the character 7 in a certain code, so that's ok. In other PLs one assigns an

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-03 Thread Walter Hurry
On Sun, 02 Jun 2013 14:41:45 +1000, Chris Angelico wrote: Nikos just needs to learn the skill of figuring out where his problems really are. Between the keyboard and the chair, obv. -- http://mail.python.org/mailman/listinfo/python-list

RE: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot

2013-06-03 Thread Carlos Nepomuceno
Date: Sun, 2 Jun 2013 13:43:24 -0700 Subject: Re: [Python-Dev] New FreeBSD 10.0-CURRENT buildbot From: drsali...@gmail.com To: carlosnepomuc...@outlook.com CC: python-...@python.org On Sun, Jun 2, 2013 at 12:51 PM, Carlos Nepomuceno

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-03 Thread nagia . retsina
Τη Δευτέρα, 3 Ιουνίου 2013 5:35:46 μ.μ. UTC+3, ο χρήστης Walter Hurry έγραψε: On Sun, 02 Jun 2013 14:41:45 +1000, Chris Angelico wrote: Nikos just needs to learn the skill of figuring out where his problems really are. Between the keyboard and the chair, obv. Maybe you should

Re: Apache and suexec issue that wont let me run my python script

2013-06-03 Thread Anssi Saari
Νικόλαος Κούρας nikos.gr...@gmail.com writes: [code] root@nikos [/home/nikos/www/cgi-bin]# chmod g+w /var/log/httpd/suexec.log root@nikos [/home/nikos/www/cgi-bin]# ls -l /var/log/httpd/suexec.log -rw-rw-r-- 1 root root 0 Jun 1 02:52 /var/log/httpd/suexec.log [/code] and still iam

Pillow lib for x86_64 GNU/Linux

2013-06-03 Thread consultski
It is great that Pillow wants to be setuptools compatible but without a suitable compiled library for x86_64 GNU/Linux, I am stuck between a rock and a hard place. Any suggestions? -- http://mail.python.org/mailman/listinfo/python-list

Re: Pillow lib for x86_64 GNU/Linux

2013-06-03 Thread Irmen de Jong
On 3-6-2013 18:23, consult...@gmail.com wrote: It is great that Pillow wants to be setuptools compatible but without a suitable compiled library for x86_64 GNU/Linux, I am stuck between a rock and a hard place. Any suggestions? Try your distribution's package repository. $ sudo apt-get

Re: PyWart: The problem with print

2013-06-03 Thread Ian Kelly
On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails jason.swa...@gmail.com wrote: I'm actually with RR in terms of eliminating the overhead involved with 'dead' function calls, since there are instances when optimizing in Python is desirable. I actually recently adjusted one of my own scripts to

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-03 Thread Ian Kelly
On May 31, 2013 6:27 PM, Chris Angelico ros...@gmail.com wrote: Yeah. I know that particular one because I have l aliased to ls -CF (aka --columns --classify), mainly because it came that way as a commented-out entry in my first Debian. Have since become quite accustomed to it; to me, 'l'

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-03 Thread Michael Torrie
On 06/03/2013 09:01 AM, nagia.rets...@gmail.com wrote: Maybe you should tell us how you find out yours. Chris and others have told you how they go about solving their problems. Quite a few times. In fact repeating themselves even. I think we've run out of different ways to saying it now.

Re: PyWart: The problem with print

2013-06-03 Thread Jason Swails
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails jason.swa...@gmail.com wrote: I'm actually with RR in terms of eliminating the overhead involved with 'dead' function calls, since there are instances when optimizing in

Re: PyWart: The problem with print

2013-06-03 Thread Jason Swails
On Mon, Jun 3, 2013 at 1:12 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Jun 2, 2013 at 6:16 PM, Jason Swails jason.swa...@gmail.com wrote: I'm actually with RR in terms of eliminating the overhead involved with 'dead' function calls, since there are instances when optimizing in

Re: PyWart: The problem with print

2013-06-03 Thread Jason Swails
ack, sorry for the double-post. -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 2.7.5

2013-06-03 Thread John Nagle
On 5/15/2013 9:19 PM, Benjamin Peterson wrote: It is my greatest pleasure to announce the release of Python 2.7.5. 2.7.5 is the latest maintenance release in the Python 2.7 series. Thanks very much. It's important that Python 2.x be maintained. 3.x is a different language, with

THRINAXODON MURDERS THE ATHEISTS OF REDVILLE.

2013-06-03 Thread Thrinaxodon
THRINAXODON SECRETLY STALKS THE ATHEISTS OF REDVILLE. NOW, THRINAXODON PUNCHES RABBIT HOLE IN HIS FACE. HE SLAUGHTERED DAVID IAIN GREIG, WITH A ROUNDHOUSE KICK. HE BEAT HARRIS TO DEATH, AND SENT FIRE TO DR. NYIKOS. NOW, RICHARD DAWKINS SETS OUT WITH FIRE, TO HUNT THRINAXODON. THRINAOXDON USES

Re: PyWart: The problem with print

2013-06-03 Thread Steven D'Aprano
On Mon, 03 Jun 2013 15:09:48 -0400, Jason Swails wrote: But unlike RR, who suggests some elaborate interpreter-wide, ambiguous ignore-rule to squash out all of these functions, I'm simply suggesting that sometimes it's worth commenting-out debug print calls instead of 'just leaving them there

Re: PyWart: The problem with print

2013-06-03 Thread Chris Angelico
On Tue, Jun 4, 2013 at 6:31 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: ... quite frankly I have no sympathy for the view that CPU cycles are so precious that we mustn't waste them. If that were the case, Python is the wrong language. CPU cycles *are* valuable still,

Re: How to get an integer from a sequence of bytes

2013-06-03 Thread Dave Angel
On 06/03/2013 10:31 AM, Grant Edwards wrote: On 2013-06-03, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen mok-kong.s...@t-online.de declaimed the following in gmane.comp.python.general: b'7' is the byte with the character 7 in a certain

RE: Apache and suexec issue that wont let me run my python script

2013-06-03 Thread Carlos Nepomuceno
From: a...@sci.fi Subject: Re: Apache and suexec issue that wont let me run my python script Date: Mon, 3 Jun 2013 18:20:00 +0300 To: python-list@python.org Νικόλαος Κούρας nikos.gr...@gmail.com writes: [code] root@nikos [/home/nikos/www/cgi-bin]#

Re: How to get an integer from a sequence of bytes

2013-06-03 Thread Grant Edwards
On 2013-06-03, Dave Angel d...@davea.name wrote: On 06/03/2013 10:31 AM, Grant Edwards wrote: On 2013-06-03, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 02 Jun 2013 21:25:45 +0200, Mok-Kong Shen mok-kong.s...@t-online.de declaimed the following in gmane.comp.python.general: b'7'

RE: Source code as text/plain

2013-06-03 Thread Carlos Nepomuceno
Date: Mon, 3 Jun 2013 09:06:46 +1000 From: c...@zip.com.au To: c...@rebertia.com [...] http://hg.python.org/cpython/raw-file/tip/Lib/string.py What's the 'tip' tag? --

Re: How to get an integer from a sequence of bytes

2013-06-03 Thread Dan Stromberg
On Mon, Jun 3, 2013 at 7:31 AM, Grant Edwards invalid@invalid.invalidwrote: That's a common assumption, but historically, a byte was merely the smallest addressable unit of memory. The size of a byte on widely used used CPUs ranged from 4 bits to 60 bits. Quoting from

RE: [RELEASED] Python 2.7.5

2013-06-03 Thread Carlos Nepomuceno
From: na...@animats.com Subject: Re: [RELEASED] Python 2.7.5 Date: Mon, 3 Jun 2013 12:20:43 -0700 [...] 3.x is a different language, with different libraries, and lots of things that still don't work. Many old applications will never be converted.

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Steven D'Aprano
(Note: this post is sent using UTF-8. If anyone reading this sees mojibake, please make sure your email or news client is set to use UTF-8.) On Mon, 03 Jun 2013 05:54:30 -0700, rusi wrote: On Jun 3, 2:12 pm, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: You are right Steven, i just renames

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Steven D'Aprano
On Mon, 03 Jun 2013 02:12:31 -0700, Νικόλαος Κούρας wrote: Τη Δευτέρα, 3 Ιουνίου 2013 9:46:46 π.μ. UTC+3, ο χρήστης Steven D'Aprano έγραψε: If I am right, the solution is to fix the file names to ensure that they are all valid UTF-8 names. If you view the directory containing these files

Re: [RELEASED] Python 2.7.5

2013-06-03 Thread Chris Angelico
On Tue, Jun 4, 2013 at 8:37 AM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: From: na...@animats.com Subject: Re: [RELEASED] Python 2.7.5 Date: Mon, 3 Jun 2013 12:20:43 -0700 [...] 3.x is a different language, with different libraries, and

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Steven D'Aprano
On Mon, 03 Jun 2013 02:32:42 -0700, Νικόλαος Κούρας wrote: Here is the whole code of files.py in case someone wants to comment on somethign about how to properly encode/decode the filanames, which seems to be the problem. http://pastebin.com/qXasy5iU Second line in the file says: import

Re: [RELEASED] Python 2.7.5

2013-06-03 Thread Mark Lawrence
On 03/06/2013 23:37, Carlos Nepomuceno wrote: From: na...@animats.com Subject: Re: [RELEASED] Python 2.7.5 Date: Mon, 3 Jun 2013 12:20:43 -0700 [...] 3.x is a different language, with different libraries, and lots of things that still don't work. Many

RE: How to get an integer from a sequence of bytes

2013-06-03 Thread Carlos Nepomuceno
Date: Mon, 3 Jun 2013 15:41:41 -0700 Subject: Re: How to get an integer from a sequence of bytes From: drsali...@gmail.com To: python-list@python.org [...] Today though, it would be difficult to sell a conventional (Von Neumann) computer that didn't

Re: Apache and suexec issue that wont let me run my python script

2013-06-03 Thread Michael Torrie
On 06/03/2013 04:13 PM, Carlos Nepomuceno wrote: '/var/log/httpd' is the default place for the Red Hat and CentOS installation of httpd. '/usr/local/apache/logs' is the default directory of the Apache httpd installation. httpd has probably been upgraded by 'make install'. Oh wow. What

RE: [RELEASED] Python 2.7.5

2013-06-03 Thread Carlos Nepomuceno
Thank you! :) To: python-list@python.org From: breamore...@yahoo.co.uk [...] What still doesn't work in Python 3? http://python3wos.appspot.com/ Is Python 2.7.5 last (final, never to be updated) revision or will it still be supported?

RE: Apache and suexec issue that wont let me run my python script

2013-06-03 Thread Carlos Nepomuceno
Date: Mon, 3 Jun 2013 17:23:16 -0600 From: torr...@gmail.com To: python-list@python.org Subject: Re: Apache and suexec issue that wont let me run my python script On 06/03/2013 04:13 PM, Carlos Nepomuceno wrote: '/var/log/httpd' is the default place

Re: How to get an integer from a sequence of bytes

2013-06-03 Thread Dan Stromberg
On Mon, Jun 3, 2013 at 4:18 PM, Carlos Nepomuceno carlosnepomuc...@outlook.com wrote: Date: Mon, 3 Jun 2013 15:41:41 -0700 Subject: Re: How to get an integer from a sequence of bytes From: drsali...@gmail.com To: python-list@python.org [...] Today

AES 128 bits

2013-06-03 Thread usman mjoda
Good day everyone, I need assistance for python codes of aes 128 bits key that can be run on SAGE Application. Thanks Sent from my Windows Phone -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWart: The problem with print

2013-06-03 Thread Rick Johnson
On Sunday, June 2, 2013 1:58:30 PM UTC-5, Steven D'Aprano wrote: On Sun, 02 Jun 2013 10:04:00 -0700, Rick Johnson wrote: Oh Steven, you've really outdone yourself this time with the theatrics. I hope you scored some cool points with your minions. Heck, you almost had me convinced until i slapped

Re: AES 128 bits

2013-06-03 Thread Denis McMahon
On Tue, 04 Jun 2013 07:52:17 +0800, usman mjoda wrote: Good day everyone, I need assistance for python codes of aes 128 bits key that can be run on SAGE Application. Thanks google pycrypto -- Denis McMahon, denismfmcma...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Pillow lib for x86_64 GNU/Linux

2013-06-03 Thread Jeff SKI Kinsey
Sorry. Should have been more clear. This is a hosting account server. I am not in the sudoers file. Was able to get PIL v1.1.7 to create a tiff file. Problem solved. Thanks. On Monday, June 3, 2013 12:41:17 PM UTC-4, Irmen de Jong wrote: On 3-6-2013 18:23, consult...@gmail.com wrote: It

Re: PyWart: The problem with print

2013-06-03 Thread Vito De Tullio
Rick Johnson wrote: Take your standard yes/no/cancel dialog, i would expect it to return True|False|None respectively, you clearly mean True / False / FileNotFound. ( http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx ) -- ZeD -- http://mail.python.org/mailman/listinfo/python-list

Beginner question

2013-06-03 Thread eschneider92
Is there a more efficient way of doing this? Any help is gratly appreciated. import random def partdeux(): print('''A man lunges at you with a knife! Do you DUCK or PARRY?''') option1=('duck') option2=('parry') optionsindex=[option1, option2]

Re: PyWart: The problem with print

2013-06-03 Thread Rick Johnson
On Monday, June 3, 2013 10:16:13 PM UTC-5, Vito De Tullio wrote: Rick Johnson wrote: Take your standard yes/no/cancel dialog, i would expect it to return True|False|None respectively, you clearly mean True / False / FileNotFound. No, i clearly meant what i said :-). FileDialogs only

Re: PyWart: The problem with print

2013-06-03 Thread Steven D'Aprano
On Tue, 04 Jun 2013 05:16:13 +0200, Vito De Tullio wrote: Rick Johnson wrote: Take your standard yes/no/cancel dialog, i would expect it to return True|False|None respectively, you clearly mean True / False / FileNotFound. ( http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx )

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread rusi
On Jun 4, 3:37 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: (Note: this post is sent using UTF-8. If anyone reading this sees mojibake, please make sure your email or news client is set to use UTF-8.) On Mon, 03 Jun 2013 05:54:30 -0700, rusi wrote: On Jun 3, 2:12 pm,

Re: Apache and suexec issue that wont let me run my python script

2013-06-03 Thread Michael Torrie
On 06/03/2013 05:33 PM, Carlos Nepomuceno wrote: I did a httpd 'make install' on CentOS 6 and it worked fine. Needed a few tweaks that I don't remember though. If you don't have any previous experience with Apache httpd settings I wouldn't try that on a production server. Precisely. Given

Bools and explicitness [was Re: PyWart: The problem with print]

2013-06-03 Thread Steven D'Aprano
On Mon, 03 Jun 2013 18:37:24 -0700, Rick Johnson wrote: On Sunday, June 2, 2013 1:58:30 PM UTC-5, Steven D'Aprano wrote: On Sun, 02 Jun 2013 10:04:00 -0700, Rick Johnson wrote: A wise programmer may think he's solved the problem by writing a function called debugprint that looks like this:

Re: Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-03 Thread Steven D'Aprano
On Mon, 03 Jun 2013 21:35:13 -0700, rusi wrote: On Jun 4, 3:37 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: (Note: this post is sent using UTF-8. If anyone reading this sees mojibake, please make sure your email or news client is set to use UTF-8.) On Mon, 03 Jun 2013

[issue18118] curses utf8 output broken in Python2

2013-06-03 Thread helmut
helmut added the comment: I suppose that screen.addstr(0, 0, uäöü.encode(utf-8)) works. It works as in the output looks as the one expected. Long lines with utf8 characters will make it break again though. screen.addstr(0, 0, äöü * 20) # assuming COLUMNS=80 Will give two rows of characters

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: This code is pretty broken. I don't think ttys are ever seekable, so the os.fdopen has probably been always failing since 3.0. It thus always leaks an fd to '/dev/tty' if the first os.open succeeds. The whole function should probably be rewriten to work

[issue18118] curses utf8 output broken in Python2

2013-06-03 Thread STINNER Victor
STINNER Victor added the comment: Sounds sensible. Are you aware of a workaround for this issue? I.e. is there any way to force Python2.7 to use the wide mode for outputting characters? I don't think that it is possible to workaround this issue, it is a bug in the design of curses, related to

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 03/06/2013 1:02am, spresse1 wrote: Whats really bugging me is that it remains open and I can't fetch a reference. If I could do either of these, I'd be happy. ... Perhaps I really want to be implementing with os.fork(). Sigh, I was trying to save

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Armin Rigo
Armin Rigo added the comment: The bug is different, because it doesn't depend on details of the platform. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18122 ___

[issue18124] Broken build on target machine with incorrect hostname (non-ascii)

2013-06-03 Thread Charles-François Natali
Charles-François Natali added the comment: Why open this issue, since it's obviously a duplicate of #18109? -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18124 ___

[issue18125] Out-of-tree build cannot regenerate Makefile.pre

2013-06-03 Thread Paul TBBle Hampson
New submission from Paul TBBle Hampson: Noticed in Python 2.7 but a quick look in the repository suggests this is also true in Python 3 releases. The Makefile rule for Makefile.pre in Makefile.pre.in is: # Build the toplevel Makefile Makefile.pre: Makefile.pre.in config.status

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: 2.7.3 passes, 2.7 trunk fails Python 2.7.0, 2.7.2 and 2.6.8 all fail here. Dmi is right: it starts failing at 4afc50d15544. (note that Python 3 isn't affected) -- ___ Python tracker rep...@bugs.python.org

[issue18125] Out-of-tree build cannot regenerate Makefile.pre

2013-06-03 Thread Paul TBBle Hampson
Changes by Paul TBBle Hampson paul.hamp...@pobox.com: -- type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18125 ___ ___

[issue18125] Out-of-tree build cannot regenerate Makefile.pre

2013-06-03 Thread Paul TBBle Hampson
Paul TBBle Hampson added the comment: Forgot to mention, this is the only occurrence of a *.in file in Makefile.pre.in that isn't prefixed with $(srcdir)/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18125

[issue3329] API for setting the memory allocator used by Python

2013-06-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hi. the file and line arguments are for expanding from macros such as PyMem_MALLOC. I had them added because they provide the features of a comprehensive debugging API. Of course, I'm not showing you the entire set of modifications that we have made

[issue3329] API for setting the memory allocator used by Python

2013-06-03 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Also, our ccpmem.h, the interface to the ccpmem.cpp, internal flexible memory allocator framework. Again, just FYI. There are no trade secrets here, so please ask me for more details, if interested. One particular trick we have been using, which

[issue18117] Missing symlink:Current after Mac OS X 3.3.2 package installation

2013-06-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: Linking with -framework Python is always a bad idea because you have no control over which version of Python you link with other than by changing global system state (the Current link). Also: include files aren't included using the framework conventions

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: My system python-2.7.3 affected too: python -c 'import sys;print(sys.version);import x' 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] Traceback (most recent call last): File string, line 1, in module RuntimeError: not holding the import lock $ uname -a

[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-06-03 Thread Andrew Stormont
Andrew Stormont added the comment: Great. Everybody's happy now, surely? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17925 ___ ___

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Forking as a side effect of importing a module is evil. I think raising a RuntimeError is preferable to trying to make it Just Work. But maybe one could do void _PyImport_ReInitLock(void) { if (import_lock != NULL) {

[issue3329] API for setting the memory allocator used by Python

2013-06-03 Thread STINNER Victor
STINNER Victor added the comment: I'm happy with the api you provide, with a small addition: PyAPI_FUNC(int) Py_SetAllocators( char api, void* (*malloc) (size_t size, void *data), void* (*realloc) (void* ptr, size_t size, void *data), void (*free) (void* ptr, void *data),

[issue17925] asynchat.async_chat.initiate_send : del deque[0] is not safe

2013-06-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: patch plus self.producer_fifo.extendleft([data, first]) seems legit and I verified pyftpdlib tests pass. Last thing missing from the patch is a test case. Pierrick can you merge test_initiate_send.py into Lib/test_asynchat.py and provide a new patch?

[issue18117] Missing symlink:Current after Mac OS X 3.3.2 package installation

2013-06-03 Thread Gavan Schneider
Gavan Schneider added the comment: A lot of this is past my level but speaking from my level I just want packages to be consistent, i.e., if there is a symlink it should point to something (preferably useful) not dangle as is the case now. Also I want an installed version to look the same no

[issue18117] Missing symlink:Current after Mac OS X 3.3.2 package installation

2013-06-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: There is a python3.3 in .../Python.framework/Versions/3.3/lib because .../Python.framework/Versions/3.3 is basicly a regular unix install with some trivial changes (in particular, there is a Python shared library in the root of the tree, there is a

[issue18111] Add a default argument to min max

2013-06-03 Thread Thomas Wouters
Thomas Wouters added the comment: For the record, Raymond, I think you're wrong about this. Itertools isn't always a solution to every problem, and it makes for a very awkward way around a silly limitation in min() and max(). Their API is already awkward -- because they already take a keyword

[issue3329] API for setting the memory allocator used by Python

2013-06-03 Thread STINNER Victor
STINNER Victor added the comment: New patch (version 2), more complete: * add void *data argument to all allocator functions * add block API used for pymalloc allocator to allocate arenas. Use mmap or malloc, but may use VirtualAlloc in a near future (see #13483). Callbacks prototype: -

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: There is patch. Test is non-LGTM, because having a side effect for hostname and requires root's permissions for manipulations with hostname[*]. Someone having ideas how I can mock system `uname` call? [*] But this way is OK for Lib/test/test_sockets.py. I'm

[issue18124] Broken build on target machine with incorrect hostname (non-ascii)

2013-06-03 Thread Dmi Baranov
Dmi Baranov added the comment: Just a another behavior. My mistake, sorry. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18124 ___

[issue18111] Add a default argument to min max

2013-06-03 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for adding this. It's simple to implement, simple to explain and the alternatives for dealing with the empty iterable case (or even the fact it may need to be handled at all) are definitely not obvious. The relationship to next() is straightforward: the

[issue18045] get_python_version is not import in bdist_rpm.py

2013-06-03 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18045 ___ ___ Python-bugs-list

[issue18126] Update links to NumPy resources in documentation

2013-06-03 Thread Yury V. Zaytsev
New submission from Yury V. Zaytsev: Hi, The links to NumPy sites and documentation are outdated. I replaced them with www.numpy.org, and also the canonical location for documentation (docs.scipy.org). I removed the explicit mention of the PDF file, because the documentation has been split

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread spresse1
spresse1 added the comment: I don't see how using os.fork() would make things any easier. In either case you need to prepare a list of fds which the child process should close before it starts, or alternatively a list of fds *not* to close. With fork() I control where the processes

[issue18111] Add a default argument to min max

2013-06-03 Thread Ned Batchelder
Ned Batchelder added the comment: I find the workarounds mentioned here to be baroque and confusing. The concept of a default value to return in the case of an empty iterator is straightforward. I'm +1 on adding this as well. -- nosy: +nedbat ___

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 03/06/2013 3:07pm, spresse1 wrote: I could reimplement the close_all_fds_except() call (in straight python, using os.closerange()). That seems like a reasonable solution, if a bit of a hack. However, given that pipes are exposed by multiprocessing, it

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread spresse1
spresse1 added the comment: Oooh, thanks. I'll use that. But really, this sounds rather fragile. Absolutely. I concur there is no good way to do this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18120

  1   2   >