Re: Plans for python support on lyx-2.2

2014-05-18 Thread Cyrille Artho
Would anyone oppose to change the requirements for devel as stated above? python 2.7 or 3.3+ I think it's a very good idea as Python 2.7 is still default on Mac OS and perhaps also other platforms. -- Regards, Cyrille Artho - http://artho.com/ Those who will not reason, are bigots, those wh

Re: Re: Plans for python support on lyx-2.2

2014-05-17 Thread José Matos
On Friday 16 May 2014 11:50:10 Richard Heck wrote: > I don't, but I'd suggest you reissue this question with a new subject > line, so everyone will see it. > > Richard Fair enough. :-) -- José Abílio

Re: Plans for python support on lyx-2.2

2014-05-16 Thread Richard Heck
On 05/16/2014 11:10 AM, José Matos wrote: On Thursday 15 May 2014 21:07:28 Georg Baum wrote: This plan looks sensible. As far as OS X 10.7 is concerned: https://www.python.org/download/mac claims that you can install their binary packages in parallel to the system python, so if anybody really wa

Re: Re: Re: Re: Plans for python support on lyx-2.2

2014-05-16 Thread José Matos
On Thursday 15 May 2014 21:07:28 Georg Baum wrote: > This plan looks sensible. As far as OS X 10.7 is concerned: > https://www.python.org/download/mac claims that you can install their binary > packages in parallel to the system python, so if anybody really wants to use > a current version of Ly

Re: Re: Re: Plans for python support on lyx-2.2

2014-05-15 Thread Georg Baum
José Matos wrote: > On Saturday 03 May 2014 07:27:51 Benjamin Piwowarski wrote: >> Yes, but it would be good not to use it, in order to support OS X systems >> more ancient than the current one - they are running python 2.5-2.6. >> >> benjamin > > python 2.7 was released on July of 2010. The nex

Re: Re: Plans for python support on lyx-2.2

2014-05-09 Thread José Matos
On Thursday 08 May 2014 12:57:43 Kornel Benko wrote: > How works this code in python2? > Sorry for my apparent ignorance. > > Kornel Adding to that file from __future__ import print_function this works since python 2.6 -- José Abílio

Re: Re: Re: Plans for python support on lyx-2.2

2014-05-09 Thread José Matos
On Wednesday 07 May 2014 08:35:01 Pavel Sanda wrote: > :)) Seems the python devs really know what they are doing. > > Pavel $ python -m this The Zen of Python, by Tim Peters ... Special cases aren't special enough to break the rules. Although practicality beats purity. ... Now is better than nev

Re: Plans for python support on lyx-2.2

2014-05-08 Thread Kornel Benko
Am Mittwoch, 7. Mai 2014 um 15:18:42, schrieb José Matos > On Wednesday 07 May 2014 11:23:48 Kornel Benko wrote: > > At least prints could be rewritten with > > import sys > > ... > > sys.out.write(...) > > or > > output = open(...) > > output.write() >

Re: Re: Plans for python support on lyx-2.2

2014-05-07 Thread Pavel Sanda
José Matos wrote: > The question regarding which is the minimum version of python 3 to support is > more or less like this: > > * python 3.0 was the first implementation and it has some "features" that > were later restored to behave as python 2.x :)) Seems the python devs really know what the

Re: Re: Plans for python support on lyx-2.2

2014-05-07 Thread José Matos
On Wednesday 07 May 2014 11:23:48 Kornel Benko wrote: > At least prints could be rewritten with > import sys > ... > sys.out.write(...) > or > output = open(...) > output.write() > > No dependencies on python2 or python3. > Just my 2 cents. But then it

Re: Re: Plans for python support on lyx-2.2

2014-05-07 Thread José Matos
On Monday 05 May 2014 09:54:40 Richard Heck wrote: > If there are, at that time, cases where 2.7 is not going to be > available, then we can package Python ourselves with the binary, as we > already do on Windows. > > What's the reason to require 3.3+? (I'm not familiar with developments > here

Re: Plans for python support on lyx-2.2

2014-05-07 Thread Kornel Benko
Am Mittwoch, 7. Mai 2014 um 10:49:55, schrieb Benjamin Piwowarski > Hi, > > Again - on OS X 10.7, this will not work. And I don’t think the scripts used > in LyX are that complex that we cannot handle them with using the future > statement; for the two first scripts I converted, the work was tr

Re: Re: Plans for python support on lyx-2.2

2014-05-07 Thread Benjamin Piwowarski
Hi, Again - on OS X 10.7, this will not work. And I don’t think the scripts used in LyX are that complex that we cannot handle them with using the future statement; for the two first scripts I converted, the work was trivial and did not require it.  We can maybe start by not using it and discu

Re: Re: Plans for python support on lyx-2.2

