Problem with os module

Clarence Gardner clarence at netlojix.com
Wed Jun 28 12:14:11 EDT 2000


On Wed, 28 Jun 2000, Richard Chamberlain wrote:
>
>if os.path.isfile("c:\\Test"):
>
>(much better)
>
>b.t.w. you'll notice above that I've used c:\\Test - the reason
>is that \ has a special meaning within a string. For instance \t
>is a tab and \n a newline, \\ is in fact a single \. So your
>paths should look something like "c:\\my folder\\my file".

As a side note, it's easier if your paths look something like
"c:/my folder/my file".



More information about the Python-list mailing list