Re: [Python-Dev] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
Graham Horler wrote:
> I would be inclined to move gcc to gcc-real (for example), and create a script
> called gcc which dumps all environment variables, and command-line arguments

Well, I tried that -- and things got even weirder still.

With the wrapper in place between distutils and gcc, the
linking command *worked*.

So then I cut the wrapper down so that the only thing it
does is call gcc, and it *still* works.

Just to make sure, I tried it again without the wrapper,
and it failed.

So the bizarre state of affairs is that if distutils
runs gcc through a shell script, it works, but if
it runs gcc directly, it doesn't work.

Anyone have any ideas on how that can happen?

--
Greg
___
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] UTF8 in the PEP branch

2007-10-12 Thread Martin v. Löwis
>   # Date: $Date: 2005-12-07 20:46:30 -0300 (mié, 07 dic 2005) $
> 
> A *lot* of files failed this way. I started to fix them (-*- coding
> -*- line at the start), but then I thought that maybe *I* was doing
> something wrong, because it's strange that nobody noticed this
> before...
> 
> So, shall I continue fixing these? Or what I'm doing wrong here?

I believe it's subversion that is doing something wrong. In my copy
of the file, I get

# Contact: [EMAIL PROTECTED]
# Revision: $Revision: 4152 $
# Date: $Date: 2005-12-08 00:46:30 +0100 (Do, 08 Dez 2005) $

which isn't any better, but happens to be ASCII (the only non-ASCII
dates that I may get are during March - März).

IMO, it's a flaw in subversion that it translates the date (or even
provides a textual form of the date in the first place). It shouldn't
do that, or at least provide a way to get the date expanded according
to the "C" locale.

As a work-around, you can update your sources with

LANG=C svn up

which will prevent Date from being translated to your language.

Regards,
Martin

P.S. Notice that subversion also prints the time in local time, rather
than UTC, so our copies even disagree on the day-of-month on which
this revision was committed. So the proper command line would be

LANG=C TZ=GMT svn up
___
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] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Oleg Broytmann
On Fri, Oct 12, 2007 at 09:21:15PM +1300, Greg Ewing wrote:
> So the bizarre state of affairs is that if distutils
> runs gcc through a shell script, it works, but if
> it runs gcc directly, it doesn't work.
> 
> Anyone have any ideas on how that can happen?

   Do you have a few different copies of gcc installed with setup.py called
the wrong one and your shell script the right one?

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.
___
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] UTF8 in the PEP branch

2007-10-12 Thread Facundo Batista
2007/10/12, "Martin v. Löwis" <[EMAIL PROTECTED]>:

> I believe it's subversion that is doing something wrong. In my copy
> of the file, I get
>
> # Contact: [EMAIL PROTECTED]
> # Revision: $Revision: 4152 $
> # Date: $Date: 2005-12-08 00:46:30 +0100 (Do, 08 Dez 2005) $

Looking the file through the web browser, I see:

  Version: $Revision$
  Last-Modified: $Date$

So, SVN is touching that. I guess that that is actually the idea, but
is breaking thing for us-non-7bits-speakers, :)

I see two solutions to this:

- Find a way to specify something in the original PEP file so SVN
translates always the dates in English.

- Touch the .py and adapt them to support this characters.

I prefer point 2.

What do you think? (if it's ok, I'll add the "coding" line in the
files where is needed).

Regards,

-- 
.Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
___
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] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Shane Hathaway wrote:
> Shane Hathaway wrote:
>> I'm interested in seeing a good way to write tail calls in Python.  Some
>> algorithms are more readable when expressed using tail recursion.
> 
> About ten seconds after I wrote the previous message, I realized two things:
> 
> - It's easy to write "return Return" instead of "raise Return".  So
> "raise TailCall" is probably better.
> 
> - I can write a complete implementation of this idea with nothing but a
> simple decorator.  Check it out!

With yet another 10 seconds, I realized my quick implementation actually
does nothing to optimize tail calls.  Working on a fix.

Shane

___
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] Python developers are in demand

2007-10-12 Thread Christian Heimes
Guido van Rossum wrote:
> I keep getting regular requests from people looking for Python coders
> (and this is in addition to Google asking me to hand over my contacts
>  :-) . This is good news because it suggests Python is on the uptake
> (always good to know). At the same time it is disturbing because
> apparently there aren't enough Python programmers out there. (At least
> none of them looking for work.) What's up with that?

I know at least one Python developer who is looking for a Python job -
me. :]

