Python doesn't see the directories I create

Steve Holden steve at holdenweb.com
Thu Aug 30 19:47:57 CEST 2007


Steve Holden wrote:
[...]
> The fact is that some strings are always going to cause trouble. 
> Unfortunately programming itself is a task that requires a little more 
> knowledge to be applied to the task. Just learn the rules and move on.

As a quick follow-up, I had intended to comment on the usefulness of 
"verbatim literals".

string a = "hello, world";                  // hello, world
string b = @"hello, world";                 // hello, world
string c = "hello \t world";                // hello     world
string d = @"hello \t world";               // hello \t world
string e = "Joe said \"Hello\" to me";      // Joe said "Hello" to me
string f = @"Joe said ""Hello"" to me";     // Joe said "Hello" to me
string g = "\\\\server\\share\\file.txt";   // \\server\share\file.txt
string h = @"\\server\share\file.txt";      // \\server\share\file.txt
string i = "one\r\ntwo\r\nthree";

The @ character introduces a verbatim literal, and you can see from the 
examples given that they are implement a mixture of raw-string and 
triple-quote capabilities (even allowing multi-line string constants). I 
haven't fired up Visual Studio to verify, but I imagine you can even end 
a verbatim literal with a back-quote.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list