[Python-bugs-list] [Bug #133592] Can't execute script from a DOS partition without .py ext

noreply@sourceforge.net noreply@sourceforge.net
Thu, 22 Feb 2001 05:32:14 -0800


Bug #133592, was updated on 2001-Feb-22 05:32
Here is a current snapshot of the bug.

Project: Python
Category: Python Interpreter Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Submitted by: montanaro
Assigned to : nobody
Summary: Can't execute script from a DOS partition without .py ext

Details: I have a Python script without a .py extension on a DOS partition
that runs fine using python 1.6 and 2.0, but fails with a syntax error on
2.1.  If I copy it back to a Linux ext2fs partition or give it a .py
extension it works fine.  Diff thinks DOS and extfs versions are identical
as does cksum.

    % python cgi-bin/query   
      File "cgi-bin/query", line 88
        print "serverdir could not be loaded"
        ^
    SyntaxError: invalid syntax

(Note that there are only 87 lines in the file.)

    % python cgi-bin/query.py
    Content-type: text/plain

    ...

I placed a copy of the script at

    http://www.musi-cal.com/~skip/query

Copying it from the DOS partition to the remote system using scp
complained:

    query : ERROR..continuing to end of file anyway

This, coupled with the erroneous line number leads me to suspect the syntax
error has to do with the presence of the DOS EOF marker.



For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=133592&group_id=5470