The other ones I've found useful are below. Note: this unloads all scripts because the Python plugin is reloaded.In the first Weechat post I covered the shortcuts for handling buffers and IRC. Now you can type /py2 or /p圓 to switch the Python version. alias add p圓 /plugin unload python /plugin load ~/dev/weechat/python3.so alias add py2 /plugin unload python /plugin load python DCMAKE_INSTALL_PREFIX=$HOME/dev/weechat -DENABLE_PYTHON3=OFFĪdd aliases to quickly switch between Python 2.7 and 3.x: $ mv ~/dev/weechat/lib/weechat/plugins/python.so ~/dev/weechat/python3.so DCMAKE_INSTALL_PREFIX=$HOME/dev/weechat -DENABLE_PYTHON3=ON You can not use Python 2.7 and 3.x at same time in WeeChat, but you could compile both versions of the Python plugin and switch the Python plugin with aliases.įirst check that you have both Python 2.7 and 3.x libraries installed to compile WeeChat with both versions.Ĭompile WeeChat with Python 3.x and install it in home directory. Here's a list of some resources that can help to port scripts to Python 3: If possible, the author of script should make the necessary changes to make the script compatible with both Python 2.7 and 3.x. The scripts which are compatible with Python 3 have tag "p圓". Important: at this date, all scripts that are not compatible with Python 3 are disabled: still visible on the scripts list page, but marked as "disabled" and these scripts can not be installed in WeeChat any more. Starting with WeeChat 3.8, support of Python 2.x has been removed. The end of transition is postponed (see below).Īll new scripts as well as script updates must be compatible with Python 3.x. Unfortunately, at this date, only 46% of Python scripts (103 out of 228) are compatible with Python 3. It is the initial end date for the transition. Compiling by default with Python 3 should speed up the update of scripts. Unfortunately, at this date, only 42% of Python scripts (96 out of 226) are compatible with Python 3. New versions of WeeChat are compiled with Python 3 by default, which becomes the recommended Python version to use in WeeChat.Īll new scripts as well as script updates must still be compatible with Python 2.7 and Python 3.x, time for the users to upgrade to the latest version of WeeChat which is Python 3 only. Scripts must be properly tested with Python 2.7 and a Python 3.x version (if possible the latest stable). Script updates are still allowed to be compatible with Python 2.7 only.Īll new scripts as well as script updates must be compatible with both Python 2.7 and Python 3.x. Help from other people is welcome as well.Īll new scripts must be compatible with both Python 2.7 and Python 3.x. You can help by converting existing scripts (see how to help below).Īn e-mail is sent to the authors of Python scripts which are not compatible with Python 3 (at least they are not marked as compatible in database).Īll authors are encouraged to make their scripts compatible with Python 3.x as soon as possible. Here is the roadmap for the transition to Python 3 in WeeChat:Īll scripts that are not yet compatible with both Python 2.7 and Python 3.x can be updated to support both versions (see the status below). To compile with Python 3.x support and enable quick switch between Python 2.7 and 3.x, see:Ĭompile and test with Python 2.7 and 3.x Transition roadmap The support of Python 3 is optional: the WeeChat python plugin can be compiled with Python 2.7 or Python 3.x, but not both at same time.Īs of Jun 3, 2018, it is recommended to compile with Python 2.7 because many scripts won't work at all with Python 3.x, while all scripts should run fine with Python 2.7. WeeChat supports Python 3 since version 0.3.7, which was released on (11 years, 3 months ago). Python 3 has many new exciting features, for example: Version 3.0 was released on (14 years, 6 months ago). Python 3.x is the present and future of the language. Python 2.x is legacy it has an end-of-life set for 2020.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |