This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients BreamoreBoy, brian.curtin, sbt, terry.reedy, tim.golden, zach.ware
Date 2013-05-28.20:26:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAKJDb-Mxsryfn0r4s9Se27WKtEqoE-Bfg-RRDApHD65f4XdG9A@mail.gmail.com>
In-reply-to <1369771579.58.0.801179770243.issue16895@psf.upfronthosting.co.za>
Content
> Richard Oudkerk added the comment:
>
> I can't say I know enough about batch files to understand much of the code, but a few notes:
>
> Windows XP does not have the command "where" which you use -- Python 3.4 will still support XP.

Oh, that is an issue.  I don't have an XP machine to test on anymore,
thank you for that catch.  I found a workaround on StackOverflow that
looks short enough to be usable instead.

> Except perhaps for looping I would prefer to get rid of the use of goto.  The fact that some goto targets end in "exit /b ..." make it very confusing as to where "exit /b" will return control.

The only goto's that are not part of loops are now one near the
beginning for the -C option, in the target validation routine to show
the usage message and die, and in a couple of routines which use "goto
no-configure" to show a common message and die.  I'd rather not have
to copy that message every place it is used, but that is an option.
Would just adding comments explaining where execution is going and
whether it is coming back be sufficient?

>
> The initial pushd is matched by various popd's which are scattered over hundreds of lines (including one in :usage).  I think it would be better to keep matching pushd/popd reasonably close together.  For instance, I think you could do something like
>
>     ...
>     pushd "%~dp0"
>     call :main ...
>     popd
>     exit /b
>
>     :main
>     ...
>     exit /b
>

Fair enough, I can change that.  I tried to keep the matches to the
initial pushd to a minimum, but perhaps there are a couple more I can
eliminate.

> It would also be helpful if the end of the subroutines were marked with a comment like
>
>     rem end :foo
>

Easy enough, consider it done :)
History
Date User Action Args
2013-05-28 20:26:42zach.waresetrecipients: + zach.ware, terry.reedy, tim.golden, brian.curtin, BreamoreBoy, sbt
2013-05-28 20:26:42zach.warelinkissue16895 messages
2013-05-28 20:26:42zach.warecreate