Opened 13 years ago

Last modified 12 years ago

#991 defect closed fixed (fixed)

twistenv.bat doesn't correctly set PATHEXT

Reported by: Jean-Paul Calderone Owned by:
Priority: high Milestone:
Component: core Keywords: win32
Cc: Cory Dodt, Jean-Paul Calderone, justinj Branch:


Change History (12)

comment:1 Changed 13 years ago by Jean-Paul Calderone

On Mon, 18 Apr 2005 09:02:15 -0500, Justin Johnson <> wrote:
>I just installed Twisted 2.0 on Windows XP using the Python 2.3 installer at
>After installing, can't be found anywhere in any subdirectories of
>my Python install.

comment:2 Changed 13 years ago by Cory Dodt

Odd, I must have an old mktap hanging around because that's one of the scripts I
run to test the installer after it gets built.


comment:3 Changed 13 years ago by Cory Dodt

Well, on investigating I do not get the issue he reported.  

- running mktap from the Twisted Command Line doesn't work, due to a PYTHONPATH
issue but
- is in fact present, in twisted/scripts, contrary to what was reported

comment:4 Changed 12 years ago by justinj

Hmmm... that is what is happening for me now too.  Not sure what happened. 
Perhaps it was user error.  It did not install the equivalent .bat files though.
 I don't see a bug for this.  Should I open one?

comment:5 Changed 12 years ago by Cory Dodt

I renamed this one;  title was: "Win32 installer rc3 does not install"

There are no .bat files except for twistenv.bat.  What you're supposed to do is
run "Twisted Command Prompt", and then you can use the command line utils just
as if they were on Unix.  

However, I have verified a problem that others have reported on twistenv.bat,
and it's basically the same issue so I'm using this issue to track it.  It
doesn't set PATHEXT to include .py or .pyc, as it should be doing.

If you run twistenv and aren't able to run e.g. "mktap", then this bug affects
you too.  (And you can try adding .py to PATHEXT to see if your problem goes
away.  I'd like to know about it if so.)

comment:6 Changed 12 years ago by justinj

It would be ideal, in my opinion, to have them in your path after the install so
they can be run without extension.

I personally think it is nice to have the .bat files installed.  I have been
modifying the path to include <pythondir>\scripts on all servers I use twisted
on, and then just calling them as mktap, twistd, etc, which invokes the .bat
files.  Of course I can work around this.

comment:7 Changed 12 years ago by Cory Dodt

They are in the PATH, that's the whole point of twistenv.  The extension is not
related to PATH but to PATHEXT.  The bug is that PATHEXT isn't set correctly.

comment:8 Changed 12 years ago by justinj

Okay, I see what you're saying.  I meant ideally all the path stuff would be
done automatically so that you could type the commands from *any* DOS prompt. 
No big deal though.

comment:9 Changed 12 years ago by Cory Dodt

This would involve modifying the global PATH.  This is something Python can do,
and the sysadmin can do, but I don't really want Twisted to do, since it puts
stuff into the PATH that isn't part of Twisted.  This could lead to surprises in
other software.

twistenv.bat makes these environment changes specific to Twisted, so changes in
system behavior are explicit and not surprising.

comment:10 Changed 12 years ago by Cory Dodt

Committed r13678.

comment:11 Changed 12 years ago by Cory Dodt

resolved by releasing another rc installer.

comment:12 Changed 7 years ago by <automation>

Owner: Cory Dodt deleted
Note: See TracTickets for help on using tickets.