[Pythonmac-SIG] Re: Path Issues
bob at redivi.com
Mon Nov 3 15:51:34 EST 2003
On Nov 3, 2003, at 3:44 PM, Joshua Tompkins wrote:
> Bob Ippolito wrote:
>> On Nov 3, 2003, at 3:28 PM, Joshua Tompkins wrote:
>>> Yes, I'm using the open() builtin function.
>> Are you using it from an application bundle? an app opened via
>> LaunchServices (Finder, the open command) will have a getcwd() of /
>> when it starts. Try "print os.getcwd()" to see where the cwd is.
> I'm running Python by typing "python" from the Terminal.
> os.getcwd() returns "/Users/joshua" (with that capitalization).
What is the line of code that you're trying?
open("~/source/python/file") does not work
you need to do
if you want to use tilde expansion.
More information about the Pythonmac-SIG