We have been encountering several deadlocks in a threaded Python
application which calls subprocess.Popen (i.e. fork()) in some of its
This has occurred on Python 2.4.1 on a 2.4.27 Linux kernel.
Preliminary analysis of the hang shows that the child process blocks
upon entering the execvp function, in which the import_lock is acquired
due to the following line:
def _ execvpe(file, args, env=None):
from errno import ENOENT, ENOTDIR
It is known that when forking from a pthreaded application, acquisition
attempts on locks which were already locked by other threads while
fork() was called will deadlock.
Due to these oddities we were wondering if it would be better to extract
the above import line from the execvpe call, to prevent lock
acquisition attempts in such cases.
Another workaround could be re-assigning a new lock to import_lock
(such a thing is done with the global interpreter lock) at PyOS_AfterFork or
We'd appreciate any opinions you might have on the subject.
Thanks in advance,
Yair and Rotem
May I have a short vote on this issue:
In short, pdb (since 2.6) uses a separate displayhook in order to avoid
_ being reassigned (which screws up debugging apps that use _ as gettext).
In that displayhook, I did not add the suppression of printing None, as
it can be confusing to look at variables and get no output:
(You could argue that this is what the "p" command is for though.)
Now in Python 3, where print is a function, if you call print in a loop
(e.g. to debug a list or dictionary, as it is advertised in the pdb docs
under the "alias" command), the output has the printed values interspersed
Now, what is the lesser evil?
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
PyCon 2010 will be February 19-21 2010 in Atlanta, Georgia (US).
Van Lindberg, PyCon chair, has approved having another Python Language
Summit on Thursday, February 18 2010. The web page for it is
The Python Language Summit is an invitation-only event for developers
of Python implementations and the standard library, to discuss issues
of common concern to all implementors.
It will mostly be organized similarly to last year's event. I'm going
to drop the initial open discussion, which wasn't very useful, and
we'll just have three 1.5-hour discussion sessions. The fourth time
slot will be left open for chatting, development, or whatever the
attendees want to do.
We therefore need to decide what those three sessions should be about.
Please discuss on python-dev and hopefully we can arrive at some
consensus on topics of reasonably wide current interest. (See
http://us.pycon.org/2009/about/summits/language/ for a reminder of
last year's topics.)
Feel free to raise discussions on other lists such as jython-dev,
catalog-sig, or wherever, but please summarize the results here on
python-dev; I won't see discussions on other lists.
Like last time, invitations will be sent to the committers for Python,
Jython, IronPython, PyPy, Pynie, plus a few extra people and projects.
If you want to suggest another project or person who should be
invited, please send me a private e-mail.
Andrew M. Kuchling
The default string formatting alignment for all types, according to PEP
3101, is left aligned. Issue 6857 (http://bugs.python.org/issue6857)
points out that for numeric types (int, float, and decimal, at least),
the actual implemented default alignment is right aligned.
Mark Dickinson and I agree that for numeric types, right alignment makes
much more sense as a default. And that's what %-formatting and
str.format() both do.
I think the PEP should be modified to say that right alignment is the
default for numeric types. Also the documentation at
http://docs.python.org/library/string.html#formatstrings should have the
Does anyone disagree?
Still no-mail on python-dev, forwarding this because it has a direct
e-mail contact for Microsoft at the bottom.
----- Forwarded message from Joanna Cobb <joanna.cobb(a)nichecubed.com> -----
> From: Joanna Cobb <joanna.cobb(a)nichecubed.com>
> To: "webmaster(a)python.org" <webmaster(a)python.org>
> Date: Mon, 14 Sep 2009 10:05:34 -0400
> Subject: Windows 7 Compatibility
> Regarding: Windows 7 Compatibility for Python Software Foundation - Application: Python
> I am trying to contact your company regarding the Microsoft Windows 7 Compatibility Program for Python. I have not been able to get in touch with the person responsible for this application in your company and this is why I am reaching out to you through the Support Team. This application has been identified as one of the applications Microsoft would like to see supported on Windows 7 and I have been tasked by Microsoft to help answer your questions about Windows 7 application compatibility and help you get your application through the Windows 7 "Green Light" compatibility process.
> If your application already supports Windows Vista, chances are it will already be compatible with Windows 7 without the need for any code changes. By pledging support for Windows 7 you're application will automatically be listed in the Windows Application Compatibility seen currently by more than 1 million users per month. The registration is extremely simple and just asks a few key questions.
> Here is the link to Microsoft's ISV Application Compatibility page: http://partner.microsoft.com/isvappcompat. When you have a moment, I would encourage you to visit the site and complete the process to pledge support for your application on Windows 7 by October 22nd 2009 when Windows 7 is officially released.
> In addition if you are able to pledge compatibility you'll receive access to a special Windows 7 Partner Marketing Kit that includes a press release with a Microsoft quote, plus customizable marketing templates including; email templates, postcards, web banners, business letter, and copy blocks, all to identify to your customers, or potential customers that your solutions are compatible with Windows 7.
> If you provide me with a phone number where to get in touch with you, I will call you to answer any questions you may have.
> Once you register on the ISV Application Compatibility site, I would appreciate it if you would email me to let me know that you have completed so that I can make a note of it for Microsoft. If you register the application under a different partner or application name please let me know in order to track changes. If there is a new version of the application and there are no plans to support Windows 7 on the older version please register the older version as "No planned Support" on the site as well as the new version with desired Win7 compatibility date.
> Should you have any questions about this email feel free to call me or send an email to my supervisor at v-mafl(a)microsoft.com<mailto:firstname.lastname@example.org>.
> Best regards,
> Joanna Cobb
> Business Development Representative
> niche cubed
> Office: 800.508.4291 Ext. 316
> Confidentiality note: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named in the e-mail. If the reader of the e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading it is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system. Thank you.
----- End forwarded message -----
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/
"It's 106 miles to Chicago. We have a full tank of gas, a half-pack of
cigarettes, it's dark, and we're wearing sunglasses." "Hit it."
Could somebody please clarify the status of PEP 3124? At
http://ftp.python.org/dev/peps/ , it is listed as "under
consideration", but http://ftp.python.org/dev/peps/pep-3124/ says it
has been deferred.
I was reading through the discussion on the python-3000 mailing list
archive, and at one point somebody asked for other examples where
generic functions are used in the community. The numpy project has a
basic generic function mechanism for numpy's ufuncs (regular functions
that operate on arrays), where subclasses of numpy.ndarray can define
__array_prepare__ (this method will be added in numpy-1.4) and
__array_wrap__ methods, which are sort of analogous to @before and
@after in PEP 3124 (ndarray subclasses define an __array_priority__
attribute to decide how to dispatch). The numpy approach is not a
general solution and is not as flexible as what is described in the
PEP, but it can be used by functions that operate on subclasses that
implement matrices, masked arrays, arrays with physical units.
I would be very interested in seeing a framework for generic functions
in the numpy standard library. I think would be more simple and
flexible than what we currently have. Is there still
interest/motivation for supporting generic functions in the standard
I would like to compile a 64 bit version of pywin.
I am currently using MingGW for that, but I fail to do so.
Does anyone know how to compile pywin32 for 64bit operating system?
In addition, any examples for that?
Kalite LAB. wrote:
> Dear authorized,
> I have a question about Python programming language can help you glad
> you do. User as a decimal point "." Instead of character "," we can
> use that character? For example, 10.7 instead of 10,7
This mailing list is for the development of Python, not development with
Python. For general questions about how to do things the python-list
(comp.lang.python.newsgroup) and python-tutor-list are appropriate
places to ask.
That aside I *think* that Python is always culture invariant in its
syntax (you always use the '.' point for floating point literals in
source code) and *also* for how the float type converts strings to
numbers (float('10.7') and not float('10,7')).
I assume there is a way of turning strings to floats honoring the
locale, but off the top of my head I don't know what it is.
All the best,
> Thanks in advance ...
> Best Regards...
> Feyyaz OZEN
> Python-Dev mailing list
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.…