Opposite of split
Neil Cerutti
neilc at norwich.edu
Tue Aug 17 11:36:57 EDT 2010
More information about the Python-list mailing list
Tue Aug 17 11:36:57 EDT 2010
- Previous message (by thread): Opposite of split
- Next message (by thread): Opposite of split
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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. -- Neil Cerutti
- Previous message (by thread): Opposite of split
- Next message (by thread): Opposite of split
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list