[Tutor] X_OK
Bryan Weingarten
Bryan.Weingarten@watchguard.com
Fri Nov 1 14:49:03 2002
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C281DF.7B42F130
Content-Type: text/plain;
charset="iso-8859-1"
can someone please explain to me why
import os
os.access('C:\WINNT\notepad.exe', os.X_OK)
always return a 0 on a windows executable file? i thought this was a
cross-platform function. i was expecting a 1 on windows. now i have to
guard this function with "if not windows" logic.
thanks,
bryan
------_=_NextPart_001_01C281DF.7B42F130
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=126524319-01112002><FONT face=Arial size=2>can someone please
explain to me why </FONT></SPAN></DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial size=2>import
os</FONT></SPAN></DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2>os.access('C:\WINNT\notepad.exe', os.X_OK) </FONT></SPAN></DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial size=2>always return a 0 on
a windows executable file? i thought this was a cross-platform
function. i was expecting a 1 on windows. now i have to guard this
function with "if not windows" logic.</FONT></SPAN></DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2>thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=126524319-01112002><FONT face=Arial
size=2>bryan</FONT></SPAN></DIV></BODY></HTML>
------_=_NextPart_001_01C281DF.7B42F130--