472,352 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

Re: How to bypass Windows 'cooking' the I/O? (One more time, please)II

On Jul 7, 10:18*am, Dennis Lee Bieber <wlfr...@ix.netcom.comwrote:
On Mon, 07 Jul 2008 01:03:10 -0700, norseman <norse...@hughes.net>
declaimed the following in comp.lang.python:
*Normal file I/O sequence:
*fp = open(target, 'wb')
*fp.seek(-1, 2)
*fp.write(record)
* *Except it doesn't do that in Windows. See below.

* * * * I wouldn't expect that sequence to work on any system... The "w"
implies "create new file, or truncate existing file to 0-bytes, then
write data to it" -- with no seeking permitted. You must include the "+"
to do seeking, and if you want to retain the existing file contents you
probably need to open with "a+" ("a" for append).

* * * * The rest of your situation I won't touch. Other than to wonder why
the situation hasn't hit any of the various database servers which must
be operating in binary mode, and perform lots of seeking... Surely
somewhere out someone else must have encountered a seek crossing an
apparent <cr><eofmark (which isn't a normal Windows sequence anyway --
since Windows uses <cr><lffor EOL, I'd have expected to see a problem
if backing over a <cr><lf><eof>)
--
* * * * Wulfraed * * * *Dennis Lee Bieber * * * ** * * KD6MOG
* * * * wlfr...@ix.netcom.com * * * * * * *wulfr...@bestiaria.com
* * * * * * * * HTTP://wlfraed.home.netcom.com/
* * * * (Bestiaria Support Staff: * * * * * * * web-a...@bestiaria.com)
* * * * * * * * HTTP://www.bestiaria.com/

lol @ op not finding the answer to his question in the archives, then
being answered again by someone who doesn't let his answer go in the
archive. How useful.
Jul 7 '08 #1
0 792

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Colin Brown | last post by:
Python2.3.2: Running the following receiver and sender code in separate windows under Win2K does not work properly (missed & very delayed...
1
by: Robert Hathaway | last post by:
COMP.OBJECT FAQ Version II Beta now Available http://www.objectfaq.com/oofaq2 ================================================== - Latest...
13
by: BigDaDDY | last post by:
Um yeah....In case you haven't figured it out, Microsoft sucks. I'm going to be kicked back in my chair eating popcorn and watching football 10...
3
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite...
12
by: Joey Powell | last post by:
Re: Original post = Windows forms - how do I get them to render/update properly? from August 22. Okay I am making some progress with being able...
4
by: Edwin G. Castro | last post by:
I want to start a process from a C# application. I also want to redirect standard error to standard output so that I can read output from both...
0
by: dicky2283 | last post by:
windows development community please help me im deepak roy , doing my final year undergrad in computer science.... im doing a project - Motion...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do...
0
by: norseman | last post by:
Dennis Lee Bieber wrote: ============================================= "I wouldn't expect..." ABSOLUTELY CORRECT. No append because the hex-1A...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.