In article ,
Grant Edwards wrote:
>On 2010-08-31, MRAB wrote:
>> On 31/08/2010 17:58, Grant Edwards wrote:
>>> On 2010-08-31, MRAB wrote:
On 31/08/2010 15:49, amfr...@web.de wrote:
> Hi,
>
> i have a script that reads and writes linux paths in a file. I save the
> path (as
On Tue, 31 Aug 2010 18:49:33 +, Grant Edwards wrote:
>> How many filenames contain control characters?
>
> How many filenames contain ","? Not many,
Unless you only ever deal with "Unix folk", it's not /that/ uncommon to
encounter filenames which are essentially complete sentences, punctuat
On 8/31/2010 2:33 PM, Nobody wrote:
...
FWIW, my usual solution is URL-encoding (i.e. replacing any "awkward"
character by a "%" followed by two hex digits representing the byte's
value). It has the advantage that you can extend the set of bytes which
need encoding as needed without having to ch
Thanks for all the nice answers!
The normal thing to do is to escape the delimiter when it appears in
data. There are lots of plenty of escaping standards to choose from,
and some of them (e.g. the one used for URLs) are already present
in various bits of Python's standard library.
The CSV mo
Hi Grant,
On 2010-08-31 20:49, Grant Edwards wrote:
> How many filenames contain ","?
CVS repository files end with ,v . However, just let's agree
that nobody uses CVS anymore. :-)
> Not many, but the OP wants his
> program to be bulletproof. Can't fault him for that.
What about using the csv
amfr...@web.de writes:
> Hi,
>
> i have a script that reads and writes linux paths in a file. I save
> the path (as unicode) with 2 other variables. I save them seperated by
> "," and the "packets" by newlines. So my file looks like this:
> path1, var1A, var1B
> path2, var2A, var2B
> path3, var3A
On 31/08/2010 19:33, Nobody wrote:
On Tue, 31 Aug 2010 18:13:44 +0100, MRAB wrote:
this works for "normal" paths but as soon as i have a path that does
include a "," it breaks. The problem now is that (afaik) linux allows
every char (aside from "/" and null) to be used in filenames. The only
so
On 2010-08-31, MRAB wrote:
> On 31/08/2010 17:58, Grant Edwards wrote:
>> On 2010-08-31, MRAB wrote:
>>> On 31/08/2010 15:49, amfr...@web.de wrote:
Hi,
i have a script that reads and writes linux paths in a file. I save the
path (as unicode) with 2 other variables. I save them
On Tue, 31 Aug 2010 18:13:44 +0100, MRAB wrote:
this works for "normal" paths but as soon as i have a path that does
include a "," it breaks. The problem now is that (afaik) linux allows
every char (aside from "/" and null) to be used in filenames. The only
solution i can think
On Tue, 2010-08-31 at 16:49 +0200, amfr...@web.de wrote:
> i have a script that reads and writes linux paths in a file. I save
> the
> path (as unicode) with 2 other variables. I save them seperated by ","
> and
> the "packets" by newlines. So my file looks like this:
> path1, var1A, var1B
> pa
On 31/08/2010 17:58, Grant Edwards wrote:
On 2010-08-31, MRAB wrote:
On 31/08/2010 15:49, amfr...@web.de wrote:
Hi,
i have a script that reads and writes linux paths in a file. I save the
path (as unicode) with 2 other variables. I save them seperated by ","
and the "packets" by newlines. So
On 2010-08-31, MRAB wrote:
> On 31/08/2010 15:49, amfr...@web.de wrote:
>> Hi,
>>
>> i have a script that reads and writes linux paths in a file. I save the
>> path (as unicode) with 2 other variables. I save them seperated by ","
>> and the "packets" by newlines. So my file looks like this:
>> pa
amfr...@web.de wrote:
> i have a script that reads and writes linux paths in a file. I save the
> path (as unicode) with 2 other variables. I save them seperated by "," and
> the "packets" by newlines. So my file looks like this:
> path1, var1A, var1B
> path2, var2A, var2B
> path3, var3A, var3B
I
On 31/08/2010 15:49, amfr...@web.de wrote:
Hi,
i have a script that reads and writes linux paths in a file. I save the
path (as unicode) with 2 other variables. I save them seperated by ","
and the "packets" by newlines. So my file looks like this:
path1, var1A, var1B
path2, var2A, var2B
path3,
On 2010-08-31, amfr...@web.de wrote:
> Hi,
>
> i have a script that reads and writes linux paths in a file. I save the
> path (as unicode) with 2 other variables. I save them seperated by "," and
> the "packets" by newlines. So my file looks like this:
> path1, var1A, var1B
> path2, var2A, var
Hi,
i have a script that reads and writes linux paths in a file. I save the
path (as unicode) with 2 other variables. I save them seperated by "," and
the "packets" by newlines. So my file looks like this:
path1, var1A, var1B
path2, var2A, var2B
path3, var3A, var3B
this works for "norm
16 matches
Mail list logo