ANN: pycairo release 1.10.0 now available

2011-04-18 Thread Steve
Pycairo is a set of Python bindings for the multi-platform 2D graphics library cairo. http://cairographics.org http://cairographics.org/pycairo A pycairo release 1.10.0 is available from: http://cairographics.org/releases/pycairo-1.10.0.tar.bz2

[ANN] Courses in Colorado: Introduction to Python and Python for Scientists and Engineers

2011-04-18 Thread Mike Müller
Python Course in Golden, CO, USA Introduction to Python and Python for Scientists and Engineers -- June 3 - 4, 2011 Introduction to Python June 5, 2011 Python for Scientists and Engineers

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 3:49 PM, Chris Rebert c...@rebertia.com wrote: Pro: You can do anything. Con: You can do anything. I think someone already beat you to it. They call their invention Lisp. :-P Bah! Lisp comes, out of the box, with far too many features! No no no. If you want the +

Re: [Q] ipython: Multiple commands on the same line and newlines

2011-04-18 Thread harrismh777
Terry Reedy wrote: You can write multiple *simple* statements using ';'. All compound statements, like while, must start on own line. E.g. I want: x = 0;ctrl-enter This is one statement while x 10:ctrl-enter x = x + 1;ctrl-enter Lutz has a very nice write-up entitled Why

Re: [Q] ipython: Multiple commands on the same line and newlines

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 4:01 PM, harrismh777 harrismh...@charter.net wrote:    It might be nice (as an option) to be able to disengage the forced indentation syntax rules of Python. In other words, provide indentation syntax by default and allow an option via environment variable to engage an

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Steven D'Aprano
On Sun, 17 Apr 2011 22:49:41 -0700, Chris Rebert wrote: Pro: You can do anything. Con: You can do anything. I think someone already beat you to it. They call their invention Lisp. :-P Also Forth. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: An unusual question...

2011-04-18 Thread wisecracker
Hi Rhodri... You do realise that what id() returns is implementation-dependent, don't you? In particular, what IronPython returns isn't an address. I'm pretty sure I wrote standard Python install in one of my replies. Yeah here it is in a reply to Miki... Hmm, I was hoping to stay inside

Re: [OT] Free software versus software idea patents

2011-04-18 Thread harrismh777
Steven D'Aprano wrote: software*is* mathematics No it isn't. Yes, it is. (If the machine is particularly simple -- you might be able to exactly simulate a lever in pure mathematics, but simulating, say, a nuclear bomb or a dialysis machine in mathematics is more of a challenge...)

Re: An unusual question...

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 4:21 PM, wisecrac...@tesco.net wrote: Hi Rhodri... You do realise that what id() returns is implementation-dependent, don't you?  In particular, what IronPython returns isn't an address. I'm pretty sure I wrote standard Python install in one of my replies. Yeah

Re: An unusual question...

2011-04-18 Thread Steven D'Aprano
On Mon, 18 Apr 2011 07:21:18 +0100, wisecracker wrote: Hi Rhodri... You do realise that what id() returns is implementation-dependent, don't you? In particular, what IronPython returns isn't an address. I'm pretty sure I wrote standard Python install in one of my replies. IronPython

Re: An unusual question...

2011-04-18 Thread harrismh777
Steven D'Aprano wrote: I'm pretty sure I wrote standard Python install in one of my replies. IronPython*is* standard Python. As are Jython, PyPy and CPython. This brings up a question I have had for a while; when is PSF going to forward PythonX on over to a formal standards committee

Re: Python IDE/text-editor

2011-04-18 Thread harrismh777
Terry Reedy wrote: IDLE loses syntax highlighting annoyingly often Could you exlain? When does it do that with a file labelled .py? ... never seen this behavior in IDLE with a .py file; not even once. I take that back... there was the time I tried to run IDLE on the mac mini with Apple

Re: [OT] Free software versus software idea patents

2011-04-18 Thread geremy condra
On Sun, Apr 17, 2011 at 11:29 PM, harrismh777 harrismh...@charter.net wrote: snip Ok, so, you're basically saying that perfect simulation is not a requirement for something to 'be mathematics'. I don't think you can construct a nontrivial model for mathematics without including that, but I'd be

Re: Python IDE/text-editor

