[issue4915] Port sysmodule.c to MS Windows CE

2009-01-12 Thread Martin v. Löwis
Martin v. Löwis added the comment: Thanks for the patch. Committed as r68540, r68541. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: Next attempt, exclude all win variants from check. Added file: http://bugs.python.org/file12690/python-2.7-wince-sysmodule.2.patch ___ Python tracker _

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Do you want to remove the whole check for MS Windows then? Yes, please. A comment that you can't really redirect from a dir on Win32 might be useful. > Are you > otherwise comfortable with the second part of the patch, the one about > resolving argv[0]?

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: The CE documentation mentions directories, too, but is silent on the FILE_FLAG_BACKUP_SEMANTICS use for them. Also, even using that flag, I can't open a directory under CE. It seems that this check is superfluous there. I can also confirm that you get an er

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I don't really know what happens when you try to read()/fread() from > stdin that is a directory, but I guess it will fail quickly even > without an explicit check by Python. Without the explicit check, the interpreter crashed; this was the reason to add t

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: Changed patch with curly brackets outside the conditional code. Added file: http://bugs.python.org/file12689/python-2.7-wince-sysmodule.1.patch ___ Python tracker

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: I don't really know what happens when you try to read()/fread() from stdin that is a directory, but I guess it will fail quickly even without an explicit check by Python. A directory can be opened under win32 just like a file, so I guess that you could also

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Martin v. Löwis
Martin v. Löwis added the comment: The S_ISDIR test is to prevent the case python < /etc Is it really possible to invoke Python in such a way on CE? If not, it would be better if the entire test wasn't performed on CE. If it does get performed, I think it would be better if the code kept a m

[issue4915] Port sysmodule.c to MS Windows CE

2009-01-11 Thread Ulrich Eckhardt
New submission from Ulrich Eckhardt : The attached patch is for sysmodule.c, it contains two changes: 1. The check whether stdin is a directory is rewritten without using fstat(), which doesn't exist under CE. 2. Replacing sys.argv[0] with the full path is skipped, CE doesn't have a current wor