On systems where os-level packaging is available (e.g., fedora linux), it is
not
unusual to want a newer python package installed than available from the
vendor.
pip install --user can be used for this.
But then there is the danger that these pip installed packages are not
maintained.
At le
want to update via pip) and which are global (and I
can't really do anything about, other than filing a bug report requesting
an update).
On Wed, Aug 27, 2014 at 9:24 AM, Paul Moore wrote:
> On 27 August 2014 13:58, Neal Becker wrote:
> > At least, pip should have the ability t
def F(x):
return x
x = 2
F(x) = 3
F(x) = 3
SyntaxError: can't assign to function call
Do we really need this restriction? There do exist other languages without it.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mail
If the argument to pool.map (f, args)
is
f = functional.partial (my_func, some_keyword_arg=whatever)
I get:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.1.1-py2.5-linux-
self.run()
File "/usr/lib/python2.5/site-packages/multiprocessing-2.6.
Hrvoje Niksic wrote:
> Calvin Spealman wrote:
>> I don't think it would be unreasonable to consider either 1) making
>> functools.partial picklable (I don't know how feasible this is)
>
> It's not only feasible, but quite easy and, I think, useful. A
> "partial" instance is a simple triplet of (
Is it possible to get a better error message (regarding the pickle-ability)?
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40m
David Cournapeau wrote:
> On Mon, Mar 30, 2009 at 2:59 AM, Antoine Pitrou
> wrote:
...
>
> Waf is definitely faster than scons - something like one order of
> magnitude. I am yet very familiar with waf, but I like what I saw -
> the architecture is much nicer than scons (waf core amount of code
1. easy_remove!
2. Various utilities to provide query package management.
- easy_install --list (list files installed)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.pyt
"format_spec ::= [[fill]align][sign][#][0][width][.precision][type]"
"The precision is ignored for integer values."
In [36]: '%3x' % 10
Out[36]: ' a'
In [37]: '%.3x' % 10
Out[37]: '00a'
Apparently, precision is _not_ ignored?
___
Python-Dev mailin
If the plan is to migrate from optparse to argparse, this could be made a
bit easier. If it weren't for the fact that some names are different in
argparse than optparse, I believe many optparse usages could port with no
change.
___
Python-Dev mailing
Just received:
https://bugzilla.redhat.com/show_bug.cgi?id=528237
yum install libotf-devel.i586 libotf-devel.x86_64
yields:
Transaction Check Error:
file /usr/bin/libotf-config from install of libotf-devel-0.9.8-2.fc11.i586
conflicts with file from package libotf-devel-0.9.8-2.fc11.x86_64
fi
Sorry, sent to wrong list! Please ignore.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Ian Bicking wrote:
> On Mon, Dec 14, 2009 at 6:34 PM, sstein...@gmail.com
> wrote:
>>> Although I am of the people who think working modules shouldn't be
>>> deprecated, I also don't think adding compatibility aliases is a good
>>> idea. They only make the APIs more bloated and maintenance more t
I generally enjoy argparse, but one thing I find rather
ugly and unpythonic.
parser.add_argument ('--plot', action='store_true')
Specifying the argument 'action' as a string is IMO ugly.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail
Brian Curtin wrote:
> On Fri, Mar 5, 2010 at 12:51, Neal Becker wrote:
>
>> I generally enjoy argparse, but one thing I find rather
>> ugly and unpythonic.
>>
>>parser.add_argument ('--plot', action='store_true')
>>
>> Specifyi
On Monday 08 March 2010, David Stanek wrote:
> On Mon, Mar 8, 2010 at 10:40 AM, Steven Bethard
>
> wrote:
> > In argparse, unlike optparse, actions are actually defined by objects
> > with a particular API, and the string is just a shorthand for
> > referring to that. So:
> >
> > parser.add_arg
http://swtch.com/~rsc/regexp/regexp1.html
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Neil Hodgson wrote:
> Antoine Pitrou:
>
>> Is this concern still valid? We are in the 2010s now.
>> I'm not saying I want us to put some C++ in the core interpreter, but
>> the portability argument sounds a little old...
>
>There are still viable platforms which only support subsets of C++.
I've noticed argparse ambiguity handling has changed a bit over last few
revisions.
I have cases where 1 valid input is a prefix of another:
e.g.:
'--string'
'--string2'
With the most recent 1.1, the behavior is:
--string=hello
is accepted, while:
--strin=hello
is marked as ambiguous.
I'm
Steven Bethard wrote:
> On Tue, Apr 20, 2010 at 11:55 AM, Neal Becker wrote:
>> I've noticed argparse ambiguity handling has changed a bit over last few
>> revisions.
>>
>> I have cases where 1 valid input is a prefix of another:
>>
>> e.g.:
>
steven.beth...@gmail.com made a very nice module for me to enhance argparse
called argparse_bool.py, which contains ConfigureAction. This will allow a
boolean value to be set very like the gnu configure style:
--foo
--with-foo
--without-foo
--no-foo
--foo=yes
--foo=no
I've been happily using i
Is there any proposal to accommodate having parallel-installed multiple
versions of modules?
I have client code in multiple projects using version x.y of a C-compiled
module A.
I want to test a new version x.z of module A, but all client software needs
to be recompiled against the new version.
Where should I send this patch?
diff -u fpconst-0.7.2/fpconst.py fpconst-0.7.2.new/fpconst.py
--- fpconst-0.7.2/fpconst.py2005-02-24 12:42:03.0 -0500
+++ fpconst-0.7.2.new/fpconst.py2010-10-19 20:55:07.407765664 -0400
@@ -40,18 +40,18 @@
ident = "$Id: fpconst.py,v 1.16 2005/02
For a recent project I needed to select a container. There are plenty of
python data structures to choose from. It seems that information on
performance is missing (or not easy to find).
I think Python should include performance in the documentation of common
data structures to help users select
Nick Coghlan wrote:
> Neal Becker wrote:
>> For a recent project I needed to select a container. There are plenty of
>> python data structures to choose from. It seems that information on
>> performance is missing (or not easy to find).
>>
>> I think Python
On Friday 21 July 2006 7:49 am, Nick Coghlan wrote:
> Neal Becker wrote:
> > For a recent project I needed to select a container. There are plenty of
> > python data structures to choose from. It seems that information on
> > performance is missing (or not easy to find).
&
class X (object):
pass
X() += 2
> SyntaxError: can't assign to function call
Suppose I actually had defined __iadd__ for class X. Python says this
syntax is invalid. I wish is wasn't.
Here's where I might use it. Suppose I have a container class. Suppose I
could make a slice of this con
Terry Reedy wrote:
>
> "Neal Becker" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> class X (object):
>>pass
>>
>> X() += 2
>>
>>> SyntaxError: can't assign to function call
>>
>> Suppose I
Guido van Rossum wrote:
> On 8/10/06, James Y Knight <[EMAIL PROTECTED]> wrote:
>> It makes just as much sense as assigning to an array access, and the
>> semantics would be pretty similar.
>
> No. Array references (x[i]) and attribute references (x.a) represent
> "locations". Function calls repr
It seems (I haven't looked at source) that os.unlink() will close the file?
If so, please make this optional. It breaks the unix idiom for making a
temporary file.
(Yes, I know there is a tempfile module, but I need some behavior it doesn't
implement so I want to do it myself).
___
Ronald Oussoren wrote:
>
> On Friday, September 29, 2006, at 02:22PM, Neal Becker
> <[EMAIL PROTECTED]> wrote:
>
>>It seems (I haven't looked at source) that os.unlink() will close the
>>file?
>>
>>If so, please make this optional. It brea
http://www.google.com/codesearch?q=+doc:DxlBcBw4TXo+proprietary+confidential+show:DxlBcBw4TXo:BwgQSUaGDCc:1s0hP8rbIGE&sa=N&cd=1&ct=ri&cs_p=http://www.python.org/download/releases/binaries-1.3/python-IRIX-5.3-full.tar.gz&cs_f=lib/python/irix5/AWARE.py#a0
I have watched numpy with interest for a long time. My own interest is to
possibly use the c-api to wrap c++ algorithms to use from python.
One thing that has concerned me, and continues to concern me with this
proposal, is that it seems to suffer from a very fat interface. I
certainly have not
No time to review this now, but I'd just like to say that the 1 thing I'd
like to see is support for decent mathematical markup. I think at this
point that support for latex markup is the way to achieve this.
___
Python-Dev mailing list
Python-Dev@pytho
I accidentally wrote:
try:
...
except a,b:
rather than:
try
...
except (a,b):
It appears that the 1st example syntax is silently accepted, but doesn't
seem to work. Is this true? If so, I'd say it's a wart.
___
Python-Dev mailing list
Python-Dev@
Georg Brandl wrote:
> Neal Becker schrieb:
>> I accidentally wrote:
>>
>> try:
>> ...
>> except a,b:
>>
>> rather than:
>>
>> try
>> ...
>> except (a,b):
>>
>> It appears that the 1st example syntax is sile
I've heard it claimed that men often have this problem.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
>>> int ('4')
4
>>> bool ('False')
True
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Jonathan Lange wrote:
> On 2/23/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>> >>> bool ('False')
>> True
>>
>
> Non-empty strings are considered True, empty strings are considered
> False. This is not a wart, as the behaviour matches that
Mike Klaas wrote:
> On 2/22/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>
>> Well consider this:
>> >>>str (4)
>> '4'
>> >>>int(str (4))
>> 4
>> >>>str (False)
>> 'False'
>>
>>
There is one thing I'd like to see changed in a future python. I always
found it surprising, that
>>> x = [1,2,3,4,5]
>>> x[1:10]
[2, 3, 4, 5]
is not an error. This is perhaps the only case (but a fundamental one!)
where an error is silently ignored.
I really can't think of a good justification
http://gcc.gnu.org/ml/gcc/2002-08/msg00552.html
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Skip Montanaro wrote:
> One of my colleagues with a background in the high performance computing
> realm sent me this press release:
>
> http://www.pathscale.com/ekopath4-open-source-announcement
>
> I'm not personally familiar with the Pathscale compilers, but thought some
> folks here migh
I wonder if this fixes the long-standing issue in OS vendor's distributions.
In
Fedora, for example, there is both arch-specific and non-arch directories:
/usr/lib/python2.7 + /usr/lib64/python2.7, for example. Pure python goes into
/usr/lib/python2.7, and code including binaries goes into /u
Sounds very interesting. I just have one concern/question. I hope that
while moving away from latex, we are not precluding the ability to write
math as part of the documentation. What would be my choices for add math
to the documentation? Hopefully using latex, since there really isn't
AFAIK an
Georg Brandl wrote:
> Scott Dial schrieb:
>> Neal Becker wrote:
>>> Sounds very interesting. I just have one concern/question. I hope that
>>> while moving away from latex, we are not precluding the ability to write
>>> math as part of the documentatio
[EMAIL PROTECTED] wrote:
>
> >>> What would be my choices for add math to the documentation?
>
> >> Where in the current documentation is there any math notation /at
> >> all/?
>
> Georg> There is exactly one instance of LaTeX math in the whole docs,
> Georg> it's in the des
[EMAIL PROTECTED] wrote:
>
> It would appear that while we slept Jens Mortensen was busy at work on his
> rst2{latex,latexmath,mathml}.py scripts:
>
> http://docutils.sourceforge.net/sandbox/jensj/latex_math/
>
> Note the date on the files. It seems to work pretty well, and as others
> hav
Subject says it all.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
A.M. Kuchling wrote:
> On Mon, Jul 30, 2007 at 09:50:38AM -0400, Neal Becker wrote:
>> Subject says it all.
>
> Why is boolean support needed, given that optparse has store_true and
> store_false actions? Example usage:
>
> parser.add_option('--confirm',
I'm interested in trying out new style (python 2.6) documentation. I see
we're using docutils + sphinx?
I did: svn co http://svn.python.org/projects/doctools/trunk/
How can I install this to try it with python-2.5?
___
Python-Dev mailing list
Python-D
Georg Brandl wrote:
> Neal Becker schrieb:
>> I'm interested in trying out new style (python 2.6) documentation. I see
>> we're using docutils + sphinx?
>>
>> I did: svn co http://svn.python.org/projects/doctools/trunk/
>>
>> How can I install
I had mistakenly installed a module (Qsci.so) into the wrong directory.
Debugging this was harder than it needed to be (c-level debug of shared
lib).
Currently, the only debug info is from importdl.c:
m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
if (m == NULL) {
Christian Heimes wrote:
> I've attached the first public draft of my first PEP. A working patch
> against the py3k branch is available at http://bugs.python.org/issue1576
>
> Christian
Note also that mercurial has demandimport
http://www.selenic.com/mercurial/wiki/
_
In python 2.5.1:
from ctypes import *
c = c_int(4)
print c == 4
print c.value == 4
False
True
This seem unreasonable to me, and a big invitation to error.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python
Guido van Rossum wrote:
> I believe recent versions of Emacs and Vim have Python support
> standard. At least, it's been years since I last had to do anything to
> install it.
>
> I've heard that there are two independent Python modes for Emacs --
> though they are suppose to be pretty similar. I
[EMAIL PROTECTED] wrote:
[...]
> Finally, for you Ubuntu developers, I'm also using the the pre-release
> XFT GNU emacs, which is very pretty. So far, despite stern and dire
> warnings, it has had no stability issues:
>
> http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs
>
> Look for the "P
Mark Dickinson wrote:
> On Tue, Feb 12, 2008 at 1:52 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
>
>> Also, it would be useful to have a new method, float.is_integer(). This
>> would be better than the current approach where we make the
>> test: if x == floor(x).
>>
>
> How common is this
This sounds great! Thank you for your effort. Let me know if I can help
(perhaps some testing?)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/py
There is a post on boost (http://boost.org) about floating point utilities
that are being considered for review. This seems to have a lot of overlap
with python needs. I haven't reviewed this myself, but boost code is meant
to be quite portable. Here is the link:
http://tinyurl.com/2gg4z3
There is some discussion on this subject, archived here:
http://permalink.gmane.org/gmane.comp.python.general/560661
I wonder if anyone could shed some light on this subject?
(Or, help me understand, what is the difference between a type that I create
using python C api and a python class?)
Guido van Rossum wrote:
> On Sat, Feb 23, 2008 at 4:55 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
>> There is some discussion on this subject, archived here:
>> http://permalink.gmane.org/gmane.comp.python.general/560661
>>
>> I wonder if anyone could shed some
http://docs.python.org/dev/download.html
I want a pdf. The above link says:
"To download an archive containing all the documents for this version of
Python in one of various formats, follow one of links in this table. "
But there are no links.
___
Pyt
Another use case, which I find in my world, is that there are always
packages that interest me (found at pypi), that my vendor hasn't packaged
as rpms yet.
With finite resources, this will always be true.
___
Python-Dev mailing list
Python-Dev@python.or
"Martin v. Löwis" wrote:
>>> Essentially, one would have to contribute patches to all the
>>> distributions (we care about, at least), and then nag the respective
>>> maintainers to include these patches.
>>
>> Not true. You just need to make sure that "setup.py install" creates
>> that database
On Saturday 22 March 2008, Martin v. Löwis wrote:
> > In the case of Fedora rpms, the usual install uses setup.py.
>
> Ok. Does it then also package all files that get installed into
> the RPM file? If it produces multiple RPMs from a single source
> package, how does it know which files go into wh
pydoc blew up when I tried to view doc for pytools module, which is an egg:
pydoc -p 8082
pydoc server ready at http://localhost:8082/
Exception happened during processing of request from ('127.0.0.1', 52915)
Traceback (most recent call last):
File "/usr/
Neal Becker wrote:
> pydoc blew up when I tried to view doc for pytools module, which is an
> egg:
>
> pydoc -p 8082
> pydoc server ready at http://localhost:8082/
>
> Exception happened during processing of request from ('127.
Attempt to write to a mmap which was opened mmap.PROT_READ causes python to
segfault.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/arc
mmap( fileno, length[, flags[, prot[, access]]])
(Unix version) Maps length bytes from the file specified by the file
descriptor fileno, and returns a mmap object. If length is 0, the maximum
length of the map will be the current size of the file when mmap() is
called.
flags specifies the nature
Sorry, my mistake. Acutally, I was trying to debug this:
On linux, I don't understand why:
f = open ('/dev/eos', 'rw')
m = mmap.mmap(f.fileno(), 100, prot=mmap.PROT_READ|mmap.PROT_WRITE,
flags=mmap.MAP_SHARED)
gives 'permission denied', but this c++ code works:
#include
#include
#include
IIUC, current ioctl is not capable of handling arbitrary argument types.
This code will allow any arg type (such as structures with pointers to
embedded structures).
The code for _IOC is taken from linux and might not be portable.
from ctypes import *
libc = CDLL ('/lib/libc.so.6')
#print libc.i
Benjamin Peterson wrote:
> On Mon, Apr 28, 2008 at 7:02 AM, Neal Becker <[EMAIL PROTECTED]> wrote:
>> IIUC, current ioctl is not capable of handling arbitrary argument types.
>> This code will allow any arg type (such as structures with pointers to
>> embedded stru
It would be really nice to see support for some other backends, such as Hg
or bzr (which are both written in python), in addition to svn.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
h
I'd like to suggest some improvements from mmap
1) mmap assign to slice only accepts a string. This is unfortunate, because
AFAIK a string can only be created by copying data, and this is wasteful for
large data transfers. mmap should accept any object supporting buffer protocol
as well as st
Then there is gccxml, although I'm not sure how active it is now.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.
If I call "print" on a complex value, I may get this:
'(2+2j)'
But this is not acceptable as input:
complex ('(2+2j)')
Traceback (most recent call last):
File "", line 1, in ?
ValueError: complex() arg is a malformed string
Whatever format is used for output should be accepted as input!
__
I just installed TwistedSumo-2006-02-12 on x86_64, and noticed a problem.
It installs arch-dep stuff into
/usr/lib64/python2.4/site-packages/twisted,
and arch-indep into
/usr/lib/python2.4/site-packages/twisted
as it should. But:
from twisted.web import html
exceptions.ImportError: No modul
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> I'm guessing that what's happening is that since there is an
>> /twisted, we never find the module /twisted/web.
>> If my analysis (guess) is correct, I think we have a problem with the
>> mod
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> 1. Does it make sense to have both
>>
>> /app/subpackage
>> and
>> /app/subpackage
>> ?
>>
>> My answer: definitely yes. We already agree that we should have both
>> site-dep fo
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> Sorry, maybe I used confusing terminology.
>>
>> A reference is here: http://fedoraproject.org/wiki/Packaging/Python
>> This is the current setup. For example, this is a standard macro used by
&
I'd like to start several processes, each a pipe reading from my python main
process. It looks like I want to write all my data to each process, then
use communicate(), but I don't want to wait for each process yet, since
then they would block each other. Why not add a nowait option to
communicat
I thought this announcement was interesting:
http://hlvm.org/
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
I encourage everyone to look at mercurial. It is also written in Python. I
am using it daily.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/pyth
I use cpython. I'm accustomed (from c++/gcc) to a style of coding that is
highly readable, making the assumption that the compiler will do good
things to optimize the code despite the style in which it's written. For
example, I assume constants are removed from loops. In general, an entity
is de
One possible way to improve the situation is, that if we really believe
python cannot easily support such optimizations because the code is too
"dynamic", is to allow manual annotation of functions. For example, gcc
has allowed such annotations using __attribute__ for quite a while. This
would al
I'm trying to make a module to support inotify (linux). I put together a
module using boost::python. Problem is, inotify uses a file descriptor.
If I call python os.fdopen on it, I get an error:
Python 2.4.1 (#1, May 16 2005, 15:15:14)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help"
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> Any ideas? I'd rather not have to trace through python if I could avoid
>> it (I don't even have source installed here).
>
> Use strace, then. Find out what precise system call gives you this
> error. I
"Martin v. Löwis" wrote:
> Neal Becker wrote:
>> Yes, tried that- learned nothing.
>
> Please go back further in the trace file. There must be a return
> value of -1 (EISDIR) somewhere in the file, try to locate that.
>
>> Here's strace. The write o
Bob Ippolito wrote:
>
> On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
>
>> "Martin v. Löwis" wrote:
>>
>>> I see. Python is making up the EISDIR, looking at the stat result.
>>> In Objects/fileobject.c:dircheck generates the EISDIR er
"Martin v. Löwis" wrote:
> I see. Python is making up the EISDIR, looking at the stat result.
> In Objects/fileobject.c:dircheck generates the EISDIR error, which
> apparently comes from posix_fdopen, PyFile_FromFile,
> fill_file_fields.
>
> Python simply does not support file objects which stat
Bob Ippolito wrote:
>
> On Oct 27, 2005, at 4:58 PM, Neal Becker wrote:
>
>> Bob Ippolito wrote:
>>
>>
>>>
>>> On Oct 27, 2005, at 4:32 PM, Neal Becker wrote:
>>>
>>>
>>>> "Martin v. Löwis" wrote:
>&g
92 matches
Mail list logo