Python compiled on Windows

Discussion in 'Python' started by Franz Steinhaeusler, Feb 5, 2007.

  1. Hello, I'm only curious.

    Why is Python and most extension (also wxPython) not built using an
    open source compiler like gcc or g++ on Windows?

    I'm always wondering, why Microsoft is still supported
    in that way, using VC++ 7.1, if I'm not wrong.

    Ok, maybe the compiled assembler code could be better, but
    this cannot be the reason, or?

    It would be wonderful (from the principle) if this could be possible.
    From the standpoint of open source.

    What are your opinions?
     
    Franz Steinhaeusler, Feb 5, 2007
    #1
    1. Advertising

  2. Franz Steinhaeusler

    hg Guest

    Duncan Booth wrote:

    > Franz Steinhaeusler <> wrote:
    >
    >> Hello, I'm only curious.
    >>
    >> Why is Python and most extension (also wxPython) not built using an
    >> open source compiler like gcc or g++ on Windows?
    >>
    >> I'm always wondering, why Microsoft is still supported
    >> in that way, using VC++ 7.1, if I'm not wrong.
    >>
    >> Ok, maybe the compiled assembler code could be better, but
    >> this cannot be the reason, or?
    >>
    >> It would be wonderful (from the principle) if this could be possible.
    >> From the standpoint of open source.
    >>
    >> What are your opinions?

    >
    > Practicality beats purity.
    >
    > To maximise the interoperability of Python with other software on the
    > platform it makes sense to use the best supported compiler environment for
    > the platform.


    Still, if one considers the many threads of people trying to get it to work
    with the "free" version + other people that had to invest in VS mostly for
    that (I did) / it might eventually be fair to reconsider.

    + a dll is a dll

    hg
     
    hg, Feb 5, 2007
    #2
    1. Advertising

  3. Franz Steinhaeusler

    Duncan Booth Guest

    Franz Steinhaeusler <> wrote:

    > Hello, I'm only curious.
    >
    > Why is Python and most extension (also wxPython) not built using an
    > open source compiler like gcc or g++ on Windows?
    >
    > I'm always wondering, why Microsoft is still supported
    > in that way, using VC++ 7.1, if I'm not wrong.
    >
    > Ok, maybe the compiled assembler code could be better, but
    > this cannot be the reason, or?
    >
    > It would be wonderful (from the principle) if this could be possible.
    > From the standpoint of open source.
    >
    > What are your opinions?


    Practicality beats purity.

    To maximise the interoperability of Python with other software on the
    platform it makes sense to use the best supported compiler environment for
    the platform.
     
    Duncan Booth, Feb 5, 2007
    #3
  4. On Mon, 05 Feb 2007 12:17:48 +0100, hg <> wrote:

    >Duncan Booth wrote:
    >
    >> Franz Steinhaeusler <> wrote:
    >>
    >>> Hello, I'm only curious.
    >>>
    >>> Why is Python and most extension (also wxPython) not built using an
    >>> open source compiler like gcc or g++ on Windows?
    >>>
    >>> I'm always wondering, why Microsoft is still supported
    >>> in that way, using VC++ 7.1, if I'm not wrong.
    >>>
    >>> Ok, maybe the compiled assembler code could be better, but
    >>> this cannot be the reason, or?
    >>>
    >>> It would be wonderful (from the principle) if this could be possible.
    >>> From the standpoint of open source.
    >>>
    >>> What are your opinions?

    >>
    >> Practicality beats purity.
    >>
    >> To maximise the interoperability of Python with other software on the
    >> platform it makes sense to use the best supported compiler environment for
    >> the platform.


    @Duncan: Yes, you are not wrong! :)
    But this is not really open source in my opinion.
    Ok there is the VC++ toolkit for download.

    I'm just curious, if there ever had compiled on windows using
    that toolkit or even with gcc, and with gcc, whether there are problems
    or/and differences in speed and run time behaviour.


    >
    >Still, if one considers the many threads of people trying to get it to work
    >with the "free" version + other people that had to invest in VS mostly for
    >that (I did) / it might eventually be fair to reconsider.
    >
    >+ a dll is a dll
    >
    >hg


    @hg: that would be cool.
     
    Franz Steinhaeusler, Feb 6, 2007
    #4
  5. Franz Steinhaeusler

    Duncan Booth Guest

    Franz Steinhaeusler <> wrote:

    > @Duncan: Yes, you are not wrong! :)
    > But this is not really open source in my opinion.
    > Ok there is the VC++ toolkit for download.


    Which I agree totally is a real pain finding the right versions to
    download.

    >
    > I'm just curious, if there ever had compiled on windows using
    > that toolkit or even with gcc, and with gcc, whether there are
    > problems or/and differences in speed and run time behaviour.
    >


    Yes, people have compiled Python with gcc on windows. I believe it is
    slightly slower than the standard release, but I would guess that may
    depend on the exact versions of gcc/msc you choose to compare, and the
    exact compiler options you choose (or I may even be imagining it
    entirely).

    As I understand it, you can use Mingw to compile extension modules which
    are compatible with the standard release of Python, and of course there
    is always cygwin.

    But I still don't understand what difference it makes to anyone between:

    an application (could be open or closed source) running on an open
    source language (Python) compiled with a closed source compiler on a
    closed source OS.

    versus

    an application (could be open or closed source) running on an open
    source language (Python) compiled with an open source compiler on a
    closed source OS.

    at the end of the day you still have a mix of open and closed source
    components. If it makes you feel better to be using an open source
    compiler that's fine, but it doesn't really do anything for me.
     
    Duncan Booth, Feb 6, 2007
    #5
  6. On 6 Feb 2007 08:35:08 GMT, Duncan Booth <>
    wrote:

    >Franz Steinhaeusler <> wrote:
    >
    >> @Duncan: Yes, you are not wrong! :)
    >> But this is not really open source in my opinion.
    >> Ok there is the VC++ toolkit for download.

    >
    >Which I agree totally is a real pain finding the right versions to
    >download.
    >
    >>
    >> I'm just curious, if there ever had compiled on windows using
    >> that toolkit or even with gcc, and with gcc, whether there are
    >> problems or/and differences in speed and run time behaviour.
    >>

    >
    >Yes, people have compiled Python with gcc on windows. I believe it is
    >slightly slower than the standard release, but I would guess that may
    >depend on the exact versions of gcc/msc you choose to compare, and the
    >exact compiler options you choose (or I may even be imagining it
    >entirely).


    I cannot imagine, that there is a decisive difference, especially as
    in gcc, you have also a couple of options.

    >
    >As I understand it, you can use Mingw to compile extension modules which
    >are compatible with the standard release of Python, and of course there
    >is always cygwin.
    >
    >But I still don't understand what difference it makes to anyone between:
    >
    >an application (could be open or closed source) running on an open
    >source language (Python) compiled with a closed source compiler on a
    >closed source OS.
    >
    >versus
    >
    >an application (could be open or closed source) running on an open
    >source language (Python) compiled with an open source compiler on a
    >closed source OS.


    For me it's more a issue of "principle". :)
    Ok, the OS is as it is, but the "layer" is more open.

    If there would be no toolkit, you have to buy (and many have bought
    Visual Studio) for open source projects, and that is the point,
    where I cannot make friend with me.

    >
    >at the end of the day you still have a mix of open and closed source
    >components. If it makes you feel better to be using an open source
    >compiler that's fine, but it doesn't really do anything for me.


    Ok, I let your opinion, it is also fine with me! :)
     
    Franz Steinhaeusler, Feb 6, 2007
    #6
  7. Franz Steinhaeusler

    Duncan Booth Guest

    Franz Steinhaeusler <> wrote:

    >>Yes, people have compiled Python with gcc on windows. I believe it is
    >>slightly slower than the standard release, but I would guess that may
    >>depend on the exact versions of gcc/msc you choose to compare, and the
    >>exact compiler options you choose (or I may even be imagining it
    >>entirely).

    >
    > I cannot imagine, that there is a decisive difference, especially as
    > in gcc, you have also a couple of options.
    >

    I did a quick comparison running pystone and taking the best of several
    runs:

    On one system which had the Windows Python 2.4 distribution and also
    Python 2.4 installed under cygwin:

    Windows Python 2.4: 46k
    Cygwin Python 2.4: 41k

    On another system which has a dual boot setup:

    Windows Python 2.5: 43.7k
    Ubuntu Python 2.5: 42.0k

    So in the first case there was about a 12% improvement and in the second
    case about 5% improvement using the Windows distribution.

    I don't know whether the gap is closing from improvements in gcc or
    whether there is an OS related difference as well. Unfortunately cygwin
    doesn't appear to offer Python 2.5 yet.
     
    Duncan Booth, Feb 7, 2007
    #7
  8. On 7 Feb 2007 09:44:32 GMT, Duncan Booth <>
    wrote:

    >Franz Steinhaeusler <> wrote:
    >
    >>>Yes, people have compiled Python with gcc on windows. I believe it is
    >>>slightly slower than the standard release, but I would guess that may
    >>>depend on the exact versions of gcc/msc you choose to compare, and the
    >>>exact compiler options you choose (or I may even be imagining it
    >>>entirely).

    >>
    >> I cannot imagine, that there is a decisive difference, especially as
    >> in gcc, you have also a couple of options.
    >>

    >I did a quick comparison running pystone and taking the best of several
    >runs:
    >
    >On one system which had the Windows Python 2.4 distribution and also
    >Python 2.4 installed under cygwin:
    >
    > Windows Python 2.4: 46k
    > Cygwin Python 2.4: 41k
    >
    >On another system which has a dual boot setup:
    >
    > Windows Python 2.5: 43.7k
    > Ubuntu Python 2.5: 42.0k
    >
    >So in the first case there was about a 12% improvement and in the second
    >case about 5% improvement using the Windows distribution.
    >
    >I don't know whether the gap is closing from improvements in gcc or
    >whether there is an OS related difference as well. Unfortunately cygwin
    >doesn't appear to offer Python 2.5 yet.


    Hello Duncan, interesting test, so this little gap
    don't care at all (for me).
    If the difference would be say 30% or more, than
    that would make a perceptible difference, I think.
     
    Franz Steinhaeusler, Feb 7, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Klaus Schneider
    Replies:
    1
    Views:
    584
    Rolf Magnus
    Dec 2, 2004
  2. =?ISO-8859-1?Q?Eino_M=E4kitalo?=
    Replies:
    1
    Views:
    459
    Max M
    Dec 9, 2004
  3. Larry Bates
    Replies:
    1
    Views:
    348
    Do Re Mi chel La Si Do
    Jul 1, 2005
  4. swl
    Replies:
    2
    Views:
    318
    werasm
    Mar 8, 2006
  5. lander
    Replies:
    5
    Views:
    627
    bruce barker
    Mar 5, 2008
Loading...

Share This Page