Binary or ascii file?

Anders M Eriksson anders.eriksson at morateknikutveckling.se
Fri Sep 8 04:02:30 EDT 2000


On Fri, 08 Sep 2000 02:54:37 GMT, "Steven Adams"
<quickdry at users.sourceforge.net> wrote:

>you might want to check out Mark Hammonds win32 extensions, it might be in
>there.
>

I will!

>it shouldn't be too hard to find out whether a file is binary or not, since
>AFAIK Windows sets a flag to show whether a file is an executable/binary or
>not. is that correct? I think I've read it somewhere....
>

I have not seen that info anyware! In unix yes but on Winows??

>all my executables and other binary files seem to be set as 'Archive' so I
>guess you could use 'win32file' to check if the file you're trying to access
>has FILE_ATTRIBUTE_ARCHIVE set.
>
The archive flag is set whenever a file is modified and is commonly
used to determine whether a file should be backed up. 

Thanks for your reply!

// Anders



More information about the Python-list mailing list