The problem may be related to the fact that Python is rarely teached at
school or university. I know no school or university in Germany that is
teaching Python. It's mostly Pascal, Basic or C derivates at school and
C/C++, Java or nowadays C# at university. Some courses of studies even
teach PHP or Flash!
On the other hand Python is gaining big momentum in science. A friend of
mine who works at CERN once told me that they use Python as a glue and
front end language for their problems.

less teaching + growing demand = lack of available developers

> I wonder if we should start maintaining a list of Python developers
> for hire somewhere on python.org, beyond the existing Jobs page. Is
> anyone interested in organizing this?

There is definitely an interest in having a list of available
developers. What would it take to organize a list? How do we avoid to
create yet another XING (http://en.wikipedia.org/wiki/XING), LinkedIn
(http://en.wikipedia.org/wiki/LinkedIn) or SourceForge Marketplace
clone? Could we collaborate with one or multiple major players in the
job market?

Christian
___
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] Explicit Tail Calls

2007-10-12 Thread Adam Olsen
On 10/12/07, Shane Hathaway <[EMAIL PROTECTED]> wrote:
> Shane Hathaway wrote:
> > Shane Hathaway wrote:
> >> I'm interested in seeing a good way to write tail calls in Python.  Some
> >> algorithms are more readable when expressed using tail recursion.
> >
> > About ten seconds after I wrote the previous message, I realized two things:
> >
> > - It's easy to write "return Return" instead of "raise Return".  So
> > "raise TailCall" is probably better.
> >
> > - I can write a complete implementation of this idea with nothing but a
> > simple decorator.  Check it out!
>
> With yet another 10 seconds, I realized my quick implementation actually
> does nothing to optimize tail calls.  Working on a fix.

Since they're not going to be accepted into python anyway, the
implementation is off-topic for python-dev.  Please take them up
elsewhere (such as my offer to discuss in private.)

-- 
Adam Olsen, aka Rhamphoryncus
___
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] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Shane Hathaway wrote:
> I'm interested in seeing a good way to write tail calls in Python.  Some
> algorithms are more readable when expressed using tail recursion.

About ten seconds after I wrote the previous message, I realized two things:

- It's easy to write "return Return" instead of "raise Return".  So
"raise TailCall" is probably better.

- I can write a complete implementation of this idea with nothing but a
simple decorator.  Check it out!

Shane



class TailCall(Exception):
def __init__(self, f, *args, **kwargs):
self.f = f
self.args = args
self.kwargs = kwargs


def has_tail_calls(f):
def tail_call_wrapper(*args, **kwargs):
try:
return f(*args, **kwargs)
except TailCall, e:
return e.f(*e.args, **e.kwargs)
tail_call_wrapper.__doc__ = f.__doc__
return tail_call_wrapper


@has_tail_calls
def fact2(n, v=1):
"""
>>> fact2(1)
1
>>> fact2(2)
2
>>> fact2(3)
6
>>> fact2(4)
24
>>> fact2(20)
243290200817664L
"""
if not n:
return v
else:
raise TailCall(fact2, n - 1, v * n)


if __name__ == '__main__':
import doctest
doctest.testmod()

___
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] what license for a module derived from Objects/dictobjec.c

2007-10-12 Thread Martin v. Löwis
> This is for an extension module that is clearly (for the knowledgeable) 
> derived from Python's Objects/dictobject.c and Include/dictobject.h.
> 
> 
> Should I refer to MIT, LGPL or BSD. Any particular copy of a license I 
> should put up on my website and refer to with a URL?

If this is work derived from dictobject.h, you are bound by the Python
license, see the file LICENSE for details. It is
fairly strict in what you have to do, see, in particular, clause 2
of the PSF license, the BeOpen License, and the the CNRI license.

You have to include the license file itself, as well as a certain magic
incantation.

HTH,
Martin

___
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] Summary of Tracker Issues

2007-10-12 Thread Tracker

ACTIVITY SUMMARY (10/05/07 - 10/12/07)
Tracker at http://bugs.python.org/

To view or respond to any of the issues listed below, click on the issue 
number.  Do NOT respond to this message.


 1298 open (+26) / 11458 closed ( +7) / 12756 total (+33)

Open issues with patches:   420

Average duration of open issues: 681 days.
Median duration of open issues: 727 days.

Open Issues Breakdown
   open  1293 (+26)
pending 5 ( +0)

Issues Created Or Reopened (34)
___

