bugWeeChat - Bugs: bug #18101, add ~/.weechat/python/ to...

 
 

bug #18101: add ~/.weechat/python/ to PYTHONPATH for script loading

Submitter:  ts <timotheus25>
Submitted:  Tue 24 Oct 2006 08:18:11 PM UTC
 
Category:  plugins Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  kolter
Originator Name:  Open/Closed:  Closed
Release:  * None IRC nick: 
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Tue 24 Oct 2006 08:18:11 PM UTC, original submission:  

Hi. Python scripts loaded by WeeChat need the ability to 'import' scripts from non-global locations within their home directory, especially when the imported scripts are not weechat scripts themselves (but rather libraries, data structures, whatever...)

A good place would be:
${HOME}/.weechat/python/

So, the python interpreter might do one of:

(1) before running python, something that is effective to
# export PYTHONPATH=${HOME}/.weechat/python:${PYTHONPATH}

(2) evaluate this code before load of each script:
import sys, os
sys.path.insert(0, os.environ['HOME'] + '/.weechat/python')

(3) provide an API function that effectively does (2) for the script, whenever such behavior applies for that language.

ts <timotheus25>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

 

 

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-10-29 kolter StatusNone Fixed
    Assigned toNone kolter
    Open/ClosedOpen Closed

Back to the top


Powered by Savane 3.9