2011-04-18 Thread harrismh777
Jorgen Grahn wrote: Based on the comments here, it seems that emacs would have to be the editor-in-chief for programmers. I currently use SciTE at work; is it reasonable to, effectively, bill my employer for the time it'll take me to learn emacs? Editor-in-chief is a bit strong... but many

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Werner F. Bruhin
On 04/17/2011 11:57 PM, Martin v. Löwis wrote: http://www.python.org/2.5.6 Just FYI, getting a 404 error on the above. I can see a 2.5.6c1 listes on http://www.python.org/download/releases/2.5/highlights/; which goes to http://www.python.org/download/releases/2.5.6/; Werner --

Re: Make Python portable by default! (Re: Python IDE/text-editor)

2011-04-18 Thread Wolfgang Keller
You can't run Python programs without a Python interpreter installed. Wrong. See e.g. http://www.portablepython.com/ Uhm... how does that disprove? Which part of the word installed don't you understand while actually using it? ;- Whatever language you distributed code is in,

strange use of %s

2011-04-18 Thread Tracubik
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 string. I've newbie in sql. why do the coder use %%%s%% instead of a simple %s?

Re: Make Python portable by default! (Re: Python IDE/text-editor)

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 6:15 PM, Wolfgang Keller felip...@gmx.net wrote: Which part of the word installed don't you understand while actually using it? ;- I have various programs which I distribute in zip/tgz format, and also as a self-extracting executable on Windows. Does this mean they need

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Raymond Hettinger
On Apr 16, 1:24 pm, candide cand...@free.invalid wrote: Consider the following code : # -- def bool_equivalent(x):      return True if x else False It's faster to write: def bool_equivalent(x): return not not x Raymond --

Re: strange use of %s

2011-04-18 Thread Tim Golden
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 string. I've newbie in sql. why do the coder

Re: strange use of %s

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 6:29 PM, Tracubik affdfsdfds...@b.com 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 string.

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread candide
Le 18/04/2011 10:33, Raymond Hettinger a écrit : # -- def bool_equivalent(x): return True if x else False It's faster to write: def bool_equivalent(x): return not not x faster and ... smarter ;) --

Re: An unusual question...

2011-04-18 Thread wisecracker
Hi Chris... It sounds to me like you're trying to pull off a classic buffer overrun and remote code execution exploit, in someone else's Python program. And all I have to say is Good luck to you. Talking of nefarious usage... I wonder what this would do left unchecked on a current

Re: An unusual question...

2011-04-18 Thread Chris Angelico
On Mon, Apr 18, 2011 at 7:53 PM, wisecrac...@tesco.net wrote: Talking of nefarious usage... I wonder what this would do left unchecked on a current machine and current Python install... ### global somestring somestring = while 1:        #print somestring        somestring =

Re: Make Python portable by default! (Re: Python IDE/text-editor)

