Opposite of split

Grant Edwards invalid at invalid.invalid
Tue Aug 17 11:46:31 EDT 2010


On 2010-08-17, Neil Cerutti <neilc at norwich.edu> wrote:
> On 2010-08-17, Stefan Schwarzer <sschwarzer at sschwarzer.net> wrote:
>> Hi Alex,
>>
>> On 2010-08-16 18:44, Alex van der Spek wrote:
>>> Anybody catches any other ways to improve my program (attached), you are 
>>> most welcome. Help me learn, that is one of the objectives of this 
>>> newsgroup, right? Or is it all about exchanging the next to impossible 
>>> solution to the never to happen unreal world problems?
>>
>> I don't know what a concordance table is, and I haven't
>> looked a lot into your program, but anyway here are some
>> things I noticed at a glance:
>>
>>| #! usr/bin/env python
>>| # Merge log files to autolog file
>>| import os
>>| import fileinput
>>| #top='C:\\Documents and Settings\\avanderspek\\My Documents\\CiDRAdata\\Syncrude\\CSL\\August2010'
>>| top='C:\\Users\\ZDoor\\Documents\\CiDRA\\Syncrude\CSL\\August2010'
>>
>> If you have backslashes in strings, you might want to use "raw
>> strings". Instead of "c:\\Users\\ZDoor" you'd write
>> r"c:\Users\ZDoor" (notice the r in front of the string).
>
> That's good general advice. But in the specific case of file
> paths, using '/' as the separator is supported, and somewhat
> preferable.

Unless you're going to be passing them to cmd.exe or other utilities
via subprocess/popen.

-- 
Grant Edwards               grant.b.edwards        Yow! MY income is ALL
                                  at               disposable!
                              gmail.com            



More information about the Python-list mailing list