[python-win32] py2exe question

Scott Prive scottprive at earthlink.net
Mon May 5 10:46:32 EDT 2003


----- Original Message ----- 
From: "Rasjid Wilcox" <rasjidw at openminddev.net>
To: "Magnus Lyckå" <magnus at thinkware.se>; "sense gin" <sensegin at yahoo.com>
Cc: <python-win32 at python.org>
Sent: Monday, May 05, 2003 8:12 AM
Subject: Re: [python-win32] py2exe question


On Wednesday 30 April 2003 10:59, Magnus Lyckå wrote:
<snip>
> In Unix you would also have the possibility to make
> links with different names to handler.exe, and let it
> work like this instead:
>
>
> # handler.py
> import os, a, b, c
> f = os.environ()
> action = f['SCRIPT_NAME'].split('/')[-1]
>
> if action in ['a', 'b', 'c']:
>      locals()[action].main()
>
>
> Then you you wouldn't have to change the URLs, but
> unfortunately, Windows shortcuts aren't anywhere near
> as useful as hard or symbolic links in Unix.

If you install Cygwin, you can get real multiple hardlinks in Windows too,
which work with ordinary Windows programs (like Notepad etc).

Hardlink a.txt to b.txt in Cygwin, and then when you edit a.txt, b.txt
changes
too, but both look link ordinary files to Windows.

It is very cool, and possibly even useful occasionally.  :-)

Rasjid.


Cygwin is really cool stuff. One word of warning:
    Cygwin (and the Python version optional with it) only understands "unix
style" /some/path/t/foo

You can install Cygwin (with Python) and it will not interfere with your
existing Python install.

More complicated, but you can even use just Cygwin (w/o their Python) and
use your "existing" Python interpreter, if you investigate the Cygwin tool
called "cygpath", and use it to write a small BAT or sh wrapper around
python.exe and other bits (see cygwin list archive).

-Scott




More information about the Python-win32 mailing list