Re: [Python-Dev] Re: 2.4 news reaches interesting places

2004-12-12 Thread Martijn Faassen
Phillip J. Eby wrote:
At 08:22 AM 12/11/04 -0800, Guido van Rossum wrote:
BTW I strongly disagree that making easy .EXE binaries available will
address this issue; while not bundled, there are plenty of solutions
for maning .EXEs for those who need them, and this is not something
that typically worries managers. But the perception of Python as
"slow" does worry managers.
The relevant memes are that "compiled == fast", and that ".exe == 
compiled".

It's not about .exe as a distribution format, but rather that producing 
an .exe is supporting evidence of having a "real" compiler.

IOW, if there exists a compiler, but it doesn't produce .exe's, it won't 
be considered a "real" compiler by many programmers.
This is indeed an extremely common set of memes. It especially haunts 
people who have done some programming in the past but don't really have 
it as their main focus now. Many managers would be in this group.

It's a PC-platform thing mostly. In the early days of the PC, you had 
BASIC, and you had compiled languages. Interpreted BASIC was considered 
to be unprofessional and slow. Distributing your program as a .bas file 
was considered to be a sign of amateurism. Besides, interpreters on that 
hardware *were* sometimes unacceptably slow. If you got a compiled .exe 
it was a sign of performance and more professionalism. Microsoft was 
quite aware of this meme: they did the trick with Visual Basic 
(packaging their interpreter in the .exe and called it 'compiled'.

The "compiled == fast" meme is also very common among programmers 
themselves; I know I myself had to wrestle free of it (I didn't care 
about .exes by that time as I was on linux). That's probably why we have 
so many Python programmers saying, "well, yeah, Python is not as fast as 
compiled languages but it's fast enough"; that's the counter meme that 
replaced the "compilation is good" meme that was there in those people 
before. It's quite possible that some of these programmers influence 
managers.

Regards,
Martijn
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


RE: [Python-Dev] 2.4 news reaches interesting places

2004-12-12 Thread John J Lee
On Wed, 8 Dec 2004, Raymond Hettinger wrote:

> > One thing that bugs me: the article says 3 or 4 times that Python is
> > slow, each time with a refutation ("but it's so flexible", "but it's
> > fast enough") but still, they sure seem to harp on the point. This is
> > a PR issue that Python needs to fight -- any ideas?
[...]
> * Have python.org prominently feature an article of Python's use in
> high-performance environments.  IIRC, somebody wrote a realtime voice
> over internet system and found that with good design, there was no speed
> issue.  Also, the cellphone apps may make a good example.
[...]

IIRC, Alex Martelli mentioned a video application at last year's ACCU /
Python UK conference.  He said the system never went into production, but
it sounded like a good meme from the speed point of view: it triggered
surprised and gleeful noises from the mixed Python / C++ / Java audience
;-).


John
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] 2.4 news reaches interesting places

2004-12-12 Thread John J Lee
On Wed, 8 Dec 2004, Phillip J. Eby wrote:

