[Python-Dev] pip enhancement

2014-08-27 Thread Neal Becker
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

Re: [Python-Dev] pip enhancement

2014-08-27 Thread Neal Becker
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

[Python-Dev] can't assign to function call

2013-03-18 Thread Neal Becker
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

[Python-Dev] multiprocessing not compatible with functional.partial

2009-02-12 Thread Neal Becker
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.

Re: [Python-Dev] multiprocessing not compatible with functional.partial

2009-02-12 Thread Neal Becker
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 (

Re: [Python-Dev] multiprocessing not compatible with fu nctional.partial

2009-02-12 Thread Neal Becker
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

Re: [Python-Dev] Evaluated cmake as an autoconf replacement

2009-04-06 Thread Neal Becker
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

[Python-Dev] What's missing from easy_install

2009-04-07 Thread Neal Becker
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

[Python-Dev] typo in 8.1.3.1. Format Specification Mini-Language?

2009-05-07 Thread Neal Becker
"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

Re: [Python-Dev] PEP 389: argparse - new command line parsing module

2009-09-28 Thread Neal Becker
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

[Python-Dev] Howto handle multilib conflict?

2009-10-09 Thread Neal Becker
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

Re: [Python-Dev] Howto handle multilib conflict?

2009-10-09 Thread Neal Becker
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

Re: [Python-Dev] Pronouncement on PEP 389: argparse?

2009-12-15 Thread Neal Becker
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

[Python-Dev] argparse ugliness

2010-03-05 Thread Neal Becker
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

Re: [Python-Dev] argparse ugliness

2010-03-07 Thread Neal Becker
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

Re: [Python-Dev] argparse ugliness

2010-03-08 Thread Neal Becker
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

[Python-Dev] interesting article on regex performance

2010-03-11 Thread Neal Becker
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

Re: [Python-Dev] C++

2010-03-13 Thread Neal Becker
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++.

[Python-Dev] argparse ambiguity handling

2010-04-20 Thread Neal Becker
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

Re: [Python-Dev] argparse ambiguity handling

2010-04-20 Thread Neal Becker
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.: >

[Python-Dev] argparse suggestion

2010-04-26 Thread Neal Becker
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

[Python-Dev] multi-version parallel-installed modules

2010-08-18 Thread Neal Becker
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.

[Python-Dev] [patch] fpconst for python3

2010-10-19 Thread Neal Becker
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

[Python-Dev] Document performance requirements?

2006-07-21 Thread Neal Becker
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

Re: [Python-Dev] Document performance requirements?

2006-07-21 Thread Neal Becker
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

Re: [Python-Dev] Document performance requirements?

2006-07-25 Thread Neal Becker
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). &

[Python-Dev] SyntaxError: can't assign to function call

2006-08-09 Thread Neal Becker
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

Re: [Python-Dev] SyntaxError: can't assign to function call

2006-08-09 Thread Neal Becker
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

Re: [Python-Dev] SyntaxError: can't assign to function call

2006-08-11 Thread Neal Becker
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

[Python-Dev] os.unlink() closes file?

2006-09-29 Thread Neal Becker
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). ___

Re: [Python-Dev] os.unlink() closes file?

2006-09-29 Thread Neal Becker
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

[Python-Dev] Proprietary code in python?

2006-10-10 Thread Neal Becker
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

Re: [Python-Dev] PEP: Adding data-type objects to Python

2006-10-29 Thread Neal Becker
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

Re: [Python-Dev] Pydoc Improvements / Rewrite

2007-01-05 Thread Neal Becker
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

[Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Neal Becker
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@

Re: [Python-Dev] syntax misfeature (exception)

2007-01-20 Thread Neal Becker
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

Re: [Python-Dev] Having trouble committing

2007-01-25 Thread Neal Becker
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

[Python-Dev] bool conversion wart?

2007-02-22 Thread Neal Becker
>>> 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

Re: [Python-Dev] bool conversion wart?

2007-02-22 Thread Neal Becker
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

Re: [Python-Dev] bool conversion wart?

2007-02-22 Thread Neal Becker
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' >> >>

[Python-Dev] python3k change to slicing

2007-04-19 Thread Neal Becker
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

[Python-Dev] Linus on garbage collection

2011-05-06 Thread Neal Becker
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

Re: [Python-Dev] Pathscale compilers open source

2011-06-14 Thread Neal Becker
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

Re: [Python-Dev] Draft PEP: "Simplified Package Layout and Partitioning"

2011-07-20 Thread Neal Becker
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

Re: [Python-Dev] The docs, reloaded

2007-05-20 Thread Neal Becker
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

Re: [Python-Dev] The docs, reloaded

2007-05-20 Thread Neal Becker
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

Re: [Python-Dev] The docs, reloaded

2007-05-21 Thread Neal Becker
[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

Re: [Python-Dev] The docs, reloaded

2007-05-22 Thread Neal Becker
[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

[Python-Dev] add bool type to optparse

2007-07-30 Thread Neal Becker
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

Re: [Python-Dev] add bool type to optparse

2007-07-31 Thread Neal Becker
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',

[Python-Dev] python sphinx install?

2007-09-05 Thread Neal Becker
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

Re: [Python-Dev] python sphinx install?

2007-09-05 Thread Neal Becker
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

[Python-Dev] Improved dyn mod load debug

2007-12-17 Thread Neal Becker
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) {

Re: [Python-Dev] PEP: Lazy module imports and post import hook

2008-01-08 Thread Neal Becker
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/ _

[Python-Dev] ctypes issue

2008-01-30 Thread Neal Becker
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

Re: [Python-Dev] Any Emacs tips for core developers?

2008-02-03 Thread Neal Becker
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

Re: [Python-Dev] Any Emacs tips for core developers?

2008-02-04 Thread Neal Becker
[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

Re: [Python-Dev] New math functions

2008-02-15 Thread Neal Becker
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

Re: [Python-Dev] trunk-math

2008-02-16 Thread Neal Becker
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

Re: [Python-Dev] trunk-math

2008-02-18 Thread Neal Becker
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

Re: [Python-Dev] can't set attributes of built-in/extension type

2008-02-23 Thread Neal Becker
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?)

Re: [Python-Dev] can't set attributes of built-in/extension type

2008-02-24 Thread Neal Becker
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

[Python-Dev] download python-2.6 docs?

2008-02-27 Thread Neal Becker
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

Re: [Python-Dev] How we can get rid of eggs for 2.6 and beyond

2008-03-22 Thread Neal Becker
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

Re: [Python-Dev] [Distutils] How we can get rid of eggs for 2.6 and beyond

2008-03-22 Thread Neal Becker
"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

Re: [Python-Dev] [Distutils] How we can get rid of eggs for 2.6 and beyond

2008-03-24 Thread Neal Becker
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

[Python-Dev] pydoc works with eggs? (python-2.5.1)

2008-04-22 Thread Neal Becker
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/

Re: [Python-Dev] pydoc works with eggs? (python-2.5.1)

2008-04-23 Thread Neal Becker
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.

[Python-Dev] segfault in 2.5.1

2008-04-25 Thread Neal Becker
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

[Python-Dev] mmap documentation error (2.5.1)

2008-04-25 Thread Neal Becker
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

Re: [Python-Dev] mmap documentation error (2.5.1)

2008-04-25 Thread Neal Becker
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

[Python-Dev] enhanced ioctl?

2008-04-28 Thread Neal Becker
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

Re: [Python-Dev] enhanced ioctl?

2008-04-28 Thread Neal Becker
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

Re: [Python-Dev] Invitation to try out open source code review tool

2008-05-01 Thread Neal Becker
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

[Python-Dev] improvements for mmap

2009-01-08 Thread Neal Becker
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

Re: [Python-Dev] SWIG (was Re: Ctypes and the stdlib)

2011-08-29 Thread Neal Becker
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.

[Python-Dev] complex I/O problem

2005-02-01 Thread Neal Becker
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! __

[Python-Dev] Problem with module loading on multi-arch?

2006-03-16 Thread Neal Becker
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

Re: [Python-Dev] Problem with module loading on multi-arch?

2006-03-16 Thread Neal Becker
"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

Re: [Python-Dev] Problem with module loading on multi-arch?

2006-03-17 Thread Neal Becker
"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

Re: [Python-Dev] Problem with module loading on multi-arch?

2006-03-17 Thread Neal Becker
"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 &

[Python-Dev] suggest: nowait option in subprocess.communicate

2006-04-05 Thread Neal Becker
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

[Python-Dev] High Level Virtual Machine

2006-06-14 Thread Neal Becker
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

Re: [Python-Dev] Fwd: Distributed RCS

2005-08-14 Thread Neal Becker
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

[Python-Dev] python optimization

2005-09-15 Thread Neal Becker
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

Re: [Python-Dev] python optimization

2005-09-16 Thread Neal Becker
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

[Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
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"

Re: [Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
"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

Re: [Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
"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

Re: [Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
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

Re: [Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
"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

Re: [Python-Dev] Help with inotify

2005-10-27 Thread Neal Becker
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