split(None, maxsplit) does not strip whitespace correctly10/07/07
CLOSED http://bugs.python.org/issue1123reopened brett.cannon 
   

subprocess.py stdout of childprocess always buffered.10/05/07
CLOSED http://bugs.python.org/issue1241created  jason.w.kim  
   

test 10/06/07
CLOSED http://bugs.python.org/issue1242created  gopiyadav26  
   

option.dest not set when callback called with optparse   10/06/07
   http://bugs.python.org/issue1243created  cjw296   
   

Error on 'raise' does not show correct line number and Traceback 10/08/07
CLOSED http://bugs.python.org/issue1244created  alexander.shirokov   
   

Document PySys_* API functions   10/08/07
   http://bugs.python.org/issue1245created  brett.cannon 
   

Document PySys_GetObject()   10/08/07
CLOSED http://bugs.python.org/issue1246created  brett.cannon 
   

PEP 3137 patch (repr, names, parser) 10/08/07
   http://bugs.python.org/issue1247created  tiran
   patch   

ftplib needs a rewrite to use bytes/buffers  10/08/07
   http://bugs.python.org/issue1248created  brett.cannon 
   py3k

PEP 3137 patch: PyBytes/PyUnicode comparisons10/09/07
CLOSED http://bugs.python.org/issue1249created  thomas.lee   
   

Building external modules using Sun Studio 1210/09/07
   http://bugs.python.org/issue1250created  anilj
   

ssl module doesn't support non-blocking handshakes   10/09/07
   http://bugs.python.org/issue1251created  chris.stawarz
   

IDLE - patch Delegator to support callables  10/10/07
   http://bugs.python.org/issue1252created  taleinat 
   patch   

IDLE - Percolator overhaul   10/10/07
   http://bugs.python.org/issue1253created  taleinat 
   patch   

pdb fails to launch some script. 10/10/07
   http://bugs.python.org/issue1254created  romain_jacquet   
   

Strange Python hangup10/10/07
   http://bugs.python.org/issue1255created  kakacek  
   

subprocess Popen wait() function hangs when stdout is > 2048010/10/07
   http://bugs.python.org/issue1256created  superwesman  
   

atexit errors should result in nonzero exit code 10/10/07
   http://bugs.python.org/issue1257created  aminusfu 
   

Removal of basestring type   10/10/07
   http://bugs.python.org/issue1258created  tiran
   patch   

string find and rfind methods give a TypeError that is misleadin 10/10/07

[Python-Dev] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Hello,

I'm interested in seeing a good way to write tail calls in Python.  Some
algorithms are more readable when expressed using tail recursion.

I know tail call optimization has been discussed before [1], but I would
like to consider a different approach.  The previous discussion centered
on implicit tail call optimization, which incurs the risk of changing
the behavior of currently working code.  (For example, is it safe to
optimize tail calls within try...finally blocks?  Probably not.  And I
generally want all stack frames to appear in tracebacks, unless I say
otherwise.)

I would like to suggest an explicit form of tail calls.  A new built-in
exception type called "Return" will be added, and it will be used like this:

def fact2(n, v):
if n:
raise Return(fact2, n-1, v*n)
else:
return v

The interpreter will catch Return exceptions and use them to call
something else.  The caller of a function that uses "raise Return" will
see the result of the tail call as the returned value, rather than the
Return exception.  I am not yet considering implementation details.

Not all algorithms are good candidates for this.  I used the fact2
example only because it's readily available.  I know there are other
people interested in tail call optimization in Python [2] [3]; perhaps
some of them are watching and can provide better examples.

Furthermore, there might be some explicit syntax that converts "return
f(...)" statements to "raise Return(f, ...)", such as a decorator.
However, I'm less interested in the syntax and more interested in the
basic capability.

Shane

[1] http://mail.python.org/pipermail/python-dev/2004-July/046150.html
[2] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474088
[3] http://www.voidspace.org.uk/python/weblog/arch_d7_2007_09_22.shtml#e833
___
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] Python developers are in demand

2007-10-12 Thread Guido van Rossum
I keep getting regular requests from people looking for Python coders
(and this is in addition to Google asking me to hand over my contacts
:-). This is good news because it suggests Python is on the uptake
(always good to know). At the same time it is disturbing because
apparently there aren't enough Python programmers out there. (At least
none of them looking for work.) What's up with that?