2014-05-06 Thread Neal Becker
José Matos wrote: > On Friday 02 May 2014 13:31:36 Neal Becker wrote: >> I think the python-future package is helpful > > Do you mean > > from __future__ import print_function, division > > if so I agree. :-) > No, I mean: https://pypi.python.org/pypi/future

Re: Plans for python support on lyx-2.2

2014-05-05 Thread Josh Hieronymus
On Apr 24, 2014 5:13 PM, "Josh Hieronymus" wrote: > > if we're only concerned with supporting Python 2.7 and up, we could include the statement "from __future__ import print_function" in any file in which we use the print function I misremembered this before, but Python 2.6 supports the import of

Re: Plans for python support on lyx-2.2

2014-05-05 Thread Richard Heck
On 05/04/2014 07:10 PM, José Matos wrote: On Saturday 03 May 2014 07:27:51 Benjamin Piwowarski wrote: Yes, but it would be good not to use it, in order to support OS X systems more ancient than the current one - they are running python 2.5-2.6. benjamin python 2.7 was released on July of 2010

Re: Re: Re: Plans for python support on lyx-2.2

2014-05-04 Thread José Matos
On Saturday 03 May 2014 07:27:51 Benjamin Piwowarski wrote: > Yes, but it would be good not to use it, in order to support OS X systems > more ancient than the current one - they are running python 2.5-2.6. > > benjamin python 2.7 was released on July of 2010. The next version of lyx will be a

Re: Plans for python support on lyx-2.2

2014-05-03 Thread Richard Heck
On 05/03/2014 01:27 AM, Benjamin Piwowarski wrote: On 2 May 2014 at 19:41:52 , José Matos (jama...@lyx.org ) wrote: On Friday 02 May 2014 13:31:36 Neal Becker wrote: > I think the python-future package is helpful Do you mean from __future__ import print_function, divisi

Re: Re: Plans for python support on lyx-2.2

2014-05-02 Thread Benjamin Piwowarski
On 2 May 2014 at 19:41:52 , José Matos (jama...@lyx.org) wrote: On Friday 02 May 2014 13:31:36 Neal Becker wrote: > I think the python-future package is helpful Do you mean from __future__ import print_function, division if so I agree. :-) Yes, but it would be good not to use it, in o

Re: Re: Plans for python support on lyx-2.2

2014-05-02 Thread José Matos
On Friday 02 May 2014 13:31:36 Neal Becker wrote: > I think the python-future package is helpful Do you mean from __future__ import print_function, division if so I agree. :-) -- José Abílio

Re: Plans for python support on lyx-2.2

2014-05-02 Thread Neal Becker
I think the python-future package is helpful

Re: Re: Plans for python support on lyx-2.2

2014-05-02 Thread Benjamin Piwowarski
On 1 May 2014 at 23:06:16 , José Matos (jama...@lyx.org) wrote: On Thursday 24 April 2014 17:13:43 Josh Hieronymus wrote: > The question:... Was there a reason that we were using > binary mode in the first place? > > Josh IIRC it was to deal with the end line char in windows, but this wa

Re: Re: Plans for python support on lyx-2.2

2014-05-01 Thread José Matos
On Thursday 24 April 2014 17:13:43 Josh Hieronymus wrote: > The question:... Was there a reason that we were using > binary mode in the first place? > > Josh IIRC it was to deal with the end line char in windows, but this was to support python 2.2 and my memory is fuzzy about further details. Th

Re: Plans for python support on lyx-2.2

2014-04-24 Thread Stephan Witt
Am 25.04.2014 um 01:00 schrieb Jean-Marc Lasgouttes : > Le 24/04/14 23:13, Josh Hieronymus a écrit : >> The comment: if we're only concerned with supporting Python 2.7 and up, >> we could include the statement "from __future__ import print_function" >> in any file in which we use the print functio

Re: Plans for python support on lyx-2.2

2014-04-24 Thread Cyrille Artho
Mac OS 10.9 (Mavericks) has 2.7.5 installed. So we should keep 2.7.X compatibility. I think most people still use 2.7, as 3.X is relatively new (in terms of software maintenance/update cycles) and it takes considerable effort to switch a project over to 3.X. Jean-Marc Lasgouttes wrote: Le 24/

Re: Plans for python support on lyx-2.2

2014-04-24 Thread Jean-Marc Lasgouttes
Le 24/04/14 23:13, Josh Hieronymus a écrit : The comment: if we're only concerned with supporting Python 2.7 and up, we could include the statement "from __future__ import print_function" in any file in which we use the print function, as this allows us to use all of the features of the Python 3.

Re: Plans for python support on lyx-2.2

2014-04-24 Thread Josh Hieronymus
On Apr 22, 2014 10:55 AM, "Benjamin Piwowarski" wrote: > > There is not much to do for python 3 compatibility, but still… I attached the patch this time. > > Benjamin I have one comment and one question regarding this patch. The comment: if we're only concerned with supporting Python 2.7 and up,