2011-04-18 Thread flebber
On Apr 18, 6:33 pm, Chris Angelico ros...@gmail.com wrote: On Mon, Apr 18, 2011 at 6:15 PM, Wolfgang Keller felip...@gmx.net wrote: Which part of the word installed don't you understand while actually using it? ;- I have various programs which I distribute in zip/tgz format, and also as a

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Duncan Booth
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: So in Python 2.2, Python introduced two new built-in names, True and False, with values 1 and 0 respectively: [steve@sylar ~]$ python2.2 Python 2.2.3 (#1, Aug 12 2010, 01:08:27) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2

Re: Python IDE/text-editor

2011-04-18 Thread Jean-Michel Pichavant
Alec Taylor wrote: Good Afternoon, I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Here's a mockup of the app I'm looking for: http://i52.tinypic.com/2uojswz.png Which would you

Re: Python IDE/text-editor

2011-04-18 Thread Ton van Vliet
On Sat, 16 Apr 2011 13:20:32 +1000, Alec Taylor alec.tayl...@gmail.com wrote: Good Afternoon, I'm looking for an IDE which offers syntax-highlighting, code-completion, tabs, an embedded interpreter and which is portable (for running from USB on Windows). Here's a mockup of the app I'm looking

Re: An unusual question...

2011-04-18 Thread Steven D'Aprano
On Mon, 18 Apr 2011 10:53:00 +0100, wisecracker wrote: global somestring somestring = You don't need to declare a name in the global scope as global. It just is global. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

How to create a (transparent) decorator with status information?

2011-04-18 Thread Timo Schmiade
Hi all, I'm currently occupying myself with python's decorators and have some questions as to their usage. Specifically, I'd like to know how to design a decorator that maintains a status. Most decorator examples I encountered use a function as a decorator, naturally being stateless. Consider

Re: An unusual question...

2011-04-18 Thread Grant Edwards
On 2011-04-18, harrismh777 harrismh...@charter.net wrote: Steven D'Aprano wrote: I'm pretty sure I wrote standard Python install in one of my replies. IronPython*is* standard Python. As are Jython, PyPy and CPython. This brings up a question I have had for a while; when is PSF going

Re: Python IDE/text-editor

2011-04-18 Thread Alec Taylor
Geany I've tried in the past, it's really buggy on my home computer and at Uni... however from my phone it works wonderfully! (Use it for C++ projects on Rhobuntu) Eric 4 was suggested to me on the #python channel on Freenode... however I've never been able to get it compiled/working. Too many

Re: Python IDE/text-editor

2011-04-18 Thread Andrea Crotti
Alec Taylor alec.tayl...@gmail.com writes: Emacs and vim still seem like good alternatives, when I get the time. However, currently have 3 assignments to start and finish so would like a simple Notepad2 with python interpreter attached (and keyboard shortcut to run script) type program.

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-18 Thread Aldo Ceccarelli
On Apr 15, 11:00 am, Aldo Ceccarelli ceccarelli.a...@gmail.com wrote: Hello All, in my specific problem I will be happy of a response where possible to: 1. distinguish different operating systems of answering nodes 2. collect responses of Wyse thin-clients with Thin OS to get node name and

Re: PYTHONPATH

2011-04-18 Thread MRAB
On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively patient with the Python3 development direction. While I think its non-compatibility may hurt in the short term, the long term goal of stream-lining the language will make for a much better

Re: Feature suggestion -- return if true

2011-04-18 Thread Aahz
In article mailman.461.1303043638.9059.python-l...@python.org, D'Arcy J.M. Cain da...@druid.net wrote: On Sun, 17 Apr 2011 16:21:53 +1200 Gregory Ewing greg.ew...@canterbury.ac.nz wrote: My idiom for fetching from a cache looks like this: def get_from_cache(x): y = cache.get(x)

Re: Python IDE/text-editor

2011-04-18 Thread Alec Taylor
The current finalists: *Editra* with PyShell in Shelf Pros: Syntax highlighting, tabs, ¿portable? and embedded python interpreter (PyShell 0.8) Cons: No run button or keyboard shortcut for quick running of script (made issue: http://code.google.com/p/editra/issues/detail?id=641) and doesn't save

Re: Python IDE/text-editor

2011-04-18 Thread Alec Taylor
The current finalists: Editra with PyShell in Shelf Pros: Syntax highlighting, tabs, ¿portable? and embedded python interpreter (PyShell 0.8) Cons: No run button or keyboard shortcut for quick running of script (made issue: http://code.google.com/p/editra/issues/detail?id=641) and doesn't save

installing setuptools on Windows custom python install

2011-04-18 Thread Eric Frederich
Hello, I have a python installation that I built myself using Visual Studio 2005. I need this version because I need to link Python bindings to a 3rd party library that uses VS 2005. I want to get setuptools installed to this Python installation but the installer won't find my version of Python

Re: installing setuptools on Windows custom python install

2011-04-18 Thread Benjamin Kaplan
On Apr 18, 2011 12:55 PM, Eric Frederich eric.freder...@gmail.com wrote: Hello, I have a python installation that I built myself using Visual Studio 2005. I need this version because I need to link Python bindings to a 3rd party library that uses VS 2005. I want to get setuptools installed

Re: installing setuptools on Windows custom python install

2011-04-18 Thread Wolfgang Rohdewald
On Montag 18 April 2011, Eric Frederich wrote: File F:\My_Python27\lib\socket.py, line 47, in module import _socket ImportError: No module named _socket F:\pyside\setuptools-0.6c11 I have C:\Python27 and within that, DLLS\_socket.pyd this is what import _socket should find do you

Re: How to create a (transparent) decorator with status information?

2011-04-18 Thread Ian Kelly
On Mon, Apr 18, 2011 at 6:47 AM, Timo Schmiade the_...@gmx.de wrote: Hi all, I'm currently occupying myself with python's decorators and have some questions as to their usage. Specifically, I'd like to know how to design a decorator that maintains a status. Most decorator examples I

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-18 Thread Chris Angelico
On Tue, Apr 19, 2011 at 1:23 AM, Aldo Ceccarelli ceccarelli.a...@gmail.com wrote: Hello and thank you All! I've solved my problem as follows: 1. installed nmap 2. wrote a python script calling nmap nmap -sP via os.system and redirecting output to a file 3. read results file and made a

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread John Nagle
On 4/17/2011 5:12 PM, Gregory Ewing wrote: Chris Angelico wrote: Well, of course you can always implement bool as an int; Which Python used to do once upon a time -- and still does in a way, because bool is a subclass of int. The bool type was added mainly to provide a type that prints out

logger warning doesn't appear even though propagate flag is True

2011-04-18 Thread Disc Magnet
This program prints both the warnings: #!/usr/bin/env python2.7 import logging import logging.config logging.config.fileConfig('log.conf') log1 = logging.getLogger() log2 = logging.getLogger('foo.bar') log2.addHandler(logging.NullHandler()) log1.warn('warning 1') log2.warn('warning 2')

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Martin v. Loewis
Am 18.04.2011 09:59, schrieb Werner F. Bruhin: On 04/17/2011 11:57 PM, Martin v. Löwis wrote: http://www.python.org/2.5.6 Just FYI, getting a 404 error on the above. Thanks. There had been a number of glitches which have been corrected. If anything looks still incorrect, please let me

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-18 Thread Daniel Kluev
Isn't it better to use subprocess.Popen and read stdout/stderr directly? Should be much more convenient than temporary files. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Two similar logging programs but different ouputs

2011-04-18 Thread Disc Magnet
I have tried writing two programs which are doing similar activities. The little difference between the two programs is that the first one configures logger1 using addHandler() method while the second program configures logger1 from log.conf file. However, the output differs for both. The first

Re: Two similar logging programs but different ouputs

2011-04-18 Thread Vinay Sajip
On Apr 18, 10:11 pm, Disc Magnet discmag...@gmail.com wrote: Could you please help me understand this difference? Programs and log.conf file follow: The first program prints two messages because loggers pass events to handlers attached to themselves and their ancestors. Hence, logger1's

Re: Two similar logging programs but different ouputs

2011-04-18 Thread Vinay Sajip
On Apr 18, 10:11 pm, Disc Magnet discmag...@gmail.com wrote: Could you please help me understand this difference? Programs and log.conf file follow: The first program prints two messages because loggers pass events to handlers attached to themselves and their ancestors. Hence, logger1's

Programmatically log in and request XML

2011-04-18 Thread Tim Johnson
FYI: Using python 2.7 on ubuntu 10.04. I have acquainted myself with the parsing of XML data using an input file as test data. Now I need to make a request the feed itself, and capture that field as data. I need to do the following: 1)Programmatically log into a site with user and password.

Re: An unusual question...

2011-04-18 Thread Rhodri James
On Mon, 18 Apr 2011 08:01:00 +0100, wisecrac...@tesco.net wrote: Hi Rhodri... You do realise that what id() returns is implementation-dependent, don't you? In particular, what IronPython returns isn't an address. I'm pretty sure I wrote standard Python install in one of my replies. Yeah

Re: How to create a (transparent) decorator with status information?

2011-04-18 Thread Wayne Witzel III
Thinking object-orientedly, my first idea was to use an object as a decorator: class CallCounter: def __init__(self, decorated): self.__function = decorated self.__numCalls = 0 def __call__(self, *args, **kwargs): self.__numCalls += 1 return

Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread goldtech
Hi, Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most recent call last): File pyshell#73, line 1, in module p = Popen(cmd3,

Python3 designed right (was: PYTHONPATH)

2011-04-18 Thread Brendan Simon (eTRIX)
On 19/04/2011 2:15 AM, python-list-requ...@python.org wrote: Subject: Re: PYTHONPATH From: MRAB pyt...@mrabarnett.plus.com Date: Mon, 18 Apr 2011 16:31:31 +0100 To: python-list@python.org On 18/04/2011 05:37, harrismh777 wrote: [snip] In retrospect, in many ways this is why I am relatively

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Brendan Simon (eTRIX)
On 19/04/2011 9:05 AM, python-list-requ...@python.org wrote: Am 18.04.2011 09:59, schrieb Werner F. Bruhin: On 04/17/2011 11:57 PM, Martin v. Löwis wrote: http://www.python.org/2.5.6 If there is an official release of source (e.g. 2.5.5 and 2.5.6) why aren't binaries produced

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread Chris Rebert
On Mon, Apr 18, 2011 at 4:07 PM, goldtech goldt...@worldpost.com wrote: Hi, Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread Rhodri James
On Tue, 19 Apr 2011 00:07:46 +0100, goldtech goldt...@worldpost.com wrote: Trying to learn how to run a linux command and get the stdout and stderr. I'm trying the following: cmd3 = r'ffmpeg -i /home/giga/Desktop/Guitar1.flv' p = Popen(cmd3, stdout=PIPE, stderr=PIPE) Traceback (most

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Gregory Ewing
John Nagle wrote: Pascal got this right. (A nice feature of Pascal was that packed array of boolean was a bit array). C, which originally lacked a bool type, got it wrong. So did Python. If Python had had a boolean type from the beginning, it probably wouldn't have been a subclass of int

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Gregory Ewing
Chris Angelico wrote: Remind me some day to finish work on my ultimate programming language, which starts out with a clean slate and lets the programmer define his own operators and everything. Didn't someone already do that and call it lisp? :-) -- Greg --

Re: [Tutor] working with strings in python3

2011-04-18 Thread James Mills
On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall ran...@gmail.com wrote: pseudo code: message = Bah. if test:   message = message + Humbug! print(message) end pseudo code Normally it's considered bad practise to concatenate strings. Use a a format specifier like this: message = Bah.

Re: Feature suggestion -- return if true

2011-04-18 Thread Gregory Ewing
Chris Angelico wrote: Question: How many factorial functions are implemented because a program needs to know what n! is, and how many are implemented to demonstrate recursion (or to demonstrate the difference between iteration and recursion)? :) A related question is how often factorial

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote: On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall ran...@gmail.com wrote: pseudo code: message = Bah. if test: message = message + Humbug! print(message) end pseudo code Normally it's considered bad practise to

