From kwrite-devel Tue Nov 12 17:11:20 2013 From: Alex Turbov Date: Tue, 12 Nov 2013 17:11:20 +0000 To: kwrite-devel Subject: Re: Switching to Python 3 Message-Id: X-MARC-Message: https://marc.info/?l=kwrite-devel&m=138427629715880 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============4484947764294315733==" --===============4484947764294315733== Content-Type: multipart/alternative; boundary=485b3970d514f83a4304eafdef05 --485b3970d514f83a4304eafdef05 Content-Type: text/plain; charset=ISO-8859-1 You ppl seem do not understand how that stuff works... On Tue, Nov 12, 2013 at 8:32 PM, Todd wrote: > ... With something like iPython, it shouldn't be much more difficult to > support both python 2 and python 3 than just one or the other, you just > need either the user or the distro to set the right *command to execute*. > There is no "command to execute"! IPython provides a module to import from other python apps (pate plugin, which is *embedded python app*). So, as Philipp already replied, python_console_ipython plugin *just* import it! No magic! No commands to execute or anything else... just "usual" import. And what will be imported depends on what ipython provides in any particular distro. For example, in gentoo, it is possible to have ipython "compiled" for Py2 and Py3 at the same time. And command `ipython` will use a module corresponding to the current default `python` version. But, Python version the kate is linked w/ couldn't be changed at runtime! So, if we are linked w/ Py3, python_console_ipython will import `ipython` module from python3 site packages dir. Same for py2... > On Tue, Nov 12, 2013 at 8:36 PM, Sven Brauch wrote: > it ends up using the version of ipython which kate was *linked* against. kate do not (and can not) be *linked* against ipython! again, as Philipp already said *it is not a native library*! it can't be used from C++, only from Python. And it's up to distro makers to provide ipython module compiled for the same Python version as kate... As I notice above there is no problem to do so in gentoo. Dunno what about other distros: are they provide bilingual python stuff for both versions or for "default" only... > Setting two commands would only work if > you would be happy with running the ipython CLI thingy in an existing > terminal (e.g. konsole kpart), which is not what is currently being > done -- ipython provides its own widget which is embedded in a > toolview. > That is absolutely CRAZY idea! and better even wouldn't consider it... PS. Personally I don't understand why you still discuss this... Definitely if user wants to run smth Py2 specific from ipython, he will do it from console (using `ipython` CLI). Why he ever want to run it from *ipython embedded into kate* ??? As correctly being noticed by someone above, ipython inside of kate is targeted to kate plugins developers... it is not the same as `konsole` embeded into kate! it is not a general use tool! --485b3970d514f83a4304eafdef05 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
You = ppl seem do not understand how that stuff works...

On Tue, Nov 12, 2= 013 at 8:32 PM, Todd <toddrjen@gmail.com> wrote:
... With something like iPyth= on, it shouldn't be much more difficult to support both python 2 and py= thon 3 than just one or the other, you just need either the user or the dis= tro to set the right command to execute.

There is no "comman= d to execute"! IPython provides a module to import from other python a= pps (pate plugin, which is *embedded python app*). So, as Philipp already r= eplied, python_console_ipython plugin *just* import it! No magic! No comman= ds to execute or anything else... just "usual" import. And what w= ill be imported depends on what ipython provides in any particular distro. = For example, in gentoo, it is possible to have ipython "compiled"= for Py2 and Py3 at the same time. And command `ipython` will use a module = corresponding to the current default `python` version. But, Python version = the kate is linked w/ couldn't be changed at runtime! So, if we are lin= ked w/ Py3, python_console_ipython will import `ipython` module from python= 3 site packages dir. Same for py2...
=A0
O= n Tue, Nov 12, 2013 at 8:36 PM, Sven Brauch <svenbrauch@googlema= il.com> wrote:
it ends= up using the version of ipython which kate was linked against.

kate= do not (and can not) be *linked* against ipython! again, as Philipp alread= y said *it is not a native library*! it can't be used from C++, only fr= om Python. And it's up to distro makers to provide ipython module compi= led for the same Python version as kate... As I notice above there is no pr= oblem to do so in gentoo. Dunno what about other distros: are they provide = bilingual python stuff for both versions or for "default" only...=
=A0
Setti= ng two commands would only work if
you would be happy with running the ipython CLI thingy in an existing
terminal (e.g. konsole kpart), which is not what is currently being
done -- ipython provides its own widget which is embedded in a
toolview.

That is absolutely CRAZY idea! and better even wouldn't = consider it...

PS. Personally I don't understand why = you still discuss this... Definitely if user wants to run smth Py2 specific= from ipython, he will do it from console (using `ipython` CLI). Why he eve= r want to run it from *ipython embedded into kate* ??? As correctly being n= oticed by someone above, ipython inside of kate is targeted to kate plugins= developers... it is not the same as `konsole` embeded into kate! it is not= a general use tool!
--485b3970d514f83a4304eafdef05-- --===============4484947764294315733== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel --===============4484947764294315733==--