Incorrect python path in scripter
Bug #685625 reported by
Philippe Clérié
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scribus |
Fix Released
|
Unknown
|
|||
scribus-ng (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: scribus-ng
The python path in scripter is incorrect. It does include /usr/lib/python2.6 which is the second directory included in the standard path.
This is true for both 1.3.5 in Lucid and 1.3.8 in Maverick.
I happen to have 1.3.8 running in Fedora and it has the correct path.
How to reproduce:
Start Scribus
Open the scripter console
type:
import sys
sys.path
Press F9.
The bottom window has the path.
Changed in scribus: | |
status: | Unknown → Fix Released |
To post a comment you must log in.
Looked at this a bit after the IRC discussion. It seems like the python C api on ubuntu sets sys.path[0] not to an empty string but to "/usr/lib/ python2. 6" which is sys.path[1] usually and scribus overwrites sys.path[0] with it's own include path when the scriptengine is initialized. plugins/ scriptplugin/ scriptercore. cpp.
Could be solved by scribus using "sys.path.insert(0, \"%1\")\n" instead of "sys.path[0] = \"%1\"\n" in scribus/
I don't know why sys.path for the C API would look different in ubuntu than elsewhere though.