Re: Windows users please test this for me

Bill Mill <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
On Apr 3, 2005 1:20 PM, Steven Armstrong <[email protected]> wrote:
> On 04/03/05 18:30, Bill Mill wrote:
> > On Apr 3, 2005 2:49 AM, Steven Armstrong <[email protected]> wrote:
> >> Hi
> >>
> >> Could someone who has Python installed on a Windows box please test this
> >> for me:
> >>
> >> f = open("NUL","a")
> >> f.write("whatever")
> >> f.flush()
> >
> >>>> f = open('NUL', 'a')
> >>>> f.write('something')
> >>>> f.flush()
> >
> > It didn't create a file, as far as I can tell. I assume that's the
> > behavior you wanted? Is NUL a reserved word?
> >
> > Peace
> > Bill Mill
> > bill.mill at gmail.com
> >
> >
> 
> Windows ==> NUL
> *nix ==> /dev/null
> 

Cool, I didn't know that. I'm on windows lately, since Loonix hates me
(or I don't know how to configure my wireless card right, take your
pick) so that's a neat trick to add to the toolbox.

> Thanks for testing :-)
> I wasn't sure if it'ld work.
> 

No worries. I was pretty surprised when it did - I even had to search
for a NUL file just to be sure. Surprisingly, it even worked on
cygwin's python (I tested with winpython and cygwin python).

Peace
Bill Mill
bill.mill at gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.