> At 02:18 PM 12/8/04 -0800, Guido van Rossum wrote:
> >I was pleasantly surprised to find a pointer to this article in a news
> >digest that the ACM emails me regularly (ACM TechNews).
> >
> >http://gcn.com/vol1_no1/daily-updates/28026-1.html
> >
> >One thing that bugs me: the article says 3 or 4 times that Python is
> >slow, each time with a refutation ("but it's so flexible", "but it's
> >fast enough") but still, they sure seem to harp on the point. This is
> >a PR issue that Python needs to fight -- any ideas?
> 
> The only thing that will fix the PR issue is to have a Python compiler 
> distributed as part of the language.  It doesn't matter if it doesn't 

I suspect you're correct, but the suggestion elsewhere to bundle py2exe
seems likely to be counterproductive to me: merely emphasizing the
"interpreterness" of Python the moment the idea spreads that Python-built
.exe's are so big because they're just an interpreter plus a script.

I'm sure PyPy, if successful, will be a big win on both PR and technical
fronts.

On a seperate PR issue, I use the word 'script' above advisedly: At work,
I've noticed technical employees of clients who use Java often seem to
take some satisfaction in referring to our web applications (which of
course, consist of who knows how many packages, modules and classes) as
"CGI scripts".  We do use CGI, but the CGI scripts themselves are always
about five lines long and just contain boilerplate code and configuration
to kick off our framework.  You can see them imagining a great long script
named doeverything.cgi...


John
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Re: 2.4 news reaches interesting places

2004-12-12 Thread Fredrik Lundh
John J Lee wrote:

> the idea spreads that Python-built .exe's are so big because they're just
> an interpreter plus a script.

that's why exemaker is so great, of course: all EXE files are 4 kilobytes.

as for the PYC files, hide them in a ZIP archive named DAT, HLP, OCX,
or even DLL, and you're done.

 



___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread "Martin v. Löwis"
Christian Tismer wrote:
Maybe we can set this up as a service?
I have the compiler and could do something like
doing a checkout, build, and upload new binary
for a number of projects.
I don't think this needs to be too automated.
Offering this service is a good thing, and if somebody
volunteers, I will applaud. However, I believe that
it will be used less often than this thread might
suggest: Many developers do have VS.NET available, or
know somebody in their user community who does (or
would know if they asked), so a "global" compilation
service would likely be an infrequently-used fallback.
Nevertheless: if somebody wants to offer this for,
say, 6 months, I'd be really curious what the feedback
will be. We could announce this on pydotorg and elsewhere
if that volunteers desires.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Supporting Third Party Modules (was The other Py2.4 issue)

2004-12-12 Thread "Martin v. Löwis"
Bob Ippolito wrote:
I believe this is not implementable: How can the DLL know which Python
DLL to use?

Well for py2app on Mac OS X, I wrote an executable stub that chooses a 
Python runtime from an XML file, looks up and binds a few symbols from 
it dynamically, and then starts doing stuff.
While that would work, I think this is inappropriate for this specific
issue: we want to write extension modules which are independent of
the Python version, and might even be used with multiple Python
installations on the same system. In that case, adding configuration
files won't work, as each usage of the extension might require a
different Python DLL.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Erik Heneryd
Fredrik Lundh wrote:
fwiw, IDG's Computer Sweden,  "sweden's leading IT-newspaper" has a
surprisingly big Python article in their most recent issue:
   PYTHON FEELS WELL
   Better performance biggest news in 2.4

and briefly interviews swedish zope-developer Johan Carlsson and Python-
Ware co-founder Håkan Karlsson.

...
so I don't think you can blame Johan or Håkan...  the writer simply read the
python.org material, and picked a couple of things that he found interesting
(decorators and generator expressions may be a big thing for an experienced
pythoneer, but they are probably a bit too obscure for a general audience...)
I'm a bit puzzled by the last paragraph, where Python is grouped 
together with PHP and Perl - names starting with p, being popular on 
Linux and not having big, commercial backers.  The article then 
concludes "Since Python is copyrighted, it's not truly open.  However, 
it can be freely used and redistributed, even commercially."

Huh?  Where did THAT come from?  You might argue the merits of Python 
being associated with Perl/PHP, but it's a fact that it is.  But when it 
is, it's seen as less free?

Erik
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Supporting Third Party Modules (was The other Py2.4issue)

2004-12-12 Thread "Martin v. Löwis"
Fredrik Lundh wrote:
the Python interpreter could initialize this DLL, using some suitable mechanism.
What suitable mechanism could that be? Suppose the Python script imports
foo.pyd, which in turn is linked with pythonany.dll, which in turn is
supposed to find the right Python DLL.
Now, python24.dll runs LoadLibary for foo.pyd, but has no control over
pythonany.dll. How could the suitable mechanism work?
alternatively, it could figure out what EXE you used to start the program in the
first place, and figure out what Python DLL that EXE uses.  my ExeMaker tool
can do that, for example:
http://effbot.org/zone/exemaker.htm
(see the #!python.exe entry in the table)
That requires a module handle for the EXE, right? How do you get that 
handle?

Out of curiosity: How come that the hModule is the start address of
the image? On what Windows versions does that work? Is that documented?
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] PEP 338: Executing modules inside packages with '-m'

2004-12-12 Thread Paul Moore
On Sat, 11 Dec 2004 19:17:28 -0800, Brett C. <[EMAIL PROTECTED]> wrote:
> Nick Coghlan wrote:
> 
> > Anyway, all comments are appreciated (even a simple "Sounds good to me").
> >
> 
> Sounds good to me. =)

And me :-)

+1

Paul.
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Carlos Ribeiro
On Sun, 12 Dec 2004 17:10:58 +0100, Erik Heneryd <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
> >>>fwiw, IDG's Computer Sweden,  "sweden's leading IT-newspaper" has a
> >>>surprisingly big Python article in their most recent issue:
> >>>
> >>>PYTHON FEELS WELL
> >>>Better performance biggest news in 2.4
> >>>
> 
> >>>and briefly interviews swedish zope-developer Johan Carlsson and Python-
> >>>Ware co-founder Håkan Karlsson.
> >>
> 
> ...
> 
> >
> > so I don't think you can blame Johan or Håkan...  the writer simply read the
> > python.org material, and picked a couple of things that he found interesting
> > (decorators and generator expressions may be a big thing for an experienced
> > pythoneer, but they are probably a bit too obscure for a general 
> > audience...)
> 
> I'm a bit puzzled by the last paragraph, where Python is grouped
> together with PHP and Perl - names starting with p, being popular on
> Linux and not having big, commercial backers.  The article then
> concludes "Since Python is copyrighted, it's not truly open.  However,
> it can be freely used and redistributed, even commercially."
> 
> Huh?  Where did THAT come from?  You might argue the merits of Python
> being associated with Perl/PHP, but it's a fact that it is.  But when it
> is, it's seen as less free?