I wonder if we should start maintaining a list of Python developers
for hire somewhere on python.org, beyond the existing Jobs page. Is
anyone interested in organizing this?

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
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] UTF8 in the PEP branch

2007-10-12 Thread Martin v. Löwis
> Looking the file through the web browser, I see:
> 
>   Version: $Revision$
>   Last-Modified: $Date$
> 
> So, SVN is touching that. I guess that that is actually the idea, but
> is breaking thing for us-non-7bits-speakers, :)

Please read about the svn:keywords feature, and yes, that is the idea.

> I see two solutions to this:
> 
> - Find a way to specify something in the original PEP file so SVN
> translates always the dates in English.

Are you sure you are talking about the file that contains the
PEP itself? Or are you perhaps talking about the source code of
docutils?

AFAICT, the problem is in docutils, not in the PEPs.

> - Touch the .py and adapt them to support this characters.
> 
> I prefer point 2.
> 
> What do you think? (if it's ok, I'll add the "coding" line in the
> files where is needed).

I cannot answer that question, because I don't understand your
proposal. What file would you like to touch, and are you sure
you have write permission to it?

Regards,
Martin

___
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] Explicit Tail Calls

2007-10-12 Thread Adam Olsen
On 10/12/07, Shane Hathaway <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm interested in seeing a good way to write tail calls in Python.  Some
> algorithms are more readable when expressed using tail recursion.
>
> I know tail call optimization has been discussed before [1], but I would
> like to consider a different approach.  The previous discussion centered
> on implicit tail call optimization, which incurs the risk of changing
> the behavior of currently working code.  (For example, is it safe to
> optimize tail calls within try...finally blocks?  Probably not.  And I
> generally want all stack frames to appear in tracebacks, unless I say
> otherwise.)
>
> I would like to suggest an explicit form of tail calls.  A new built-in
> exception type called "Return" will be added, and it will be used like this:

So long as you're willing to make it explicit (which I strongly
encourage), you can accomplish nearly anything you'd like with
decorators and functions.  There doesn't seem to be strong enough use
cases to get anything into the core language anyway.

If you don't like the existing decorator recipes I can help you come
up with a better one in private, off the list.


> def fact2(n, v):
> if n:
> raise Return(fact2, n-1, v*n)
> else:
> return v

I hope your use cases are better than this. ;)


> The interpreter will catch Return exceptions and use them to call
> something else.  The caller of a function that uses "raise Return" will
> see the result of the tail call as the returned value, rather than the
> Return exception.  I am not yet considering implementation details.
>
> Not all algorithms are good candidates for this.  I used the fact2
> example only because it's readily available.  I know there are other
> people interested in tail call optimization in Python [2] [3]; perhaps
> some of them are watching and can provide better examples.
>
> Furthermore, there might be some explicit syntax that converts "return
> f(...)" statements to "raise Return(f, ...)", such as a decorator.
> However, I'm less interested in the syntax and more interested in the
> basic capability.
>
> Shane
>
> [1] http://mail.python.org/pipermail/python-dev/2004-July/046150.html
> [2] http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474088
> [3] http://www.voidspace.org.uk/python/weblog/arch_d7_2007_09_22.shtml#e833
> ___
> 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/rhamph%40gmail.com
>


-- 
Adam Olsen, aka Rhamphoryncus
___
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] Python developers are in demand

2007-10-12 Thread Brett Cannon
On 10/12/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
> I keep getting regular requests from people looking for Python coders
> (and this is in addition to Google asking me to hand over my contacts
> :-). This is good news because it suggests Python is on the uptake
> (always good to know).

Yeah, I have noticed as well.  I have seen an increase in random
emails from people looking for Python developers.

> At the same time it is disturbing because
> apparently there aren't enough Python programmers out there. (At least
> none of them looking for work.) What's up with that?
>

It's still not taught in schools.  I still rarely see a new grad
student in my lab who has used Python before they meet me.  And even
after I give a Python tutorial to the lab and people realize it's a
great language, they wait until a project comes up where they need to
start from scratch to use it.  Unfortunately that project never comes
up.

So I would guess the only people becoming new Python programmers are
either the self-motivated people who are curious about the language or
people whose job requires it.

> I wonder if we should start maintaining a list of Python developers
> for hire somewhere on python.org, beyond the existing Jobs page. Is
> anyone interested in organizing this?

You thinking like contractors or anyone out of work?

-Brett
___
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] what license for a module derived from Objects/dictobjec.c

