On Jan 12, 6:21 pm, MRAB wrote:
> On 12/01/2012 22:26, Denhua wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I've got a file which I'd like to read, modify and write.
>
> > # file contents
> > a
> > b
> > c
> > d
>
> > My script reads the file contents into a list and rotates the list and
> > writes it back t
On 12/01/2012 22:26, Denhua wrote:
Hi,
I've got a file which I'd like to read, modify and write.
# file contents
a
b
c
d
My script reads the file contents into a list and rotates the list and
writes it back to the same file.
Problem is that the output contains null characters. I don't know
whe
In article
<4f7d125a-2713-4b57-a108-2a56ae653...@h3g2000yqe.googlegroups.com>,
Denhua wrote:
> [omitted]
> f.write("\n".join(newlist))
> f.close()
>
> # output
>
> [root@Inferno html]# python rotate.py
> ['b', 'c', 'd', 'a']
> [root@Inferno html]# python rotate.py
> ['c', 'd', 'a', '\x00\x00\
On Tue, Aug 23, 2011 at 11:29 PM, Muresan Alexandru Mihai
wrote:
> If you need an int isn't better to use input() instead of raw_input() ?
Absolutely not! input() does an eval(), which is very dangerous
security-wise and can also lead to rather strange behavior.
input() is so bad that it was remo
If you need an int isn't better to use input() instead of raw_input() ?
On Tue, Aug 23, 2011 at 10:00 PM, Adrián Monkas wrote:
> Hi.
> I`ve been trying to copy a long text from one file to another but it always
> copied me just a small part.
> I would be glad if you can help me or explain which i
On Tue, Aug 23, 2011 at 9:05 PM, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, Adrián Monkas wrote:
>> print "Abro Archivo Origen"
>> archivo=open("D:\Boot.txt","r")
> Your filenames are incorrect, since you use the backslash without escaping
> it. So the source file ha
On 01/-10/-28163 02:59 PM, Adrián Monkas wrote:
Hi.
I`ve been trying to copy a long text from one file to another but it always
copied me just a small part.
I would be glad if you can help me or explain which is my error.
Thanks
---
Paul Moore napisał(a):
>> Anyway, what you want is Mutagen. It handles both Flac and Mp3 tags, as well
>> as many others:http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen
>
> Excellent! The web page you mentioned gave "access denied", but I got
> to it via Google's cache, and the downl
On 24 May, 17:22, darren kirby <[EMAIL PROTECTED]> wrote:
> quoth the Paul Moore:
>
> > I'd like to write some scripts to analyze and manipulate my music
> > files. The files themselves are in MP3 and FLAC format (mostly MP3,
> > but FLAC where I ripped original CDs and wanted a lossless format).
>
quoth the Paul Moore:
> I'd like to write some scripts to analyze and manipulate my music
> files. The files themselves are in MP3 and FLAC format (mostly MP3,
> but FLAC where I ripped original CDs and wanted a lossless format).
> I've no idea what form of tags are used in the files (ID3v1, ID3v2,
Sir Galahad the chaste <[EMAIL PROTECTED]> writes:
> Hi,
>
> [EMAIL PROTECTED] wrote:
>> How should I: Open a Text file, read from it, modify it, print to
>> another .txt?
>> For instance: Read a string, sort it, write the sorted string.
>
> What do you mean by "sorting"? If you want to sort the l
-Galahad,
Thank you very much. I will give it a shot and see if I can make it
hapen. I think this will help a lot.
I was just trying to implement a simple sorting algorithm that I knew
from C++, for practice but I couldn't figure the mechanics of Python.
Thanks again,
Novitiate
--
http://mai
-Galahad,
Thank you very much. I will give it a shot and see if I can make it
hapen. I think this will help a lot.
I was just trying to implement a simple sorting algorithm that I knew
from C++, for practice but I couldn't figure the mechanics of Python.
Thanks again,
Novitiate
--
http://mai
Hi,
[EMAIL PROTECTED] wrote:
How should I: Open a Text file, read from it, modify it, print to
another .txt?
For instance: Read a string, sort it, write the sorted string.
What do you mean by "sorting"? If you want to sort the lines contained
in a file, you could do something like this.
$ cat in.
14 matches
Mail list logo