The author was probably referring to the old (and as AFAIK already
solved) CRNI copyright issue that ocurred into the 1.x to 2.x series
transition. It's amazing how old memes from Python keep being
remembered and repeated, even years after the fact. It also
illustrates something very important - the community is not doing a
good job at spreading the news; perhaps we talk too much between
ourselves, and too little with the outside market. IMHO the website is
a great part of this, its message being more important to "sell"
Python than the standard library or native .exes.

About the website, a note from my own experience: when I search for
documentation on Python, I'm usually directed to some of the mirror of
the main python.org site. To find it inside the main site, I have to
use "site:python.org", or even "site:docs.python.org". Usually Google
does a good job at ranking pages, and if it doesn't rank the main
Python website very highly, it's because they're not being referred
to. A campaign to ask people to put links back to the canonical
documentation at the Python website would be nice.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: [EMAIL PROTECTED]
mail: [EMAIL PROTECTED]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread Paul Moore
On Sat, 11 Dec 2004 19:57:55 +0100, Christian Tismer
<[EMAIL PROTECTED]> wrote:
> Armin Rigo wrote:

> > Hum, this is getting into a Linux-vs-Windows argument.  I don't want to 
> > invest
> > time and money on Windows tools just to compile my extension module for
> > Windows users...

First of all, I'm assuming this is a timing issue. If I understood
your initial posting, your concern was that people wanted Windows
build of your extension *now*, and it was going to take you time to
make it available.

That's a different issue from you not having the facilities to build
the Windows installers at all, where you rely on 3rd parties making
builds available.

As Martin points out, ultimately the provision of Windows binaries is
an issue for the extension project - is the demand high enough to
justify the effort, can you find tools and/or a helper, etc etc.

But the former issue (how quickly you can provide binaries, assuming
that you will do so ultimately) is more relevant for python-dev.
Specifically, because lack of binary extensions can be a barrier to
take-up of the new version. Certainly, in the past, you could pretty
much guarantee that there would be very few Windows users testing beta
releases, because pywin32 binaries weren't available. With 2.4, I have
at least one system I'd upgrade *now* but for the lack of a critical
extension in binary form (I haven't yet had the time to try to adapt
the build process to mingw for myself).

> Maybe we can set this up as a service?

That sounds like a good idea. What I'd suggest is needed is a website
where the following can take place:

1. People have a way of posting rquests for particular modules.
2. Installers can be uploaded to satisfy those requests.
3. There is somewhere to put step-by-step "build it yourself"
instructions, using free components, so that people *without* access
to VS.NET can make progress themselves. Obviously, if a particular
extension can't be built with free compilers, then binaries or access
to VS.NET are the only options.

The installers should be clearly noted as having no warranty or
support implied, to encourage people to offer binaries they have built
without feeling that they are taking on a support burden. Conversely,
as soon as "official" binaries are available from the extension
project, the binaries available here should be removed (and replaced
with a link to the official site) to reinforce the "unofficial" nature
of the binaries provided here.

The biggest potential issue with such a site is clearly validation.
I've no idea how to make something like this work without it being a
major virus risk. Which may, sadly, be enough to kill the idea :-(

Paul.
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Supporting Third Party Modules (was The other Py2.4 issue)

2004-12-12 Thread Bob Ippolito
On Dec 12, 2004, at 11:02 AM, Martin v. Löwis wrote:
Bob Ippolito wrote:
I believe this is not implementable: How can the DLL know which 
Python
DLL to use?
Well for py2app on Mac OS X, I wrote an executable stub that chooses 
a Python runtime from an XML file, looks up and binds a few symbols 
from it dynamically, and then starts doing stuff.
While that would work, I think this is inappropriate for this specific
issue: we want to write extension modules which are independent of
the Python version, and might even be used with multiple Python
installations on the same system. In that case, adding configuration
files won't work, as each usage of the extension might require a
different Python DLL.
Yes, of course, I was talking about the executable, not extensions.  On 
Mac OS X 10.3+, the linker flag -undefined dynamic_lookup allows 
extensions to link to no Python whatsoever.  The extensions will just 
find the symbols it needs from some other image already loaded into the 
process at runtime.  If it weren't for the "forced" ABI 
incompatibility, we'd already have extensions that work 
cross-Python-major-version (assuming they used a safe subset of 
functions and structures).

-bob
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread Carlos Ribeiro
On Sun, 12 Dec 2004 16:40:22 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote:
> If none of your users volunteers to do the build for you, I would stop
> worrying about the Windows users.

Sorry, Martin. I understand your point, but I think you are not being
realistic. I for myself took the decision to use only free tools for
my own development, but I still have to suport my Windows customers. I
can't force them to change to Linux. I don't own a copy of MSVC. Also,
one of the reasons to choose a third part module is to save time. The
moment I am required to recompile everything myself I'm losing this
convenience. This of course impacts my ability to focus on my own
work, and so the story goes.

I'm not saying that module authors should work for free just to save
me some time & hassle. It's fair if an author decides to release a
Linux-only module. But again -- this is not realistic. The world has a
lot of Windows users, and I depend on them for my own income. If I
can't find a good set of Python tools for my projects, what should I
do? Picking another language is not a choice, mind you :-)

