Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: file write IOError Invalid argument

Reply
Thread Tools

Re: file write IOError Invalid argument

 
 
Gabriel Genellina
Guest
Posts: n/a
 
      07-20-2009
En Thu, 16 Jul 2009 17:41:39 -0300, Robert Robert
<(E-Mail Removed)> escribió:

> I am trying to write a binary string to file on a windows network share.
> I get an IOError. I've read that it is because the file size is too
> large. I did a type( binaryString) and saw that it was type "str". So I
> loop through it one by one element and use f.write to write to file, and
> it worked without any error. However it took a long while to write to
> file. I was wondering how I could split this binary string into N number
> of chunks efficiently and write them to file.


some_string[i:i+BLOCK_SIZE]
returns a slice of the original string, starting at position i, with
length BLOCK_SIZE.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Tim Golden Python 6 08-25-2009 12:29 PM
Re: Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename:in windows xp while making tarfile Dave Angel Python 0 08-24-2009 02:36 PM
Temat:,Re: IOError: [Errno 22] invalid mode ('wb') or filename: inwindows xp while making tarfile Ryniek90 Python 0 08-24-2009 12:44 PM
IOError: [Errno 22] invalid mode ('wb') or filename: in windowsxp while making tarfile Ryniek90 Python 3 08-24-2009 02:10 AM
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Java 1 10-15-2006 08:31 PM



Advertisments