This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: [python] proper setting of sys.path
- From: Tom Tromey <tromey at redhat dot com>
- To: ppluzhnikov at google dot com (Paul Pluzhnikov)
- Cc: archer at sourceware dot org
- Date: Tue, 16 Dec 2008 09:07:56 -0700
- Subject: Re: [python] proper setting of sys.path
- References: <20081216150307.A5EC53A6B37@localhost>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> Adding a call to Py_SetProgramName("you are unlikely to find
Paul> this on PATH") before the call to Py_Initialize() fixes the
Paul> problem: python can't find an executable named "you are unlikely
Paul> ..." on PATH, and uses PREFIX compiled into it (which is exactly
Paul> the desired behavior).
Paul> But surely there should be a better way to fix this?
>From the Python API reference, it sounds as though we ought to call
Py_SetProgramName(argv[0]) early on.
Will this work for your case?
Tom