Windows versions of Python---pros and cons?

Andrae Muys amuys at shortech.com.au
Tue Jun 25 03:50:49 CEST 2002


Tom Loredo <loredo at astro.cornell.edu> wrote in message news:<3D124575.2A1393FF at astro.cornell.edu>...
> Fernando Pérez wrote:
> > 
> > Don't know if there's a misunderstanding here: 
> 
> Very likely!  (On my part!)
> 
> > cygwin is a unix-like
> > environment under Windows. 
> 
> Okay, my concern was that it wouldn't work with or be able to produce
> Windows binaries---like if I had to produce binary extension modules
> to ship to others, or a McMillan-ized install that used PythonWin
> and Tk or wxWindows.  Cygwin is so huge that I got the impression
> it was a self-contained "subenvironment" so to speak, so I didn't
> realize I could use it to produce stuff that non-cygwin Windows users
> could use.
> 

It is important to differentiate between the cygwin environment, and
the cygwin platform itself.  At its core cygwin is a dll that provides
a port of most of the POSIX API to W32.  On top of this, cygwin also
offers a host of other API's common on various unix platforms ported
to the cygwin.dll 'unix platform'.  On top of these libraries the
cygwin environment is assembled out of all manner of common unix
programs, utilities, servers, etc built using these libraries and the
cygwin.dll.

The environment is huge.  Considering that a full install includes
ports of XFree86, TeX, gcc & libs, python2.2, perl5.6.1, a full
install == a LOT of bytes :).

The libraries however are a fraction of this size, consider a ls -l
*.dll on /bin (where cygwin keeps the libraries, I assume for windows
compat' sake)

$ ls -l *.dll | awk 'BEGIN { sum = 0 } { sum = sum + $5 } END { print
sum }'
8931012

$ ls -l cygwin1.dll
-rwxr-xr-x    1 Administ None       895304 Jun 24 12:33 cygwin1.dll

$ ls -l *.dll
-rwxr-xr-x    1 Administ None        46592 Jan 21 04:51 cygXpm-X4.dll
-rwxr-xr-x    1 Administ None        41984 Jan 21 04:51
cygXpm-noX4.dll
-rwxr-xr-x    1 Administ None        58880 May  7 16:36 cygbz2-1.dll
-rwxr-xr-x    1 Administ None       635904 May 17 22:25 cygcrypto.dll
-rwxr-xr-x    1 Administ None       333824 Jun 19 08:16 cygdb2.dll
-rwxr-xr-x    1 Administ None        51200 Mar 17 16:24 cygexslt-0.dll
-rwxr-xr-x    1 Administ None        46080 Apr 25  2001 cygform5.dll
-rwxr-xr-x    1 Administ None        35328 Jan  9 16:11 cygform6.dll
-rwxr-xr-x    1 Administ None        18944 Feb 20 13:06 cyggdbm.dll
-rwxr-xr-x    1 Administ None        19968 Jan 13 11:29
cyghistory5.dll
-rwxr-xr-x    1 Administ None        22016 Dec 13  2001 cygintl-1.dll
-rwxr-xr-x    1 Administ None        21504 Jun 21  2001 cygintl.dll
-rwxr-xr-x    1 Administ None        82944 Oct 20  2001 cygitcl30.dll
-rwxr-xr-x    1 Administ None        35328 Oct 20  2001 cygitk30.dll
-rwxr-xr-x    1 Administ None        45568 Feb  8 10:00 cygjbig1.dll
-rwxr-xr-x    1 Administ None       121856 Feb  9 15:21 cygjpeg6b.dll
-rwxr-xr-x    1 Administ None        26624 Apr 25  2001 cygmenu5.dll
-rwxr-xr-x    1 Administ None        19968 Jan  9 16:11 cygmenu6.dll
-rwxr-xr-x    1 Administ None       159232 Apr 25  2001
cygncurses++5.dll
-rwxr-xr-x    1 Administ None       179200 Jan  9 16:11
cygncurses++6.dll
-rwxr-xr-x    1 Administ None       230912 Apr 25  2001
cygncurses5.dll
-rwxr-xr-x    1 Administ None       206848 Jan  9 16:11
cygncurses6.dll
-rwxr-xr-x    1 Administ None        15360 Apr 25  2001 cygpanel5.dll
-rwxr-xr-x    1 Administ None        11776 Jan  9 16:11 cygpanel6.dll
-rwxr-xr-x    1 Administ None        41105 Nov 22  2001 cygpcre.dll
-rwxr-xr-x    1 Administ None        40251 Nov 22  2001
cygpcreposix.dll
-rwxr-xr-x    1 Administ None       175104 May  8 05:10 cygpng10.dll
-rwxr-xr-x    1 Administ None       179200 May 24 12:23 cygpng12.dll
-rwxr-xr-x    1 Administ None       174080 Jan 21 11:05 cygpng2.dll
-rwxr-xr-x    1 Administ None        22528 Jun  9 15:50 cygpopt-0.dll
-rwxr-xr-x    1 Administ None       123904 Jan 13 11:29
cygreadline5.dll
-rwxr-xr-x    1 Administ None        68016 Nov 21  2001 cygregex.dll
-rwxr-xr-x    1 Administ None       159744 May 17 22:25 cygssl.dll
-rwxr-xr-x    1 Administ None       399360 Oct 20  2001 cygtcl80.dll
-rwxr-xr-x    1 Administ None         4608 Oct 20  2001
cygtclpip80.dll
-rwxr-xr-x    1 Administ None        10240 Oct 20  2001
cygtclreg80.dll
-rwxr-xr-x    1 Administ None       258560 Feb 10 18:36 cygtiff3.dll
-rwxr-xr-x    1 Administ None       637952 Oct 20  2001 cygtk80.dll
-rwxr-xr-x    1 Administ None       895304 Jun 24 12:33 cygwin1.dll
-rwxr-xr-x    1 Administ None      1277440 Mar 17 13:56 cygxml2-2.dll
-rwxr-xr-x    1 Administ None       155136 Mar 17 16:23 cygxslt-1.dll
-rwxr-xr-x    1 Administ None        15360 Mar 17 16:24
cygxsltbreakpoint-1.dll
-rwxr-xr-x    1 Administ None        50688 Mar 12 14:38 cygz.dll
-rwxr-xr-x    1 Administ None        49664 Feb 25 13:33 libW11.dll
-rwxr-xr-x    1 Administ None       749056 Aug 22  2001
libperl5_6_1.dll
-rwxr-xr-x    1 Administ None       771584 Jan  1 06:26
libpython2.2.dll
-rwxr-xr-x    1 Administ None       204288 Oct 20  2001 tix4180.dll

As you can see the cygwin dll is only ~900k, while even the entire
porting environment (excluding X11R6) is < 9Mb (X11R6 is just over
4Mb).

So in most situations this is not imposing a signifigant overhead.

Andrae Muys



More information about the Python-list mailing list