[Windows embedding] sys.path not properly initialized (was: PyImport_ImportModule/embedding: surprising behaviors)

2007-10-25 Thread David Abrahams
on Sat Mar 24 2007, "Ziga Seilnacht" wrote: > David Abrahams wrote: >> I'm seeing highly surprising (and different!) behaviors of >> PyImport_ImportModule on Linux and Windows when used in a program with >> python embedding. >> >> On Linux, ...

Re: Proposal: s1.intersects(s2)

2007-07-05 Thread David Abrahams
on Thu Jul 05 2007, Christoph Zwerschke wrote: > Steven D'Aprano wrote: >> I'm not a professional set theorist, but in 15-odd years of studying and >> teaching maths I've never come across mathematicians using intersect as a >> verb except as informal short-hand. I often say "North Street and So

Re: Proposal: s1.intersects(s2)

2007-07-04 Thread David Abrahams
on Wed Jul 04 2007, "Steven D'Aprano" wrote: > On Wed, 04 Jul 2007 14:37:34 +, Marc 'BlackJack' Rintsch wrote: > >> On Wed, 04 Jul 2007 09:59:24 -0400, David Abrahams wrote: >> >>> Here's an implementation of the

Re: import mysteries

2007-07-04 Thread David Abrahams
on Wed Jul 04 2007, Peter Otten <__peter__-AT-web.de> wrote: >>> Explicitly passed, see >>> >>> > http://genshi.edgewall.org/browser/trunk/genshi/filters/tests/transform.py >> >> IIRC I ran doctest on the file I cited, not the one you're pointing >> at. Is there some new magic doctest feature I

Proposal: s1.intersects(s2)

2007-07-04 Thread David Abrahams
Here's an implementation of the functionality I propose, as a free-standing function: def intersects(s1,s2): if len(s1) < len(s2): for x in s1: if x in s2: return True else: for x in s2: if x i

Re: import mysteries

2007-07-03 Thread David Abrahams
on Thu Jun 21 2007, Peter Otten <__peter__-AT-web.de> wrote: > David Abrahams wrote: > >> I'm pretty comfortable with Python, but recently I'm constantly >> finding mysterious issues with import. For example, looking at >> >> http://ge

Re: import mysteries

2007-07-03 Thread David Abrahams
on Thu Jun 21 2007, Ben Finney wrote: > David Abrahams <[EMAIL PROTECTED]> writes: > >> I'm pretty comfortable with Python, but recently I'm constantly >> finding mysterious issues with import. For example, looking at >> >> http://genshi.edgewall

Re: import mysteries

2007-07-03 Thread David Abrahams
on Fri Jun 22 2007, "Steven D'Aprano" wrote: > There are ways to bypass the import system. The most obvious would be to > write directly to globals. > spanish_inquisition > Traceback (most recent call last): > File "", line 1, in ? > NameError: name 'spanish_inquisition' is not defined

distutils/setuptools de-installation?

2007-06-25 Thread David Abrahams
I've been googling myself silly trying to find an answer to this; my system's package manager is broken until I can solve it. I installed some packages using python setup.py install and I need to remove them. For some packages, python setup.py develop --uninstall is good enough, because

import mysteries

2007-06-21 Thread David Abrahams
I'm pretty comfortable with Python, but recently I'm constantly finding mysterious issues with import. For example, looking at http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py the examples use the symbol 'HTML' but it's not defined locally, it's not explicitly imported, a

PyImport_ImportModule/embedding: surprising behaviors

2007-03-20 Thread David Abrahams
I'm seeing highly surprising (and different!) behaviors of PyImport_ImportModule on Linux and Windows when used in a program with python embedding. On Linux, when attempting to import a module xxx that's in the current directory, I get ImportError: No module named xxx I can work around the pr

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-06 Thread David Abrahams
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > I discovered FP with David Mertz's papers about FP in Python. I had > never read nor write a line of lisp, scheme, haskell, caml etc before. > And I'd certainly start thinking of choosing another MYFL if anonymous > functions where to disappear

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-06 Thread David Abrahams
Tom Anderson <[EMAIL PROTECTED]> writes: > Comrades, > > During our current discussion of the fate of functional constructs in > python, someone brought up Guido's bull on the matter: > > http://www.artima.com/weblogs/viewpost.jsp?thread=98196 > > He says he's going to dispose of map, filter, red

Compatibility of recent GCC/Python versions

2005-07-06 Thread David Abrahams
Recently people testing Boost.Python with GCC on Linux have reported that the extensions being tested have to be compiled with exactly the same version of GCC as the Python they're being loaded into, or they get mysterious crashes. That doesn't correspond to my past experience; it has always been