Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: can't pass command-line arguments

Reply
Thread Tools

Re: can't pass command-line arguments

 
 
Trent Mick
Guest
Posts: n/a
 
      04-11-2006
> You're welcome, and thanks for following this through. I still have
> machines around that have PATHEXT=.pyc;.py;... and will now remove .pyc
> from all of them. It would probably be nice to trace this back to the
> origin, find whether there was a good rationale for it being that way in
> the first place, and either update a FAQ somewhere or get the problem
> fixed once and for all.
>
> I don't think the standard install messes with PATHEXT, so my bet is on
> ActiveState right now. Can anyone confirm? Trent, if you're reading
> this and it is from ActiveState's distribution, do you know where that
> PATHEXT=.pyc;.py choice came from and whether it might have been an
> ill-advised decision that should be undone?


Yes, I can confirm as well. This is a bug in ActivePython. Definitely
not an intended decision. That is: having .pyc (and/or .pyo) before .py
(and/or .pyw) on PATHEXT is definitely a bug. The ActivePython MSI just
added the .pyc, .pyo, .py and .pyw extensions to PATHEXT *backwards*. My
apologies for not having caught this.

http://bugs.activestate.com/ActivePy...g.cgi?id=33311

As to whether to have .pyc (ditto .pyo) on PATHEXT at all: ActivePython
has been doing so since time immemorial. I think that ActivePython
should stop doing that (as implied by Duncan) unless someone can suggest
a reason why to keep it. The only use case would be for calling a Python
script on Windows without specifying the extension *and* for which there
is ONLY a .pyc or .pyo. That seems to unlikely (or uncommon) a scenario
to justify it.

I'll get a new ActivePython for Windows out soon to take .pyo and .pyc
off of PATHEXT.

Trent

--
Trent Mick

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call again a variadic function (... variable number of arguments)with same arguments that its variadic wrapper moreau.steve@gmail.com C Programming 3 12-31-2008 07:13 AM
how to pass a function name and its arguments inside the arguments of other function? jmborr Python 1 11-03-2007 08:20 AM
function default arguments from other arguments tutmann C++ 4 10-17-2006 08:00 PM
function call with arguments which takes no arguments Neo C Programming 10 01-20-2005 06:31 AM
Difference between default arguments and keyword arguments Edward Diener Python 14 04-05-2004 11:26 PM



Advertisments