2007-10-12 Thread Anthon van der Neut
I would like to get some advice on which license to include/refer to in 
my setup.py (and probably the source files).

This is for an extension module that is clearly (for the knowledgeable) 
derived from Python's Objects/dictobject.c and Include/dictobject.h.

I first of all don't want to infringe any original license on that code. 
  I second would like to make sure the license for code is not a problem 
to make it into Linux distributions like Ubuntu/Debian  (assuming of 
course the code is acceptable and fills enough of a gap that these 
distros want to pick it up in the first place).
And thirdly, I although I would like my name to be associated on further 
derivations of this module, that is not a strict requirement.

Should I refer to MIT, LGPL or BSD. Any particular copy of a license I 
should put up on my website and refer to with a URL?
Any examples or references with a brief explanation would be much 
appreciated.

I know I could look at what other modules use, but at this point I 
rather spent time on finishing implementing the "insert" method (and 
some tests) and getting my first release out (and hopefullysome 
feedback), than comparing other modules for the license they chose and 
try to deduct what I should use/specify for a license.

Thanks in advance
Anthon

For the curious: the module is called ordereddict. It is an 
implemenation in C of a dictionary with ordered keys based on Key 
Insertion Order. Value updating of existing Key/Value pairs does not 
reorder the keys, although I probably implement that as an 
(instantiation) option after the initial version.

orderdict() does all that dict() does, except for instantiation it will 
only take another ordereddict() (not a dict) or an ordered list of 
pairs. Some extras (reverse(), index()) are already implemented and work 
like Larosa/Foord's odict.OrderedDict() (theirs is also the example I 
took for the representation of the ordereddict).

ordereddict() is 5-10% slower than dict() (especially key deletion is 
'expensive') and it is 5-9 times faster than odict.OrderedDict()

I have done all of the development under Linux but will be proably be 
able to test things under Windows and may, at some point even dig up my 
old G4 to see how things go on OS X. I am fairly confident that the C 
code is still portable, or close to it.
___
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] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Adam Olsen wrote:
> Since they're not going to be accepted into python anyway, the
> implementation is off-topic for python-dev.  Please take them up
> elsewhere (such as my offer to discuss in private.)

I was aware of Guido's earlier rejections, but I figured the rejection
was due to the risky implicit optimization proposed by others.  Perhaps
the objection is deeper than that; I suspect Guido specifically objects
to excessive use of recursion.  Anyway, I've posted a recipe:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/534104

Shane

___
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] Python developers are in demand

2007-10-12 Thread Martin v. Löwis
> The problem may be related to the fact that Python is rarely teached at
> school or university. I know no school or university in Germany that is
> teaching Python.

I teach Python to the first semester, at the Hasso-Plattner-Institut
in Potsdam, for the third year now.

Regards,
Martin
___
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] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
Oleg Broytmann wrote:
>Do you have a few different copies of gcc installed with setup.py called
> the wrong one and your shell script the right one?

As far as I can tell, it's using my PATH to find gcc,
and that leads to /usr/bin/gcc, which is the same one
my wrapper calls.

--
Greg
___
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] SSL 1.7

2007-10-12 Thread Bill Janssen
I've now got a large complex long-lived threaded server asyncore-based
(Medusa) multi-client server program running on OS X with Python 2.3.5
and the "older-Python" SSL module.  I had to make a number of changes
to the code; primarily fixing the way that certain "socket" methods
are called on the SSLSocket, and in the C code, allowing for changes
to the socket blocking attribute that are made out-of-band from use of
the SSL context.

I'll fold that back into the trunk next week, and produce a patch for
the 3K branch after that.

Meanwhile, I've updated the PyPI package to SSL 1.7.

Paul, this also fixes (I hope :-) the setup.py bug you mentioned in
1.6.

Chris, you might want to try this one with Twisted; I believe it will
work OK.

One thing to watch out for: ssl.SSLError can't inherit from
socket.error, as it does in 2.6+, so if you are catching exceptions,
you need to trap them like:

  except ssl.SSLError, x:
 ...
  except socket.error, x:
 ...

which idiom will continue to work for 2.6 and later.

Bill


___
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] MacOSX -framework options and distutils weirdness

2007-10-12 Thread Greg Ewing
I wrote:

> As far as I can tell, it's using my PATH to find gcc,
> and that leads to /usr/bin/gcc, which is the same one
> my wrapper calls.

To make sure, I installed my wrapper in place of /usr/bin/gcc
and the same behaviour occurs.

--
Greg
___
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