It's been a year or so since I written Python code, so maybe
I am just doing something really dumb, but...
Documentation
=
class DictReader(csvfile[,fieldnames=None,
[,restkey=None[, restval=None[, dialect='excel'
[, *args, **kwds])
Jeff Blaine wrote:
It's been a year or so since I written Python code, so maybe
I am just doing something really dumb, but...
Documentation
=
class DictReader(csvfile[,fieldnames=None,
[,restkey=None[, restval=None[, dialect='excel'
[,
I see what's wrong. Me. Wow am I ever rusty.
Jeff Blaine wrote:
It's been a year or so since I written Python code, so maybe
I am just doing something really dumb, but...
Documentation
=
class DictReader(csvfile[,fieldnames=None,
[,restkey=None[,
Jeff Blaine wrote:
It's been a year or so since I written Python code, so maybe
I am just doing something really dumb, but...
Documentation
=
class DictReader(csvfile[,fieldnames=None,
[,restkey=None[, restval=None[, dialect='excel'
[, *args,
John Machin wrote:
If you were to write 'c:\temp\book1.csv', it would blow up ... because
\t - tab and \b - backspace. Get into the habit of *always* using raw
strings r'C:\Temp\Book1.csv' for Windows file names (and re patterns).
You could use double backslashing 'C:\\Temp\\Book1.csv' but
Tom Plunket wrote:
John Machin wrote:
If you were to write 'c:\temp\book1.csv', it would blow up ... because
\t - tab and \b - backspace. Get into the habit of *always* using raw
strings r'C:\Temp\Book1.csv' for Windows file names (and re patterns).
You could use double backslashing
...alternatively you can just use 'unix slashes', e.g.
'c:/temp/book1.csv', since those work just fine 'cause the Windows
APIs deal with them properly.
John Not all APIs do the right thing. If you fire up the cmd.exe shell
John and feed it slashes as path separators, it
John Machin wrote:
Tom Plunket wrote:
John Machin wrote:
If you were to write 'c:\temp\book1.csv', it would blow up ... because
\t - tab and \b - backspace. Get into the habit of *always* using raw
strings r'C:\Temp\Book1.csv' for Windows file names (and re patterns).
You could use double
On 2/11/2006 2:38 PM, [EMAIL PROTECTED] wrote:
...alternatively you can just use 'unix slashes', e.g.
'c:/temp/book1.csv', since those work just fine 'cause the Windows
APIs deal with them properly.
John Not all APIs do the right thing. If you fire up the cmd.exe shell
John Machin wrote:
Not all APIs do the right thing. If you fire up the cmd.exe shell and
feed it slashes as path separators, it barfs. Example:
C:\junkdir c:/junk/*.bar
Invalid switch - junk.
Hence the advice to use rawstrings with backslashes -- they work under
all circumstances.
Fredrik Lundh wrote:
if you're wrapping some cmd.exe command in an internal API, it's usually
easier to call os.path.normpath the last thing you do before you call
os.system, than to get all the backslashes right in your code.
also see:
11 matches
Mail list logo