Re: [Tutor] working with strings in python3

2011-04-18 Thread Benjamin Kaplan
On Mon, Apr 18, 2011 at 8:58 PM, Westley Martínez aniko...@gmail.com wrote: On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote: On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall ran...@gmail.com wrote: pseudo code: message = Bah. if test:   message = message + Humbug!

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread Christian Heimes
Am 18.04.2011 21:58, schrieb John Nagle: This is typical for languages which backed into a bool type, rather than having one designed in. The usual result is a boolean type with numerical semantics, like True + True 2 I find the behavior rather useful. It allows multi-xor tests

Re: Questions about GIL and web services from a n00b

2011-04-18 Thread Hank Fay
Today I just happened to watch this session from PyCon 2011 on gevent and gunicorn: http://blip.tv/file/4883016 gevent uses greenlet, fwiw. I found it informative, but then I find most things informative. s H -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Mon, 2011-04-18 at 21:23 -0400, Benjamin Kaplan wrote: message = %s %s % (message, Humbug!) fix'd -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] working with strings in python3

2011-04-18 Thread Steven D'Aprano
On Tue, 19 Apr 2011 10:34:27 +1000, James Mills wrote: Normally it's considered bad practise to concatenate strings. *Repeatedly*. There's nothing wrong with concatenating (say) two or three strings. What's a bad idea is something like: s = '' while condition: s += append stuff to end