All in all, I sincerely hope that this discussion end up in a high
note. I'm not qualified to talk about the particulars of C compilers &
development environments, but as a Python user, I have hope that a
good solution will be found to make the process of building Python
extensions for Windows more convenient. The dream scenario is not to
require recompiling, at least inside the same major release (2.4 to
2.5, for example). That would be really great.

-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: [EMAIL PROTECTED]
mail: [EMAIL PROTECTED]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Fredrik Lundh
> . Multiple assignment is slower than individual assignment.  For
> example "x,y=a,b" is slower than "x=a; y=b".  However, multiple
> assignment is faster for variable swaps.  For example, "x,y=y,x" is
> faster than "t=x; x=y; y=t".

marginally faster in 2.4, a lot slower in earlier versions.  maybe you
should mark sections that rely on 2.4-specific optimizations, so that
people who use earlier versions don't end up slowing their programs
down...

 



___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread Nick Craig-Wood
On Sun, Dec 12, 2004 at 04:40:22PM +0100, "Martin v. L?wis" wrote:
> Armin Rigo wrote:
> >Hum, this is getting into a Linux-vs-Windows argument.  I don't
> >want to invest time and money on Windows tools just to compile my
> >extension module for Windows users...
> 
> If you don't have Windows at all, you cannot create Windows installers
> for your users, anyway.

Actually you are wrong there!  We cross compile our major application
(about 500k lines of C/C++) on linux/x86 for various architectures,
Windows/x86 being one of them.  We create the Windows installer using
the Nullsoft installer (which we run under Wine) and compile with a
gcc / mingw cross compiler.  This all works very well and means we can
build all our architectures every night on a single machine.

I'm following this thread with interest because we are considering
embedding Python into this project, and I'm wondering whether we can
cross compile python using mingw (almost certainly by the sound of
it), but probably harder would be to make python module build and
install system work cross-wise.

-- 
Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Supporting Third Party Modules (was The other Py2.4 issue)

2004-12-12 Thread Bob Ippolito
On Dec 12, 2004, at 1:09 PM, Martin v. Löwis wrote:
Bob Ippolito wrote:
Yes, of course, I was talking about the executable, not extensions.  
On Mac OS X 10.3+, the linker flag -undefined dynamic_lookup allows 
extensions to link to no Python whatsoever.
It's the same on SysV ELF shared libraries, and in most other unices.
The extensions will just find the symbols it needs from some other 
image already loaded into the process at runtime.  If it weren't for 
the "forced" ABI incompatibility, we'd already have extensions that 
work cross-Python-major-version (assuming they used a safe subset of 
functions and structures).
Are you talking about a forced ABI incompatibility, beyond the Windows
issue of linking with a specific pythonxy.dll?
On Unix, you certainly can have extensions across Python major 
versions.
I was talking about PYTHON_API_VERSION, hence "forced" in quotes.  
Nobody likes to see an ugly error message.

-bob
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] MinGW And The other Py2.4 issue

2004-12-12 Thread A.B., Khalid
Nick Craig-Wood wrote:
I'm following this thread with interest because we are considering
embedding Python into this project, and I'm wondering whether we can
cross compile python using mingw (almost certainly by the sound of
it), but probably harder would be to make python module build and
install system work cross-wise.

I am following this thread with interest too, because I can certainly report 
that it is now indeed possible and quite easy to compile not only Python's 
2.4 extensions but also Python itself in MinGW with the help of pyMinGW[1]. 
Indeed there is no need to buy or even download 400MB+ of code to do so.

After patching the Python 2.4 source with pyMinGW-24, and issuing the 
command:
make -f python24.mak all

