On Mon, 14 Dec 2009 21:37:33 -0300, Gabriel Genellina wrote:
There are no file objects in 3.x. The file() function no longer
exists. The return value from open(), will be an instance of
_io.something depending upon the mode, e.g. _io.TextIOWrapper for 'r',
_io.BufferedReader for 'rb',
On 13 דצמבר, 22:39, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sat, 12 Dec 2009 22:15:50 -0800 (PST), daved170 daved...@gmail.com
declaimed the following in gmane.comp.python.general:
Thank you all.
Dennis I really liked you solution for the issue but I have two
question about it:
On Dec 14, 11:44 pm, Terry Reedy tjre...@udel.edu wrote:
On 12/14/2009 7:37 PM, Gabriel Genellina wrote:
En Mon, 14 Dec 2009 18:09:52 -0300, Nobody nob...@nowhere.com escribió:
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read
On Dec 14, 1:57 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sun, 13 Dec 2009 22:56:55 -0800 (PST), sjdevn...@yahoo.com
sjdevn...@yahoo.com declaimed the following in
gmane.comp.python.general:
The 3.1 documentation specifies that file.read returns bytes:
file.read([size])
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read returns bytes:
Does it need fixing?
There are no file objects in 3.x. The file() function no longer
exists. The return value from open(), will be an instance of
_io.something
On Mon, 14 Dec 2009 03:14:11 +, MRAB wrote:
You originally stated that you want to scramble the bytes -- if
you mean to implement some sort of encryption algorithm you should know
that most of them work in blocks as the key is longer than one byte.
Block ciphers work in blocks.
En Mon, 14 Dec 2009 18:09:52 -0300, Nobody nob...@nowhere.com escribió:
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read returns bytes:
Does it need fixing?
There are no file objects in 3.x. The file() function no longer
exists.
On Dec 14, 4:09 pm, Nobody nob...@nowhere.com wrote:
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read returns bytes:
Does it need fixing?
There are no file objects in 3.x.
Then the documentation definitely needs fixing; the
On 12/14/2009 7:37 PM, Gabriel Genellina wrote:
En Mon, 14 Dec 2009 18:09:52 -0300, Nobody nob...@nowhere.com escribió:
On Sun, 13 Dec 2009 22:56:55 -0800, sjdevn...@yahoo.com wrote:
The 3.1 documentation specifies that file.read returns bytes:
Does it need fixing?
There are no file
Hi!
If it's a binary file...
OK, but... what is a binary file?
@+
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Dec 13, 2009 at 12:20 AM, Michel Claveau - MVP
enleverlesx_xx...@xmclavxeaux.com.invalid wrote:
Hi!
If it's a binary file...
OK, but... what is a binary file?
http://en.wikipedia.org/wiki/Binary_file
Cheers,
Chris
--
http://blog.rebertia.com
--
On 2009-12-13, Michel Claveau - MVP enleverlesx_xx...@xmclavxeaux.com.invalid
wrote:
Hi!
If it's a binary file...
OK, but... what is a binary file?
One containing data encoded in base-2.
--
Grant
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
If it's a binary file...
OK, but... what is a binary file?
One containing data encoded in base-2.
Or one of a system of two files that orbits around a common
center of mass? So if you see two files orbiting around a
cathedral, they're binary files.
On Sun, 13 Dec 2009 06:44:54 -, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Sat, 12 Dec 2009 22:15:50 -0800, daved170 wrote:
Thank you all.
Dennis I really liked you solution for the issue but I have two question
about it:
1) My origin file is Text file and not binary
On Sun, 13 Dec 2009 12:39:26 -0800, Dennis Lee Bieber wrote:
You originally stated that you want to scramble the bytes -- if
you mean to implement some sort of encryption algorithm you should know
that most of them work in blocks as the key is longer than one byte.
Block ciphers work in
Nobody wrote:
On Sun, 13 Dec 2009 12:39:26 -0800, Dennis Lee Bieber wrote:
You originally stated that you want to scramble the bytes -- if
you mean to implement some sort of encryption algorithm you should know
that most of them work in blocks as the key is longer than one byte.
On Dec 13, 5:56 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Sun, 13 Dec 2009 06:44:54 -, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Sat, 12 Dec 2009 22:15:50 -0800, daved170 wrote:
Thank you all.
Dennis I really liked you solution for the issue but I
daved170 wrote:
Hello everybody,
I need to read a text file byte after byte.
Eache byte is sent to a function that scramble it
and I need to write the result to binary file.
I've got some questions -
1) How do I read the file byte by byte
2) Should I use streams? If so and I get my entire
daved170 wrote:
Hello everybody,
I need to read a text file byte after byte.
Eache byte is sent to a function that scramble it
and I need to write the result to binary file.
I've got some questions -
1) How do I read the file byte by byte
2) Should I use streams? If so and I get my entire
On Sat, 12 Dec 2009 10:35:55 +0100, census wrote:
I've got some questions -
1) How do I read the file byte by byte 2) Should I use streams? If so
and I get my entire scrambled text in stream can I just write it to the
binary file?
Thanks
Dave
f = open (binaryfile, r)
bytearray = map
On Fri, 11 Dec 2009 23:16:42 -0800, daved170 wrote:
Hello everybody,
I need to read a text file byte after byte. Eache byte is sent to a
function that scramble it and I need to write the result to binary file.
I've got some questions -
1) How do I read the file byte by byte
f = open
Steven D'Aprano wrote:
On Sat, 12 Dec 2009 10:35:55 +0100, census wrote:
I've got some questions -
1) How do I read the file byte by byte 2) Should I use streams? If so
and I get my entire scrambled text in stream can I just write it to the
binary file?
Thanks
Dave
f = open
On Sat, 12 Dec 2009 11:14:13 -, census cen...@no-email.de wrote:
Steven D'Aprano wrote:
On Sat, 12 Dec 2009 10:35:55 +0100, census wrote:
I've got some questions -
1) How do I read the file byte by byte 2) Should I use streams? If so
and I get my entire scrambled text in stream can I
Steven D'Aprano wrote:
2) Should I use streams?
What do you mean by streams?
they're what come out of proton packs...just don't cross them.
It would be bad.
-tkc
(I suspect the OP is a Java/C++ programmer where streams are
somewhat akin to generators, but less powerful; so the answer is
On Dec 13, 2:34 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sat, 12 Dec 2009 10:46:01 +0100, census cen...@no-email.de
declaimed the following in gmane.comp.python.general:
def scramble (a): return (a + 13) % 256
I'll see your modulo rot 13 and raise with a exclusive
On Sat, 12 Dec 2009 22:15:50 -0800, daved170 wrote:
Thank you all.
Dennis I really liked you solution for the issue but I have two question
about it:
1) My origin file is Text file and not binary
That's a statement, not a question.
2) I need to read each time 1 byte.
f = open(filename,
On 12/13/2009 5:15 PM, daved170 wrote:
Thank you all.
Dennis I really liked you solution for the issue but I have two
question about it:
1) My origin file is Text file and not binary
2) I need to read each time 1 byte. I didn't see that on your example
code.
That's where you're confusing
daved170 wrote:
On Dec 13, 2:34 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sat, 12 Dec 2009 10:46:01 +0100, census cen...@no-email.de
declaimed the following in gmane.comp.python.general:
def scramble (a): return (a + 13) % 256
I'll see your modulo rot 13
Hello everybody,
I need to read a text file byte after byte.
Eache byte is sent to a function that scramble it
and I need to write the result to binary file.
I've got some questions -
1) How do I read the file byte by byte
2) Should I use streams? If so and I get my entire scrambled text
29 matches
Mail list logo