Re: [Tutor] working with strings in python3

2011-04-18 Thread Dan Stromberg
On Mon, Apr 18, 2011 at 6:23 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Mon, Apr 18, 2011 at 8:58 PM, Westley Martínez aniko...@gmail.com wrote: On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote: On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall ran...@gmail.com wrote: pseudo code:

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Terry Reedy
On 4/18/2011 7:33 PM, Brendan Simon (eTRIX) wrote: If there is an official release of source (e.g. 2.5.5 and 2.5.6) why aren't binaries produced (other than to make it really hard for users and force them to upgrade to a later major revision -- 2.6, 2.7, etc) ?? Unofficial answer: A. Binaries

Re: Popen to get stdout and stderr for ffmpeg - No such file or directory ?

2011-04-18 Thread goldtech
Read The Fine Manual:http://docs.python.org/library/subprocess.html#subprocess.Popen: snip... Try instead: cmd3 = ['ffmpeg', '-i', '/home/giga/Desktop/Guitar1.flv'] Cheers, Chris --http://blog.rebertia.com No doubt, I should RTFM...you're right! Yes, works like a charm now. Thanks

Re: [Tutor] working with strings in python3

2011-04-18 Thread Chris Angelico
On Tue, Apr 19, 2011 at 12:16 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: See Joel on Software for more: http://www.joelonsoftware.com/articles/fog000319.html The bulk of that article is reasonable; he's right in that a good programmer MUST have at least some

