This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] proper setting of sys.path


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]