Re: Plans for python support on lyx-2.2

2014-04-24 Thread Georg Baum
Stephan Witt wrote: > Sorry, you're wrong. My Mac comes with 2.7.2 and I have to install some > additional software package to use python 3. It's possible, but I don't > recommend to force users to do so. It's a hassle and I've heard of users > getting problems with software suddenly broken becaus

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Stephan Witt
Am 22.04.2014 um 22:19 schrieb Georg Baum : > Guenter Milde wrote: > >> On 2014-04-22, Pavel Sanda wrote: >>> José Matos wrote: >> Before proceeding with the changes we should add tests to guarantee that the code works as intended on both versions. >> I do not intend to work on t

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Jean-Marc Lasgouttes
Le 22/04/14 22:19, Georg Baum a écrit : This is the key question IMHO: If 3.2.1 is usable, I'd simply go for python 3 only, and require at least 3.2.1 (it is old enough). This is no problem on any current and not so current linux distribution, not on windows (we ship our own python), adn neither

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Georg Baum
Guenter Milde wrote: > On 2014-04-22, Pavel Sanda wrote: >> José Matos wrote: > >>> Before proceeding with the changes we should add tests to guarantee >>> that the code works as intended on both versions. > >>> I do not intend to work on this until the end of the semester (mid >>> June FWIW) bu

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Benjamin Piwowarski
There is not much to do for python 3 compatibility, but still… I attached the patch this time. Benjamin   On 22 Apr 2014 at 12:55:51 , Josh Hieronymus (josh.p.hierony...@gmail.com) wrote: On Apr 22, 2014 3:15 AM, "Guenter Milde" wrote: > > On 2014-04-22, Pavel Sanda wrote: > > José Matos wrot

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Richard Heck
On 04/22/2014 07:44 AM, Benjamin Piwowarski wrote: Here is a first patch for python 2 & 3 compatibility of configure.py and prefs2prefs.py which are among the most central python scripts. I did not push the changes because of the "open" function (in prefs2prefs) which had to be changed from bi

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Benjamin Piwowarski
Here is a first patch for python 2 & 3 compatibility of configure.py and prefs2prefs.py which are among the most central python scripts. I did not push the changes because of the “open” function (in prefs2prefs) which had to be changed from binary mode to text mode (otherwise, regular expressio

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Josh Hieronymus
On Apr 22, 2014 3:15 AM, "Guenter Milde" wrote: > > On 2014-04-22, Pavel Sanda wrote: > > José Matos wrote: > > >> Before proceeding with the changes we should add tests to guarantee > >> that the code works as intended on both versions. > > >> I do not intend to work on this until the end of the

Re: Plans for python support on lyx-2.2

2014-04-22 Thread Guenter Milde
On 2014-04-22, Pavel Sanda wrote: > José Matos wrote: >> Before proceeding with the changes we should add tests to guarantee >> that the code works as intended on both versions. >> I do not intend to work on this until the end of the semester (mid >> June FWIW) but I would like to start the discu

Re: Plans for python support on lyx-2.2

2014-04-21 Thread Stephan Witt
Am 22.04.2014 um 06:39 schrieb Pavel Sanda : > José Matos wrote: >> Before proceeding with the changes we should add tests to guarantee that the >> code works as intended on both versions. >> >> I do not intend to work on this until the end of the semester (mid June >> FWIW) but I would like to

Re: Plans for python support on lyx-2.2

2014-04-21 Thread Pavel Sanda
Benjamin Piwowarski wrote: > I started to convert to python 3 some central scripts (configure.py a among > those). Most of the problems are due to print calls, and the remaining > problems were straightforward to solve. I will push this to master soon. Benjamin, such patches should be always se

Re: Plans for python support on lyx-2.2

2014-04-21 Thread Benjamin Piwowarski
Hi, I started to convert to python 3 some central scripts (configure.py a among those). Most of the problems are due to print calls, and the remaining problems were straightforward to solve. I will push this to master soon. Benjamin > Le 22 avr. 2014 à 06:39, Pavel Sanda a écrit : > > Jos

Re: Plans for python support on lyx-2.2

2014-04-21 Thread Pavel Sanda
José Matos wrote: > Before proceeding with the changes we should add tests to guarantee that the > code works as intended on both versions. > > I do not intend to work on this until the end of the semester (mid June FWIW) > but I would like to start the discussion here. The more versions suppor

Plans for python support on lyx-2.2

2014-04-21 Thread José Matos
Hi all, I suggest to update the python code used by lyx to support both python 2 and python 3 with the same code. For those who (did not) read the summit notes from Guido: http://thread.gmane.org/gmane.comp.python.devel/147048 There is one point particularly that I noticed: "- The recomm