Re: [Tutor] working with strings in python3

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 02:16 +, Steven D'Aprano wrote: On Tue, 19 Apr 2011 10:34:27 +1000, James Mills wrote: Normally it's considered bad practise to concatenate strings. *Repeatedly*. There's nothing wrong with concatenating (say) two or three strings. What's a bad idea is

Re: Python IDE/text-editor

2011-04-18 Thread Alec Taylor
SPE looks good, however I couldn't get it running (svn'd it). Do you know if there's an installer? Editra has a really active support team, and have addressed all 3 of the bugs I found. (although mostly the bugs were me not knowing how it works!) Code completion would be nice, especially for a

Re: Python IDE/text-editor

2011-04-18 Thread Teemu Likonen
* 2011-04-19T00:40:09+10:00 * Alec Taylor wrote: Please continue recommending Emacs. * 2011-04-19T02:41:11+10:00 * Alec Taylor wrote: Please continue suggesting Python IDEs and/or fixes for the above Cons. Emacs. * 2011-04-19T13:44:29+10:00 * Alec Taylor wrote: Please continue with your

IDLE bug

2011-04-18 Thread harrismh777
Are bug reports wanted here, or just in issue tracker? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE bug

2011-04-18 Thread James Mills
On Tue, Apr 19, 2011 at 2:05 PM, harrismh777 harrismh...@charter.net wrote: Are bug reports wanted here, or just in issue tracker? Pretty sure they're wanted in the Issue Tracker. cheers James -- -- James Mills -- -- Problems are solved by method --

Re: Python IDE/text-editor

2011-04-18 Thread Westley Martínez
On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote: * 2011-04-19T00:40:09+10:00 * Alec Taylor wrote: Please continue recommending Vim. * 2011-04-19T02:41:11+10:00 * Alec Taylor wrote: Please continue suggesting Python IDEs and/or fixes for the above Cons. Vim. *

Re: IDLE bug

2011-04-18 Thread Westley Martínez
On Mon, 2011-04-18 at 23:05 -0500, harrismh777 wrote: Are bug reports wanted here, or just in issue tracker? thanks If it's a super-critical bug that can destroy data, yes, else just the issue tracker. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-18 Thread Ben Finney
Alec Taylor alec.tayl...@gmail.com writes: Please continue with your recommendations. At some point you need to act on these recommendations by picking one for the time being. If you're so tight for time, why are you still evaluating editors after several days of recommendations? Why have you

Re: Python IDE/text-editor

2011-04-18 Thread rusi
On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote: emacs * 3 On Apr 19, 9:17 am, Westley Martínez aniko...@gmail.com wrote: vi * 3 This would be a competition except for viper: http://www.emacswiki.org/emacs/ViperMode IOW emacs can be morphed into vi --

Re: Python IDE/text-editor

2011-04-18 Thread Chris Angelico
On Tue, Apr 19, 2011 at 2:37 PM, rusi rustompm...@gmail.com wrote: On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote: emacs * 3 On Apr 19, 9:17 am, Westley Martínez aniko...@gmail.com wrote: vi * 3 This would be a competition except for viper: http://www.emacswiki.org/emacs/ViperMode

Re: Python IDE/text-editor

2011-04-18 Thread rusi
On Apr 19, 9:32 am, Ben Finney ben+pyt...@benfinney.id.au wrote: Alec Taylor alec.tayl...@gmail.com writes: Please continue with your recommendations. At some point you need to act on these recommendations by picking one for the time being. If you're so tight for time, why are you still

Re: Python IDE/text-editor

