[py-dev] Problems with DOS files

Bob Ippolito bob at redivi.com
Fri Dec 3 03:08:48 CET 2004


On Dec 2, 2004, at 8:36 PM, holger krekel wrote:

> [Brian Dorsey Thu, Dec 02, 2004 at 03:58:12PM -0800]
>> On Thu, 2 Dec 2004 15:40:09 -0600, Patrick K. O'Brien
>> <pobrien at eclypse.org> wrote:
>>
>>> Take that back.  Courtesy of Matthew Scott, here is a clever, 
>>> two-line
>>> solution (concatenate that second line if it breaks):
>>>
>>> pytest.bat
>>> ==========
>>> @echo off
>>> python -c "import py; from py.__impl__.test.cmdline import main; 
>>> main()" %1
>>> %2 %3 %4 %5 %6 %7 %8 %9
>>
>> I think something along these lines is a good general solution for
>> windows users. A distutils installer could also copy this to the
>> pythonXX\scripts directory.
>>
>> Personally, though... I find it convenient to have the .py extension
>> associated with Python, so in this case, I'm a bit tempted to just
>> copy py.test to the rather oddly named py.test.py.
>
> Is *.py normally executable on windows after you installed Python?

Yes.  Windows doesn't have an executable bit, any extension that is 
registered by an application as a document type is "executable".  If 
you type the name of a html file into the shell, it will probably open 
in Internet Explorer.

-bob




More information about the Pytest-dev mailing list