We get Python and all its subprojects (socket, ssl, etc.) ready to run:
$ /c/temp/py24/python/dist/src/MinGW/python -i
Python 2.4.1a0 (#60, Dec  6 2004, 21:05:41)
[GCC 3.4.1 (mingw special)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import sys
sys.winver
'2.4'


To compile Armin's Psyco 1.3 in my MinGW compiled Python, I simply issued:
python setup.py build
and then
python setup.py bdist_wininst
And I had a /dist/psyco-1.3.win32-py2.4.exe file ready to be installed. It 
works fine at this end (note that I poked myself in the Windows registry to 
insert the pythoncore version information etc., but that should not be the 
case with those running the official Windows distribution). I only wonder if 
extensions created this way will work just as good in the latter. Because if 
they did, then going down the road of extensive downloads or expensive 
investment would be truly and totally unnecessary.

Regards,
Khalid

[1] pyMinGW can be found here:
http://jove.prohosting.com/iwave/ipython/pyMinGW.html
_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Supporting Third Party Modules (was The other Py2.4 issue)

2004-12-12 Thread "Martin v. Löwis"
Bob Ippolito wrote:
Yes, of course, I was talking about the executable, not extensions.  On 
Mac OS X 10.3+, the linker flag -undefined dynamic_lookup allows 
extensions to link to no Python whatsoever.
It's the same on SysV ELF shared libraries, and in most other unices.
The extensions will just 
find the symbols it needs from some other image already loaded into the 
process at runtime.  If it weren't for the "forced" ABI incompatibility, 
we'd already have extensions that work cross-Python-major-version 
(assuming they used a safe subset of functions and structures).
Are you talking about a forced ABI incompatibility, beyond the Windows
issue of linking with a specific pythonxy.dll?
On Unix, you certainly can have extensions across Python major versions.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Supporting Third Party Modules (was The other Py2.4 issue)

2004-12-12 Thread "Martin v. Löwis"
Bob Ippolito wrote:
I was talking about PYTHON_API_VERSION, hence "forced" in quotes.  
Nobody likes to see an ugly error message.
Ah, that... If PYTHON_API_VERSION changes, it is because there is
a real incompatibility, somewhere. It is not automatically bumped
with each release. So it is safe to ignore the ugly error message
only if you have not used any of the API that became incompatible.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] MinGW And The other Py2.4 issue

2004-12-12 Thread "Martin v. Löwis"
A.B., Khalid wrote:
I am following this thread with interest too, because I can certainly 
report that it is now indeed possible and quite easy to compile not only 
Python's 2.4 extensions but also Python itself in MinGW with the help of 
pyMinGW[1]. Indeed there is no need to buy or even download 400MB+ of 
code to do so.
That's good to know, but somewhat unrelated to the issue under
discussion. While it is clear from your message that you can build
python, as well as python extensions with MingW, it is not that
clear whether extensions build with mingw will work in the standard
2.4 distribution, or whether you can use the standard 2.4 distribution
to build extensions with mingw.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Re: The Other Py2.4 issue?

2004-12-12 Thread Adam Bark
Now this might sound a bit stupid but I've only been programming in
python for about 6 months and before that about the same on VB. Anyway
here goes, as python is built in C & C++ surely every piece of python
code has a corresponding piece of C/C++ albeit more complex. So would
it be possible to somehow make a program to convert the Python to C &
C++ which can then be compiled with a C/C++ compiler.

Adam


On Sun, 12 Dec 2004 19:09:27 +0100 (CET),
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Send Python-Dev mailing list submissions to
>[EMAIL PROTECTED]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>http://mail.python.org/mailman/listinfo/python-dev
> or, via email, send a message with subject or body 'help' to
>[EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>[EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Python-Dev digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Re: Re: 2.4 news reaches interesting places (Carlos Ribeiro)
>   2. Re: The other Py2.4 issue (Paul Moore)
>   3. Re: Re: Re: 2.4 news reaches interesting places (Carlos Ribeiro)
>   4. Re: Supporting Third Party Modules (was The other Py2.4
>  issue) (Bob Ippolito)
>   5. Re: The other Py2.4 issue (Carlos Ribeiro)
>   6. Re: Re: 2.4 news reaches interesting places (Fredrik Lundh)
>   7. Re: The other Py2.4 issue (Martin v. L?wis)
>   8. Re: Supporting Third Party Modules (was The other Py2.4
>  issue) (Martin v. L?wis)
> 
> 
> 
> -- Forwarded message --
> From: Carlos Ribeiro <[EMAIL PROTECTED]>
> To: Erik Heneryd <[EMAIL PROTECTED]>
> Date: Sun, 12 Dec 2004 15:14:09 -0200
> Subject: Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places
> On Sun, 12 Dec 2004 17:10:58 +0100, Erik Heneryd <[EMAIL PROTECTED]> wrote:
> > Fredrik Lundh wrote:
> > >>>fwiw, IDG's Computer Sweden,  "sweden's leading IT-newspaper" has a
> > >>>surprisingly big Python article in their most recent issue:
> > >>>
> > >>>PYTHON FEELS WELL
> > >>>Better performance biggest news in 2.4
> > >>>
> >
> > >>>and briefly interviews swedish zope-developer Johan Carlsson and Python-
> > >>>Ware co-founder Håkan Karlsson.
> > >>
> >
> > ...
> >
> > >
> > > so I don't think you can blame Johan or Håkan...  the writer simply read 
> > > the
> > > python.org material, and picked a couple of things that he found 
> > > interesting
> > > (decorators and generator expressions may be a big thing for an 
> > > experienced
> > > pythoneer, but they are probably a bit too obscure for a general 
> > > audience...)
> >
> > I'm a bit puzzled by the last paragraph, where Python is grouped
> > together with PHP and Perl - names starting with p, being popular on
> > Linux and not having big, commercial backers.  The article then
> > concludes "Since Python is copyrighted, it's not truly open.  However,
> > it can be freely used and redistributed, even commercially."
> >
> > Huh?  Where did THAT come from?  You might argue the merits of Python
> > being associated with Perl/PHP, but it's a fact that it is.  But when it
> > is, it's seen as less free?
> 
> The author was probably referring to the old (and as AFAIK already
> solved) CRNI copyright issue that ocurred into the 1.x to 2.x series
> transition. It's amazing how old memes from Python keep being
> remembered and repeated, even years after the fact. It also
> illustrates something very important - the community is not doing a
> good job at spreading the news; perhaps we talk too much between
> ourselves, and too little with the outside market. IMHO the website is
> a great part of this, its message being more important to "sell"
> Python than the standard library or native .exes.
> 
> About the website, a note from my own experience: when I search for
> documentation on Python, I'm usually directed to some of the mirror of
> the main python.org site. To find it inside the main site, I have to
> use "site:python.org", or even "site:docs.python.org". Usually Google
> does a good job at ranking pages, and if it doesn't rank the main
> Python website very highly, it's because they're not being referred
> to. A campaign to ask people to put links back to the canonical
> documentation at the Python website would be nice.
> 
> --
> Carlos Ribeiro
> Consultoria em Projetos
> blog: http://rascunhosrotos.blogspot.com
> blog: http://pythonnotes.blogspot.com
> mail: [EMAIL PROTECTED]
> mail: [EMAIL PROTECTED]
> 
> 
> 
> -- Forwarded message --
> From: Paul Moore <[EMAIL PROTECTED]>
> To: Christian Tismer <[EMAIL PROTECTED]>
> Date: Sun, 12 Dec 2004 17:26:49 +
> Subject: Re: [Python-Dev] The other Py2.4 issue
> On Sat, 11 Dec 2004 19:57:55 +0100, Christian Tismer
> <[EMAIL PROTECTED]> wrote:
> > Armin Rigo wrote:
> 
> > > Hum, this is getting into a Linux-vs-Windows argument.  I don't want to 
> > > invest
> > > time and money on Windows tools just to compile 

[Python-Dev] MinGW And The other Py2.4 issue

2004-12-12 Thread A.B., Khalid
Martin v. Löwis wrote:
That's good to know, but somewhat unrelated to the issue under
discussion. While it is clear from your message that you can build
python, as well as python extensions with MingW, it is not that
clear whether extensions build with mingw will work in the standard
2.4 distribution, or whether you can use the standard 2.4 distribution
to build extensions with mingw.

Martin it is somewhat related. :)
But seriously, I did mention that which you note, and this is partly the 
reason why I am following this thread. But you are right. We must resolve 
that issue as it pertains to the pyMinGW patched & MinGW compiled Python, if 
you would kindly allow me to. And so I propose the following:

[1] Can someone please email me [*] the officially distributed 
Python24.dll and python.exe,
 (I do not wish to install the full version yet; if this is too 
much to ask, then nevermind, I'll
 download the whole distribution), or alternatively, and more 
conveniently

[2] Can someone who has the official Python 2.4 download the sample 
extension [**] created
 using the pyMinGW patched & MinGW compiled Python 2.4 and SWIG? 
And see if it works?
 Sources are in the zip file whose details appears bellow.



Regards,
Khalid

[*] Email to this address please: abkhd[-AT-]earth.co.jp
[**] pymingw.zip (5.35 KB):
Location: http://jove.prohosting.com/iwave/misc/pymingw.zip
MD5: b4c1a2ebcb8a00fde89f6efe102d983f
--
Contents in KB:
--
_PYMINGW PYD 9.216  13/12/04   1:00 _pymingw.pyd
PYMINGW  PY  1.115  13/12/04   1:00 pymingw.py
PYMINGW  I 278  13/12/04   1:00 pymingw.i
EXAMPLE  C 848  13/12/04   0:23 example.c
SETUPPY192  13/12/04   0:59 setup.py
_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


RE: [Python-Dev] Re: The Other Py2.4 issue?

2004-12-12 Thread Delaney, Timothy C (Timothy)
Adam Bark wrote:

> Now this might sound a bit stupid but I've only been programming in
> python for about 6 months and before that about the same on VB. Anyway
> here goes, as python is built in C & C++ surely every piece of python
> code has a corresponding piece of C/C++ albeit more complex. So would
> it be possible to somehow make a program to convert the Python to C &
> C++ which can then be compiled with a C/C++ compiler.

Yes. And it would run at about the same speed as CPython.

The only way to significantly improve this is to remove much of the
dynamism of Python. As an example, I've been playing around with
Raymond's constant binding - making it do more aggressive binding (I'll
give an example later). By binding constants, I'm able to reduce the
runtimes for psyco-compiled versions of friendly code (lots of things
that can be converted into constant references) from around 2 seconds to
less than 0.001 seconds.

That's a very significant speedup. Unfortunately, it doesn't translate
as well into real-world code - or even benchmarks (parrotbench for
example gets a slight speedup but it's not overly significant).

As a quick example if the changes I'm playing with, 

def func()
docutils.parsers.rst.states.struct.__init__

Raymond's generates:

JUMP_FORWARD   0
LOAD_CONST(docutils)
LOAD_ATTR (parsers)
LOAD_ATTR (rst)
LOAD_ATTR (states)
LOAD_ATTR (struct)
LOAD_ATTR (__init__)

Mine generates

 0 JUMP_ABSOLUTE  15
 3 NOP
 4 NOP
 5 NOP
 6 NOP
 7 NOP
 8 NOP
 9 NOP
10 NOP
11 NOP
12 NOP
13 NOP
14 NOP
15 LOAD_CONST (http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Carlos Ribeiro
On Sun, 12 Dec 2004 20:36:45 -0500, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> On Sun, 2004-12-12 at 12:32, Carlos Ribeiro wrote:
> 
> > For those who believe that a non-profit project should not do any
> > marketing, a reminder. If the perception about Python is one of a slow
> > language, it's much more difficult to find places where you can use
> > Python. In the long run, many of us may be forced to work with other
> > languages & tools, just because that's where the money is. I
> > personally take it a matter of personal interest, because I know how
> > hard it is to "sell" Python to companies here in Brazil.
> 
> Actually, there's another problem in the corporate world that has
> nothing to do with Python's performance (at least not directly).  When a
> manager has to hire 25 programmers for a project they think to
> themselves, "well, Java programmers are a dime a dozen so I'll have no
> problem finding warm bodies if we write it in Java.  Can I even /find/
> 25 Python programmers?"

You're right, specially for big corporations. But in the end, we're
just running in circles: it's hard to get new programmers to learn
Python, partly because it's in low demand, and partly because the
language has an totally undeserved fame of being slow. That's right -
when I talk to fellow programmers that I'm writing software in Python,
many of them are amazed and ask me, "but isn't it slow?". I've heard
it more than once... having some place that I could point them out so
they could check it for themselves (perhaps "www.pythonspeed.com"?)
would be *great*.

IMHO, Python performance is not an issue 99% of the time. I swear I
can say the same about C++. The difference between C++ and Python is
not how fast they are relatively to each other, but *where* the slow
part is. Anyone who tried to write complex code in any other language
knows that most programmers usually resort to slow but easy to
implement algorithms for things such as sorting, list handling, etc;
these parts of the code are naturally fast in Python, while others may
be faster in C++... so we're just trading "6 for half a dozen", as we
say in portuguese :-)


-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: [EMAIL PROTECTED]
mail: [EMAIL PROTECTED]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Barry Warsaw
On Sun, 2004-12-12 at 12:32, Carlos Ribeiro wrote:

> For those who believe that a non-profit project should not do any
> marketing, a reminder. If the perception about Python is one of a slow
> language, it's much more difficult to find places where you can use
> Python. In the long run, many of us may be forced to work with other
> languages & tools, just because that's where the money is. I
> personally take it a matter of personal interest, because I know how
> hard it is to "sell" Python to companies here in Brazil.

Actually, there's another problem in the corporate world that has
nothing to do with Python's performance (at least not directly).  When a
manager has to hire 25 programmers for a project they think to
themselves, "well, Java programmers are a dime a dozen so I'll have no
problem finding warm bodies if we write it in Java.  Can I even /find/
25 Python programmers?"

-Barry



signature.asc
Description: This is a digitally signed message part
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread "Martin v. Löwis"
Armin Rigo wrote:
Hum, this is getting into a Linux-vs-Windows argument.  I don't want to invest
time and money on Windows tools just to compile my extension module for
Windows users...
If you don't have Windows at all, you cannot create Windows installers
for your users, anyway.
If you do have Windows, but you normally don't use it for software
development (so you have no copy of MSVC), you have to invest money,
indeed. You don't have to invest time - atleast not as much time
as you need to invest finding out how these alternative compilers work.
However, for free software, things work quite differently, anyway:
if you (as a package author) don't have the time and money to create
a Windows package, tell your users that you won't create one. Instead,
ask for a volunteer to create a package for you. If your package has
a large Windows user community, somebody will have the money, and they
will find the time if the build process is as simple as bdist_wininst.
If none of your users volunteers to do the build for you, I would stop
worrying about the Windows users.
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Re: Re: 2.4 news reaches interesting places

2004-12-12 Thread Carlos Ribeiro
Hello all,

Just to complement my previous remarks, I would like to point out how
do a competing language defines itself in its own website. The
perl.org website has a simple faq that is a good piece of marketing.
What follows are direct quotes, just to point out how ot handle the
market perception about their quality & speed.

-- "Perl takes the best features from other languages, such as C, awk,
sed, sh, and BASIC, among others."

(A claim can't possibly be any more generic than this. Strangely
enough, it mentions only older languages -- not Java, C++, or even
Python (!). This is possibly a sign of an old quote, but anyway: it
has a good marketing effect, specially for non-techies.)

-- "Perl can be embedded into web servers to speed up processing by as
much as 2000%."

(BTW, this quote is embarrassing misleading -- it probably means that
Perl is 20x slower when started on a request basis by the web server,
and that embedding it will accelerate response by a huge factor. I'm
sure non-techies will read it as "Perl is able to accelerate my server
20x!")


Of course, the point here is not Perl-bashing. The point here is that
we should be able to "sell" Python better than we do now, even without
the need to resort to such poor measures. I'm sure the Python
community does have good & creative people that can write a good
"selling" FAQ for Python, emphasizing the main points of the language.

For those who believe that a non-profit project should not do any
marketing, a reminder. If the perception about Python is one of a slow
language, it's much more difficult to find places where you can use
Python. In the long run, many of us may be forced to work with other
languages & tools, just because that's where the money is. I
personally take it a matter of personal interest, because I know how
hard it is to "sell" Python to companies here in Brazil.


-- 
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: [EMAIL PROTECTED]
mail: [EMAIL PROTECTED]
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] The other Py2.4 issue

2004-12-12 Thread "Martin v. Löwis"
Carlos Ribeiro wrote:
If none of your users volunteers to do the build for you, I would stop
worrying about the Windows users.

Sorry, Martin. I understand your point, but I think you are not being
realistic. I for myself took the decision to use only free tools for
my own development, but I still have to suport my Windows customers. I
can't force them to change to Linux. I don't own a copy of MSVC. Also,
one of the reasons to choose a third part module is to save time. The
moment I am required to recompile everything myself I'm losing this
convenience. This of course impacts my ability to focus on my own
work, and so the story goes.
I did not suggest that *all* your Windows users should recompile
your module - just a single one would be sufficient.
I'm not saying that module authors should work for free just to save
me some time & hassle. It's fair if an author decides to release a
Linux-only module. But again -- this is not realistic. The world has a
lot of Windows users, and I depend on them for my own income. If I
can't find a good set of Python tools for my projects, what should I
do? Picking another language is not a choice, mind you :-)
As I said: Find a volunteer that has the necessary build infrastructure,
and have that volunteer build the extension for you.
The dream scenario is not to
require recompiling, at least inside the same major release (2.4 to
2.5, for example). That would be really great.
That is guaranteed. Extensions built for 2.4 will certainly continue
to work in 2.4.1, and later 2.4.x. They will stop working with 2.5
(as they are linked with python24.dll).
Regards,
Martin
___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] MinGW And The other Py2.4 issue

2004-12-12 Thread Phillip J. Eby
At 11:07 PM 12/12/04 +0100, Martin v. Löwis wrote:
it is not that
clear whether extensions build with mingw will work in the standard
2.4 distribution, or whether you can use the standard 2.4 distribution
to build extensions with mingw.
I thought that it was clarified some time ago, with my success reports for 
the pre-alpha version.  Paul Moore has also independently confirmed this, 
and posted reasons why he doesn't believe that the dangling references to 
msvcrt should cause a problem in practice.

The item that was unclear was whether newer versions of MinGW could get 
away *without* building a libpython24.a file, and Paul indicated that this 
was not possible.

So, using the script that I posted previously to build libpython24.a from 
python24.dll is still a valid path for using MinGW to build extensions for 
Python on Windows.

___
Python-Dev mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com