2011-04-18 Thread rusi
On Apr 19, 9:44 am, Chris Angelico ros...@gmail.com wrote: On Tue, Apr 19, 2011 at 2:37 PM, rusi rustompm...@gmail.com wrote: On Tue, 2011-04-19 at 06:51 +0300, Teemu Likonen wrote: emacs * 3 On Apr 19, 9:17 am, Westley Martínez aniko...@gmail.com wrote: vi * 3 This would be a

Re: strange use of %s

2011-04-18 Thread Chris Angelico
On Tue, Apr 19, 2011 at 3:22 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Mon, 18 Apr 2011 09:44:40 +0100, Tim Golden m...@timgolden.me.uk declaimed the following in gmane.comp.python.general:    sql = SELECT ... WHERE name LIKE '%' + ? + '%'    q = db.cursor ()    q.execute (sql,

Re: Two similar logging programs but different ouputs

2011-04-18 Thread Disc Magnet
Thank you Vinay for the quick reply. I have a few more questions. On Tue, Apr 19, 2011 at 3:27 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Apr 18, 10:11 pm, Disc Magnet discmag...@gmail.com wrote: Could you please help me understand this difference? Programs and log.conf file follow:

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-04-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In the patch, _length_ is searched in the class and its base class. But what happens with a third level? class my_array3(my_array2): pass -- ___ Python tracker rep...@bugs.python.org

[issue11865] typo in Py_AddPendingCall document

2011-04-18 Thread Zhiping Deng
New submission from Zhiping Deng kofreesty...@gmail.com: http://docs.python.org/c-api/init.html?highlight=py_addpendingcall#Py_AddPendingCall void Py_AddPendingCall(int (*func)(void *, void *arg)) which should be void Py_AddPendingCall(int (*func)(void *), void *arg) -- assignee:

[issue11865] typo in Py_AddPendingCall document

2011-04-18 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset fc2def15ab11 by Ezio Melotti in branch '2.7': #11865: fix typo in init.rst. http://hg.python.org/cpython/rev/fc2def15ab11 New changeset 6e090d78857c by Ezio Melotti in branch '3.1': #11865: fix typo in init.rst.

[issue11865] typo in Py_AddPendingCall document

2011-04-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.1, Python 3.2, Python 3.3

[issue11835] python (x64) ctypes incorrectly pass structures parameter

2011-04-18 Thread Christoph Gohlke
Changes by Christoph Gohlke cgoh...@uci.edu: -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11835 ___ ___ Python-bugs-list

[issue11849] ElementTree memory leak

2011-04-18 Thread kaifeng
kaifeng cafe...@gmail.com added the comment: Found a minor defect of Python 3.2 / 3.3: line 1676 of xml/etree/ElementTree.py was: del self.target, self._parser # get rid of circular references should be: del self.target, self._target, self.parser, self._parser # get rid of circular

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like pthread_mutex_lock() and pthread_mutex_unlock() are not reentrant on some platforms (in some implementations of the pthread API). Antoine: if I understand correctly your patch, if we have a pending signal, all next

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Antoine: if I understand correctly your patch, if we have a pending signal, all next signals will be simply ignored. I don't think so, please re-read. -- ___ Python tracker rep...@bugs.python.org

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: pthread_sigmask() can be used to avoid reentrant call, but it has no effect on the second case: signal_handler() called twice at the same time in two different threads. Same problem if we use sa_mask field of sigaction() (e.g.

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't think so, please re-read. Oh, I thought that Py_AddPendingCall() was used to store the pending signal. But no, it asks Python main loop to check which signal has been trigerred, and we can only do it once for all signals.

[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()

2011-04-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: test_signals() of test_threadsignals failure on Mac OS X - signal_handler() is not reentrant: deadlock in Py_AddPendingCall() ___ Python tracker rep...@bugs.python.org

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Le lundi 18 avril 2011 à 10:40 +, STINNER Victor a écrit : Attached patch should fix this issue: - signal_handler() and PyErr_SetInterrupt() only call Py_AddPendingCall() on the first signal (if is_tripped is zero): it

[issue11768] test_signals() of test_threadsignals failure on Mac OS X

2011-04-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file21703/signal_versionadded.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___

[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()

2011-04-18 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: test_signals() of test_threadsignals failure on Mac OS X - signal_handler() is not reentrant: deadlock in Py_AddPendingCall() ___ Python tracker rep...@bugs.python.org

  1   2   >