[EMAIL PROTECTED] wrote:
> I'm using windows, the current methods for getting directory path use
> "\" as a seperator, which happens to kill a lot of stuff....
>
> I've tried:
> os.currpwd()
>
> and:
> import pkg_resources
> egg = pkg_resources.get_distribution("Social-Base")
> path = egg.location
>
> Instead of the paths being like 'C:\stuff\stuff\stuff', i need them to
> be like 'C:/stuff/stuff/stuff'
>
> Note this problem only applies to windows....
Hi!
You have a few options:
1) double up your \ like 'c:\\path\\to\\file'
2) use raw string like r'c:\path\to\file'
3) use 'c:/path/to/file' as paython will do the right thing.
The reason for the problems is that the \ character in python is the
escape character (for getting litteral values like \0xff).
Hope this helps,
Krys
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---